Prev: 9BFF Up: Map Next: 9C8E
9C40: Print a string of UDGs
Used by the routines at A3A7, A410, A4C8, A59D, A80C, A9CE, AA49, AB19, ABAD and AE9C.
Input
DE Address of UDGs
H Y position
L X position
9C40 NOP
9C41 NOP
9C42 NOP
9C43 NOP
9C44 PUSH HL
9C45 PUSH BC
9C46 PUSH DE
9C47 PUSH AF
9C48 LD A,H
9C49 EX DE,HL
9C4A LD HL,$4000
9C4D LD BC,$0800
9C50 CP $10
9C52 JR NC,$9C5A
9C54 CP $08
9C56 JR NC,$9C59
9C58 ADD HL,BC
9C59 ADD HL,BC
9C5A AND $07
9C5C XOR $07
9C5E SLA A
9C60 SLA A
9C62 SLA A
9C64 SLA A
9C66 SLA A
9C68 LD C,A
9C69 LD B,$00
9C6B ADD HL,BC
9C6C LD C,E
9C6D ADD HL,BC
9C6E POP AF
9C6F PUSH AF
9C70 LD C,A
9C71 XOR A
9C72 SLA C
9C74 RLA
9C75 SLA C
9C77 RLA
9C78 SLA C
9C7A RLA
9C7B LD B,A
9C7C EX DE,HL
9C7D LD HL,$84F0
9C80 ADD HL,BC
9C81 LD B,$08
9C83 LD A,(HL)
9C84 LD (DE),A
9C85 INC HL
9C86 INC D
9C87 DJNZ $9C83
9C89 POP AF
9C8A POP DE
9C8B POP BC
9C8C POP HL
9C8D RET
Prev: 9BFF Up: Map Next: 9C8E