Prev: 5FC4 Up: Map Next: 601C
5FC9: Print a character
Used by the routine at 5EF3.
Input
A The character to be printed. Either in ASCII, or if $60 or above, bits 0-4 specify an 8 byte offset from 5CE3
H y co-ordinate
L x co-ordinate
5FC9 PUSH HL
5FCA PUSH BC
5FCB PUSH DE
5FCC PUSH AF
5FCD EX DE,HL
5FCE LD A,D
5FCF LD HL,$4000
5FD2 LD BC,$0800
5FD5 CP $10
5FD7 JR NC,$5FDF
5FD9 CP $08
5FDB JR NC,$5FDE
5FDD ADD HL,BC
5FDE ADD HL,BC
5FDF AND $07
5FE1 XOR $07
5FE3 SLA A
5FE5 SLA A
5FE7 SLA A
5FE9 SLA A
5FEB SLA A
5FED LD C,A
5FEE LD B,$00
5FF0 ADD HL,BC
5FF1 LD C,E
5FF2 ADD HL,BC
5FF3 POP AF
5FF4 PUSH AF
5FF5 LD DE,$3C00
5FF8 CP $5F
5FFA JR C,$6001
5FFC LD DE,$5CE3
5FFF SUB $60
6001 LD C,A
6002 XOR A
6003 SLA C
6005 RLA
6006 SLA C
6008 RLA
6009 SLA C
600B RLA
600C LD B,A
600D EX DE,HL
600E ADD HL,BC
600F LD B,$08
6011 LD A,(HL)
6012 LD (DE),A
6013 INC HL
6014 INC D
6015 DJNZ $6011
6017 POP AF
6018 POP DE
6019 POP BC
601A POP HL
601B RET
Prev: 5FC4 Up: Map Next: 601C