Prev: DAB1 Up: Map Next: DB2E
DABF: Routine at DABF
Used by the routines at D352 and F39E.
DABF LD A,($E75D) A=*E75D.
DAC2 DEC A Decrease A by one.
DAC3 LD ($E75F),A Write A to *E75F.
DAC6 LD A,($E75E) A=*E75E.
DAC9 DEC A Decrease A by one.
DACA LD ($E760),A Write A to *E760.
DACD LD B,$04 B=04.
DACF HALT Halt operation (suspend CPU until the next interrupt).
DAD0 PUSH BC Stash BC on the stack.
DAD1 LD A,($E75F) B=*E75F.
DAD4 LD B,A
DAD5 LD A,($E760) C=*E760.
DAD8 LD C,A
DAD9 CALL Calculate_ScreenBlockAddress Call Calculate_ScreenBlockAddress.
DADC PUSH HL Stash HL on the stack.
DADD LD A,$00 A=00.
DADF LD B,$08 B=08.
DAE1 PUSH BC Stash BC and HL on the stack.
DAE2 PUSH HL
DAE3 LD B,$04 B=04.
DAE5 LD (HL),A Write A to *HL.
DAE6 INC HL Increment HL by one.
DAE7 DJNZ $DAE5 Decrease counter by one and loop back to DAE5 until counter is zero.
DAE9 POP HL Restore HL and BC from the stack.
DAEA POP BC
DAEB INC H Increment H by one.
DAEC DJNZ $DAE1 Decrease counter by one and loop back to DAE1 until counter is zero.
DAEE POP HL Restore HL from the stack.
DAEF CALL Calculate_AttributeAddress Call Calculate_AttributeAddress.
DAF2 LD A,$47 A=47.
DAF4 LD B,$04 B=04.
DAF6 LD (DE),A Write A to *DE.
DAF7 INC DE Increment DE by one.
DAF8 DJNZ $DAF6 Decrease counter by one and loop back to DAF6 until counter is zero.
DAFA POP BC Restore BC from the stack.
DAFB LD HL,$E75F HL=E75F.
DAFE INC (HL) Increment *HL by one.
DAFF DJNZ $DAD0 Decrease counter by one and loop back to DAD0 until counter is zero.
DB01 LD A,($D833) Return if *D833 is equal to 00.
DB04 CP $00
DB06 RET Z
DB07 LD B,$03 B=03.
DB09 PUSH BC Stash BC on the stack.
DB0A LD A,$05 A=05.
DB0C LD C,$1E C=1E.
DB0E LD B,$28 B=28.
DB10 SLA B Shift B left (with carry).
DB12 DJNZ $DB12 Decrease counter by one and loop back to DB12 until counter is zero.
DB14 XOR %00010000 Flip bit 4.
DB16 OUT ($FE),A Set border to the colour held by A.
DB18 DEC C Decrease C by one.
DB19 JR NZ,$DB0E Jump to DB0E if C is not zero.
DB1B LD C,$14 C=14.
DB1D LD B,$3C B=3C.
DB1F SLA B Shift B left (with carry).
DB21 DJNZ $DB21 Decrease counter by one and loop back to DB21 until counter is zero.
DB23 XOR %00010000 Flip bit 4.
DB25 OUT ($FE),A Set border to the colour held by A.
DB27 DEC C Decrease C by one.
DB28 JR NZ,$DB1D Jump to DB1D if C is not zero.
DB2A POP BC Restore BC from the stack.
DB2B DJNZ $DB09 Decrease counter by one and loop back to DB09 until counter is zero.
DB2D RET Return.
Prev: DAB1 Up: Map Next: DB2E