7DEOH %XEEOH /LVWLQJ &RQWLQXHG
/RF
2EM &RGH 6WPW 6RXUFH 6WDWHPHQW
0026
0026
7KH IROORZLQJ SURJUDP VHH 7DEOH PXOWLSOLHV WZR XQVLJQHG ELW
LQWHJHUV OHDYLQJ WKH UHVXOW LQ WKH +/ UHJLVWHU SDLU
7DEOH 0XOWLSO\ /LVWLQJ
/RF
0000
80
43
flag: equ
44
data: defs
45
end
2EM
&RGH
6WPW 6RXUFH 6WDWHPHQW
1
mult:; unsigned sixteen bit integer multiply.
2
;
3
;
4
;
5
;
6
;
7
;
8
;
9
;
10
;
11
;
12
;
13
;
14
;
15
;
+DUGZDUH DQG 6RIWZDUH ,PSOHPHQWDWLRQ ([DPSOHV
0
; designation of flag bit
2
; storage for data address
on entrance: multiplier in de.
multiplicand in hl.
on exit result in hl.
register uses:
h
high order partial result
l
low order partial result
d
high order multiplicand
e
low order multiplicand
b
counter for number of shifts
c
high order bits of multiplier
< %27
7UGT U /CPWCN
Need help?
Do you have a question about the Z80 and is the answer not in the manual?