Prev: D939 Up: Map Next: D9F0
D989: Routine at D989
Used by the routine at E901.
D989 LD A,($E568)
D98C DEC A
D98D LD ($E56A),A
D990 LD A,($E56C)
D993 LD B,A
D994 PUSH BC
D995 LD A,($E569)
D998 ADD A,$02
D99A LD ($E56B),A
D99D LD B,$04
D99F PUSH BC
D9A0 LD A,($E56A)
D9A3 LD B,A
D9A4 LD A,($E56B)
D9A7 LD C,A
D9A8 CALL Calculate_ScreenBlockAddress
D9AB LD A,$08
D9AD LD BC,$0004
D9B0 PUSH HL
D9B1 POP DE
D9B2 INC DE
D9B3 PUSH HL
D9B4 PUSH HL
D9B5 LDDR
D9B7 INC HL
D9B8 LD (HL),C
D9B9 POP HL
D9BA INC H
D9BB PUSH HL
D9BC POP DE
D9BD INC DE
D9BE LD BC,$0004
D9C1 DEC A
D9C2 JP NZ,$D9B4
D9C5 POP HL
D9C6 CALL Calculate_AttributeAddress
D9C9 PUSH DE
D9CA POP HL
D9CB INC DE
D9CC LD BC,$0005
D9CF LDDR
D9D1 LD A,$47
D9D3 INC DE
D9D4 LD (DE),A
D9D5 LD HL,$E56A
D9D8 INC (HL)
D9D9 POP BC
D9DA DJNZ $D99F
D9DC POP BC
D9DD PUSH BC
D9DE CALL $DB5D
D9E1 LD A,($E568)
D9E4 DEC A
D9E5 LD ($E56A),A
D9E8 LD HL,$E569
D9EB INC (HL)
D9EC POP BC
D9ED DJNZ $D994
D9EF RET
Prev: D939 Up: Map Next: D9F0