Routines

63512: Scroll display file one character square to the left or right


Used by routine at 63561

DE 16384 (from 63553) or 16415 (from 63561)

63512 0600 LD B,0
63514 D9 EXX
63515 0E15 LD C,21 21 rows on screen (3 at bottom are fixed)
63517 0608 LD B,8 8 pixel lines per row of screen
63519 D9 EXX
63520 62 LD H,D
63521 6B LD L,E

If we've come from 63553:
63522 2C INC L

If we've come from 63561:
63522 2D DEC L

63523 7B LD A,E
63524 0E1F LD C,31 31 bytes to shift per pixel line

If we've come from 63553:
63526 EDB0 LDIR Shift to the left

If we've come from 63561:
63526 EDB8 LDDR Shift to the right

63528 5F LD E,A
63529 14 INC D Point DE at first (or last) byte of next pixel line in this row
63530 D9 EXX
63531 10F2 DJNZ 63519 Shift the remaining pixel lines in this row
63533 D9 EXX
63534 7B LD A,E
63535 C620 ADD A,32
63537 5F LD E,A
63538 3804 JR C,63544
63540 7A LD A,D
63541 D608 SUB 8
63543 57 LD D,A
63544 D9 EXX
63545 0D DEC C
63546 20E1 JR NZ,63517 Jump back until all 21 rows have been shifted
63548 D9 EXX
63549 3AFF7F LD A,(32767) A=column of play area (that was) at far left of screen
63552 C9 RET