![]() |
Routines |
| Prev: E80D | Up: Map | Next: E842 |
|
Used by the routine at F1BA.
|
||||
| E80E | LD HL,$E7EC | Set the instruction at E7EB to 'LD BC,$001F' | ||
| E811 | LD (HL),$1F | |||
| E813 | LD L,$EF | Set the instruction at E7EE to 'LDIR' | ||
| E815 | LD (HL),$B0 | |||
| E817 | LD B,$08 | There are 8 columns to scroll on | ||
| E819 | PUSH BC | Save the column counter | ||
| E81A | LD B,$14 | There are 20 rows to be scrolled left | ||
| E81C | LD HL,$5801 | Point HL at the attribute byte for the cell at screen coordinates (1,0) | ||
| E81F | LD D,H | Point DE at the attribute byte for the adjacent cell on the left | ||
| E820 | LD E,L | |||
| E821 | DEC E | |||
| E822 | PUSH BC | Save the row counter | ||
| E823 | PUSH HL | Save the source attribute file address | ||
| E824 | CALL $E7E8 | Shift this row of the screen left | ||
| E827 | POP HL | Restore the source attribute file address to HL | ||
| E828 | LD C,$20 | Point HL at the next row down in the attribute file | ||
| E82A | ADD HL,BC | |||
| E82B | POP BC | Restore the row counter to B | ||
| E82C | DJNZ $E81F | Jump back until all 20 rows have been scrolled left | ||
| E82E | LD HL,$7FFE | 7FFE holds the x-coordinate of the leftmost column of the play area on screen | ||
| E831 | INC (HL) | Increment this x-coordinate | ||
| E832 | LD HL,$131F | L=31 (rightmost screen column), H=19 (bottom row of the screen) | ||
| E835 | PUSH HL | Save the screen coordinates | ||
| E836 | CALL $E70C | Print a tile at screen coordinates (31,H) | ||
| E839 | POP HL | Restore the screen coordinates to HL | ||
| E83A | DEC H | Have we printed every tile in the column yet? | ||
| E83B | JP P,$E835 | Jump back if not | ||
| E83E | POP BC | Restore the column counter to B | ||
| E83F | DJNZ $E819 | Jump back until 8 columns have been scrolled on | ||
| E841 | RET | |||
| Prev: E80D | Up: Map | Next: E842 |