Routines |
Prev: E8B4 | Up: Map | Next: E8F0 |
Used by the routine at EC7B.
|
||||
E8B7 | LD HL,$E7EC | Set the instruction at E7EB to 'LD BC,$0020' | ||
E8BA | LD (HL),$20 | |||
E8BC | LD L,$EF | Set the instruction at E7EE to 'LDIR' | ||
E8BE | LD (HL),$B0 | |||
E8C0 | LD B,$06 | 6 rows will be scrolled on | ||
E8C2 | PUSH BC | Save the primary screen row counter | ||
This entry point is used by the routine at FC6A.
|
||||
E8C3 | LD B,$13 | There are 19 screen rows to move down | ||
E8C5 | LD DE,$5A60 | DE=destination attribute file address (bottom row) | ||
E8C8 | LD HL,$5A40 | HL=source attribute file address (second row from the bottom) | ||
E8CB | PUSH BC | Save the secondary screen row counter | ||
E8CC | PUSH HL | Save the source attribute file address | ||
E8CD | PUSH DE | Save the destination attribute file address | ||
E8CE | CALL $E7E8 | Move one screen row down | ||
E8D1 | POP HL | HL=source attribute file address | ||
E8D2 | LD BC,$FFE0 | Point HL at the next row up in the attribute file | ||
E8D5 | ADD HL,BC | |||
E8D6 | EX DE,HL | Transfer this address to DE | ||
E8D7 | POP HL | HL=destination attribute file address | ||
E8D8 | ADD HL,BC | Point HL at the next row up in the attribute file | ||
E8D9 | POP BC | Restore the secondary screen row counter to B | ||
E8DA | DJNZ $E8CB | Jump back until all 19 screen rows have been moved down | ||
E8DC | LD HL,$7FFF | 7FFF holds the y-coordinate of the topmost row of the play area on screen | ||
E8DF | DEC (HL) | Decrement this | ||
E8E0 | LD HL,$001F | L=31 (rightmost screen column), H=0 (top row of the screen) | ||
E8E3 | PUSH HL | Save the screen coordinates briefly | ||
E8E4 | CALL $E70C | Print a tile at screen coordinates (L,0) | ||
E8E7 | POP HL | Restore the screen coordinates to HL | ||
E8E8 | DEC L | Have we printed every tile in the row yet? | ||
E8E9 | JP P,$E8E3 | Jump back if not | ||
E8EC | POP BC | Restore the primary screen row counter to B | ||
E8ED | DJNZ $E8C2 | Jump back until 6 rows have been scrolled on | ||
E8EF | RET |
Prev: E8B4 | Up: Map | Next: E8F0 |