Changes
Stupid editor - disabled now
<br>x<sup>2</sup>/4 for 9 bit values of x, with the LSB when bit 8 is zero first followed by the MSB.
<pre>.gen_sq4
align #100
.umul_tab ds #400 </pre>
Now for the actual multiply routine:
'''Output:''' DE = ''Product''
<pre> ld h,umul_tab umul_tab_lo / #100 ; 2 ld b,h ; 3 add l ; 4 ld c,a ; 5 jr nc,@noovf ; 7 inc b ; 8 inc b ; 9
.@noovf
.@noneg
This code could easily be converted to a macro as it's only 24 bytes. I've tried to optimise it further but with no luck!