1 ; from http://www.6502.org/source/integers/32muldiv.htm
18 sta PROD
+4 ;Clear upper half of
22 ldx #
$20 ;Set binary count to 32
23 @@SHIFT_R: lsr MULR
+3 ;Shift multiplyer right
27 bcc
@@ROTATE_R ;Go rotate right if c = 0
28 lda PROD
+4 ;Get upper half of product
29 clc ; and add multiplicand to
40 @@ROTATE_R: ror a
;Rotate partial product
49 dex
;Decrement bit count and
50 bne
@@SHIFT_R ; loop until 32 bits are
52 ; lda MULXP1 ;Add dps and put sum in MULXP2