Download Print this page

ZiLOG Z80 Handbook page 233

Hide thumbs Also See for Z80:

Advertisement

P1OTAB DEFW 10000
DEFW 1000
DEFW 100
DEFW 10
DEFW 1
Fig. 16 - 2 shows the actions of the four routines in the base X to
ASCII conversion group.
INPUT
BXASB
C
8-BIT B I NARY
OUTPUT
OUTPUT BUFFER
FILLED WITH 8
ASCII BINARY CHARACTERS
BXASH
BXBCD
BXDEC
8-BIT BINARY
C
C
BCDDIG.IT1 BCD DIGIT2
(HL)
1
ASCII HEX CHARACTERS
IHLI OUTPUT BUFFER
FILLED WITH 2
(HL)
UTPUT BUFFERR
FILLED WITH 2
ASCII DECIMAL CHARACTERS
IHLI
(HL)
O
16 BIT BINARY
H
L
OUTPUT BUFFER
FILLED WITH 5
ASCII DECIMAL CHARACTERS
Fig. 16 - 2. Base X to ASCII conversions.
11X)
FILL DATA ROUTINE
The following routine fills a block of memory with a specified 8-bit
binary value. This routine is useful in zeroing tables or for filling a
known data value into buffers (such as all blanks to initialize a print
buffer). The value to be filled is input to the A register, the starting
address for the fill is contained in the HL register, and the number
242

Advertisement

loading
Need help?

Need help?

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

Questions and answers