ZiLOG Z80 User Manual page 272

Hide thumbs Also See for Z80:
Table of Contents

Advertisement

< %27
7UGT U /CPWCN

'ZCORNG
80
$ W\SLFDO VRIWZDUH URXWLQH LV XVHG WR GHPRQVWUDWH WKH XVH RI WKH '-1=
LQVWUXFWLRQ 7KLV URXWLQH PRYHV D OLQH IURP DQ LQSXW EXIIHU ,1%8) WR DQ
RXWSXW EXIIHU 287%8)  ,W PRYHV WKH E\WHV XQWLO LW ILQGV D &5 RU XQWLO LW
KDV PRYHG  E\WHV ZKLFKHYHU RFFXUV ILUVW
LOOP:
DONE:
LD
8, 80
;Set up counter
LD
HL, Inbuf
;Set up pointers
LD
DE, Outbuf
LID
A, (HL)
;Get next byte from
;input buffer
LD
(DE), A
;Store in output buffer
CP
ODH
;Is it a CR?
JR
Z, DONE
;Yes finished
INC
HL
;Increment pointers
INC
DE
DJNZ LOOP
;Loop back if 80
;bytes have not
;been moved
= ,QVWUXFWLRQ 6HW

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Z80 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents