Prev: CD90 Up: Map Next: CDC3
CDAE: Draw Numbering from Character Set Index
Used by the routines at TwoTone_Attributes_Buffer and Draw_Score.
Draw_Number CDAE PUSH DE Using $C000 as a base address, this works out the character set memory address from a given index passed in A. To give an example using "2" (25 - see Draw_Score);
  • Loads 25 as the low-order byte; HL=0025
  • Times by 10; HL=0250
  • Add C000=Char_2
This is then passed to Copy_Routine.
CDAF LD H,$00
CDB1 LD L,A
CDB2 ADD HL,HL
CDB3 ADD HL,HL
CDB4 ADD HL,HL
CDB5 ADD HL,HL
CDB6 LD DE,$C000
CDB9 ADD HL,DE
CDBA EX DE,HL
CDBB POP HL
CDBC LD BC,$1001
CDBF CALL Copy_Routine
CDC2 RET Return.
Prev: CD90 Up: Map Next: CDC3