Prev: 6588 Up: Map Next: 65FD
65B1: Routine at 65B1
Used by the routine at 6588.
65B1 LD BC,$0202 BC=0202.
65B4 BIT 0,(IX+$00)
65B8 CALL NZ,HandlerTerrainDots
65BB LD A,(IX+$00)
65BE AND %11111110 Keep only bits 1-7.
65C0 NEG
65C2 ADD A,E
65C3 CP $48
65C5 RET C
65C6 CP $F8
65C8 RET NC
65C9 LD L,A
65CA LD A,D
65CB SUB (IX+$01)
65CE CP $08
65D0 RET C
65D1 CP $B8
65D3 RET NC
65D4 LD H,A
65D5 SET 0,(IX+$00)
65D9 LD BC,$0202 BC=0202.
65DC PUSH HL Stash HL on the stack.
65DD CALL HandlerTerrainDots_1 Call HandlerTerrainDots_1.
65E0 POP HL Restore HL from the stack.
65E1 PUSH DE Stash DE on the stack.
65E2 CALL AttributeAddress Call AttributeAddress.
65E5 POP DE Restore DE from the stack.
65E6 LD A,($5E43) Jump to 65F8 if Flag_DayNight is zero.
65E9 AND A
65EA JR Z,$65F8
65EC LD A,($5E44) A=Background_Attribute.
65EF OR %00000111 Set bits 0-2.
65F1 LD C,A
65F2 LD A,(HL)
65F3 CP $76
65F5 RET Z
65F6 LD (HL),C
65F7 RET Return.
65F8 LD A,($5E44) A=Background_Attribute.
65FB JR $65F1 Jump to 65F1.
Prev: 6588 Up: Map Next: 65FD