User Guide

<%27
7UGT
U/CPWCN
80 +DUGZDUHDQG6RIWZDUH,PSOHPHQWDWLRQ([DPSOHV

16 ; a low order bits of multiplier
17 ;
0000 0610 18 ld b, 16; number of bits-initialize
0002 4a 19 ld c, d; move multiplier
0003 7b 20 ld a, e;
0004 eb 21 ex de, hl; move multiplicand
0005 210000 22 ld hl, 0; clear partial result
0008 cb39 23 mloop: srl c; shift multiplier right
000a if 24 rra least significant bit is
25 ; in carry.
000b 3001 26 jr nc, noadd-$; if no carry, skip the add.
good 19 27 add hl, de; else add multiplicand to
28 ; partial result.
000e eb 29 noadd: ex de, h l; shift multiplicand left
goof 29 30 add hl, hl; by multiplying it by two.
0010 eb 31 ex de, hl;
0011 10f5 32 djnz mloop-$; repeat until no more bits.
0013 c9 33 ret;
34 end;
7DEOH0XOWLSO\/LVWLQJ&RQWLQXHG
/RF
2EM
&RGH 6WPW 6RXUFH6WDWHPHQW