Prev: CBD2 Up: Map Next: CC2B
CBFC: Draw a Character
Used by the routine at 5B9B.
Input
DE Location on screen to print
A Character to print, in ASCII
Print_TwoToneText_SpaceCheck CBFC CP $20 If the character isnot a space then jump forward to Print_TwoToneText_SpaceCheck_0.
CBFE JR NZ,Print_TwoToneText_SpaceCheck_0
CC00 LD HL,$5B00 Point to empty space
CC03 LD BC,$1001 10 rows, 01 characters
CC06 EX DE,HL Print a blank space on screen.
CC07 PUSH HL
CC08 CALL Copy_Routine
CC0B POP HL
CC0C JR Print_TwoToneText_SpaceCheck_2 Move forward.
Print_TwoToneText_SpaceCheck_0 CC0E CP $41 Is this a letter?
CC10 JR NC,Print_TwoToneText_SpaceCheck_1 Jump forward if so.
CC12 ADD A,$2A Adjust numbers to be in the right place in the character set.
Print_TwoToneText_SpaceCheck_1 CC14 SUB $41 Convert from ASCII to index in the character set.
CC16 ADD A,$0A
CC18 PUSH DE Remember the screen address.
CC19 CALL Draw_Number Copy the character to screen.
CC1C POP HL Restore screen address in HL.
Print_TwoToneText_SpaceCheck_2 CC1D CALL $CC2B Get the attribute address from the screen address.
CC20 LD BC,($CBD0) Load the stored top/ bottom attribute bytes back into BC and write them to the screen.
CC24 LD (HL),B
CC25 LD DE,$0020
CC28 ADD HL,DE
CC29 LD (HL),C
CC2A RET Return.
Prev: CBD2 Up: Map Next: CC2B