| Routines

F1BA: Cycle a character buffer group backwards and scroll the screen left 8 columns

Used by the routines at 7866 and EC7B. Cycles one of the character buffer groups in pages 0xD7-0xDD backwards depending on the current leftmost column of the play area that is on screen (X=(7FFE)):
X | Character buffer group
--- | ---
0, 56, 112, 168 | 0xD7
8, 64, 120, 176 | 0xD8
16, 72, 128, 184 | 0xD9
24, 80, 136, 192 | 0xDA
32, 88, 144, 200 | 0xDB
40, 96, 152, 208 | 0xDC
48, 104, 160, 216 | 0xDD
F1BA | LD A,($7FFE) | 7FFE holds X, the x-coordinate of the leftmost column of the play area on screen
F1BD | SUB $38 | A=0x00, 0x08, 0x10, 0x18, 0x20, 0x28 or 0x30 (depending on the value of X)
F1BF | JR NC,$F1BD
F1C1 | ADD A,$38
F1C3 | RRCA | A=0xD7-0xDD
F1C4 | RRCA
F1C5 | RRCA
F1C6 | ADD A,$D7
F1C8 | LD H,A | Point HL at the first byte of the first buffer in the group
F1C9 | LD L,$00
F1CB | LD DE,$7F60 | Copy the first buffer in the group (buffer 1) to 7F60 temporarily
F1CE | LD BC,$0019
F1D1 | LDIR
F1D3 | LD E,B | Point DE at the first byte of the first buffer in the group
F1D4 | LD D,H
F1D5 | LD C,$64 | Move buffers 2-5 down into slots 1-4 (thus overwriting buffer 1)
F1D7 | LDIR
F1D9 | LD HL,$7F60 | Copy buffer 1 from its temporary storage location into slot 5
F1DC | LD C,$19
F1DE | LDIR
F1E0 | JP $E80E | Scroll the screen left 8 columns (the routine at 7866 replaces this instruction with a RET)