Prev: 59458 Up: Map Next: 59513
59461: Scroll the screen right 8 columns
Used by the routine at 61838.
59461 LD HL,59372 Set the instruction at 59371 to 'LD BC,31'
59464 LD (HL),31
59466 LD L,239 Set the instruction at 59374 to 'LDDR'
59468 LD (HL),184
59470 LD B,8 There are 8 columns to scroll on
59472 PUSH BC Save the column counter
59473 LD B,20 There are 20 rows to be scrolled right
59475 LD HL,22558 Point HL at the attribute byte for the cell at screen coordinates (0,0)
59478 LD D,H Point DE at the attribute byte for the adjacent cell on the right
59479 LD E,L
59480 INC E
59481 PUSH BC Save the row counter
59482 PUSH HL Save the source attribute file address
59483 CALL 59368 Shift this row of the screen right
59486 POP HL Restore the source attribute file address to HL
59487 LD C,32 Point HL at the next row down in the attribute file
59489 ADD HL,BC
59490 POP BC Restore the row counter to B
59491 DJNZ 59478 Jump back until all 20 rows have been scrolled right
59493 LD HL,32766 32766 holds the x-coordinate of the leftmost column of the play area on screen
59496 DEC (HL) Decrement this x-coordinate
59497 LD HL,4864 L=0 (leftmost screen column), H=19 (bottom row of the screen)
59500 PUSH HL Save the screen coordinates
59501 CALL 59148 Print a tile at screen coordinates (0,H)
59504 POP HL Restore the screen coordinates to HL
59505 DEC H Have we printed every tile in the column yet?
59506 JP P,59500 Jump back if not
59509 POP BC Restore the column counter to B
59510 DJNZ 59472 Jump back until 8 columns have been scrolled on
59512 RET
Prev: 59458 Up: Map Next: 59513