Subject: math subroutines



See /usr/ph/ik/math/alu.k for tips on how to do basic arithmetic.
For optimization freaks, see the "tricks" section at the end of that file.

Also, I have a few subroutines which might be useful to the rest of you:
   /usr/ph/ik/math/mul32.k    multiplies two 32-bit operands, yeilding 64 bits
   /usr/ph/ik/math/div32.k    divides 32-bit operands, yeilds quotient & rem.
   /usr/ph/ik/math/div64.k    divide 64-bit num. by 32-bit denom.
   /usr/ph/ik/math/sqrt.g     square root of a 32-bit integer (11.7 us!)

There are comments at the beginning of these programs which tell you
how to set up the registers before calling.