![]() |
Routines |
| 24731 | EXX | |
| 24732 | LD HL,22529 | Point HL' and DE' at the leftmost end of the top row of attribute bytes on the screen |
| 24735 | LD DE,22528 | |
| 24738 | LD BC,31 | We need to scroll 31 attribute bytes at a time |
| 24741 | EXX | |
| 24742 | LD HL,16385 | Point HL and DE at the leftmost end of the top row of pixels on the screen |
| 24745 | LD DE,16384 | |
| 24748 | LD BC,31 | We need to scroll 31 display file bytes at a time |
| 24751 | LD A,21 | There are 21 rows of character squares to scroll |
| 24753 | EX AF,AF' | |
| 24754 | LD A,8 | Each row of character squares contains 8 rows of pixels |
| 24756 | PUSH HL | |
| 24757 | PUSH DE | |
| 24758 | LDIR | Scroll a row of pixels left one column |
| 24760 | POP DE | |
| 24761 | POP HL | |
| 24762 | INC D | Point HL and DE at the next row of pixels |
| 24763 | INC H | |
| 24764 | LD C,31 | Restore 31 to BC |
| 24766 | DEC A | Next row in this block of 8x32 |
| 24767 | JR NZ,24756 | Jump back until this 8x32 pixel block has been scrolled |
| 24769 | EXX | |
| 24770 | LDIR | Scroll a row of attribute bytes left one column |
| 24772 | INC HL | Point HL' and DE' at the leftmost end of the next row of attribute bytes on the screen |
| 24773 | INC DE | |
| 24774 | LD C,31 | Restore 31 to BC' |
| 24776 | EXX | |
| 24777 | LD A,32 | Point HL and DE at the leftmost end of the top row of the next 8x32 block of pixels |
| 24779 | ADD A,E | |
| 24780 | LD E,A | |
| 24781 | LD A,32 | |
| 24783 | ADD A,L | |
| 24784 | LD L,A | |
| 24785 | EX AF,AF' | |
| 24786 | DEC A | Next row of character squares |
| 24787 | JR Z,24805 | Exit this loop if all 21 rows have been scrolled left |
| 24789 | CP 5 | Have we reached the bottom third of the screen? |
| 24791 | JR Z,24753 | Jump if so |
| 24793 | CP 13 | Have we reached the middle third of the screen? |
| 24795 | JR Z,24753 | Jump if so |
| 24797 | EX AF,AF' | |
| 24798 | LD A,H | Point HL and DE at the leftmost end of the top row of the next 8x32 block of pixels |
| 24799 | SUB 8 | |
| 24801 | LD H,A | |
| 24802 | LD D,A | |
| 24803 | JR 24754 | Jump back to deal with the next row of character squares |
| 24805 | EXX | |
| 24806 | LD HL,22559 | Point HL' and DE' at the attribute file and display file addresses for the top right of the screen, and set BC'=32; however, these values are not used |
| 24809 | LD DE,16415 | |
| 24812 | INC C | |
| 24813 | EXX | |
| 24814 | LD A,(32512) | A=column at far left of screen (0-64) |
| 24817 | INC A | We are scrolling one column left |
| 24818 | LD (32512),A | |
| 24821 | ADD A,C | A=column at far right of the screen (31-95) |
| 24822 | JP 24670 | Fill in the rightmost column |