65816: 32-bit Floating-point Package Available

I wrote in my previous post about testing my 32-bit floating-point package on a Mandelbrot plot. Paying forward Marco’s original 128-bit package contribution, I’ve made my 32-bit package available on my GitHub.

It’s still a work in progress with limited functionality. But it’s still enough to handle Mandelbrot which was my original goal.

Function Stack Effects

fadd32      ( F: r1 r2 -- r3 )  - Add r1 to r2 giving the sum r3
fsub32      ( F: r1 r2 -- r3 )  - Subtract r2 from r1, giving r3
fmult32     ( F: r1 r2 -- r3 )  - Multiply r1 by r2 giving r3
fdiv32      ( F: r1 r2 -- r3 )  - Divide r1 by r2, giving the quotient r3
fsquare32   ( F: r1 -- r2 )     - r2 is the square of r1
ftrunc32    ( F: r1 -- r2 )     - Rounds r1 to an integral value
uitrunc32   ( F: r -- )         - Return the integral part of r as an unsigned 32 bit integer
floor32     ( F: r1 -- r2 )     - Round r1 to an integral value r2
fround32    ( F: r1 -- r2 )     - Round r1 to an integral value r2
pushu32     ( F: -- r1 )        - Convert unsigned integer to float and push r1 onto stack
str2fp32    ( F: -- r )         - Convert the source string to float r and push on stack

There is a lot more detail on my GitHub. Check it out.

Leave a Reply