Prev: A3AE Up: Map Next: A402
A3C8: Draw the number saved in charcode buffer at A0A4 into display file
Used by the routines at 99AB, 99BB, 99FA and 9C76.
Input
E Horizontal position of the unit digit
L Vertical position of the number to draw
B Number of digits to draw
A3C8 PUSH IX Save IX
A3CA LD IX,$A0A6 Point IX to the unit charcode to draw
A3CE LD H,$00 Computes offset for vertical position
A3D0 ADD HL,HL
A3D1 LD D,$00 Save DE
A3D3 PUSH DE
A3D4 LD DE,$ABDD Set HL to point to address of first digit into display file lookup table
A3D7 ADD HL,DE
A3D8 LD E,(HL) Set DE to the corresponding address into display file
A3D9 INC HL
A3DA LD D,(HL)
A3DB POP HL Restore HL
A3DC ADD HL,DE Adds horizontal position to address on display file
A3DD EX DE,HL Exchange DE and HL
A3DE PUSH BC Save BC
A3DF PUSH DE Save DE
A3E0 LD L,(IX+$00) Set HL to the charcode digit pointed by IX
A3E3 LD H,$00
A3E5 ADD HL,HL Computes offset of the charcode into charset table to set HL to the graphics data for the digit
A3E6 ADD HL,HL
A3E7 ADD HL,HL
A3E8 LD BC,$5FE0
A3EB ADD HL,BC
A3EC CALL $A3F9 Draw digit into display file
A3EF INC IX Point IX to the next charcode digit
A3F1 POP DE Restore DE
A3F2 DEC DE Point DE to the position of the previous digit into displat file
A3F3 POP BC Restore BC
A3F4 DJNZ $A3DE Jump back until all digits copied
A3F6 POP IX Restore IX
A3F8 RET
Draw digit into display file
A3F9 LD B,$08 Set B to the number of bytes to draw
A3FB LD A,(HL) Copy graphics data from HL to display file
A3FC LD (DE),A
A3FD INC HL Increment address of graphic data
A3FE INC D Increment address of display file (next line)
A3FF DJNZ $A3FB Jump back until the digit is draw
A401 RET
Prev: A3AE Up: Map Next: A402