Prev: CA69 Up: Map Next: CB71
CB23: Shift View Right Byte
Shifts the screen buffer to the right by one byte, by using the stack pointer to copy it. The part from ShiftViewRightByte_Copy is also used to move rows down by MoveRowsDown.
ShiftViewRightByte CB23 LD ($5CDA),SP Save the stack pointer.
CB27 LD HL,$F1B9 Point HL at the last two bytes of the screen buffer.
CB2A LD SP,HL Point the stack at them.
CB2B POP DE Skip those two bytes, which the shift overwrites.
CB2C LD B,$80 Set the row count to 80.
This entry point is used by the routine at MoveRowsDown.
ShiftViewRightByte_Copy CB2E LD D,(HL) Copy the twenty-four bytes of the next row onto the stack, walking backwards.
CB2F DEC HL
CB30 LD E,(HL)
CB31 DEC HL
CB32 PUSH DE
CB33 LD D,(HL)
CB34 DEC HL
CB35 LD E,(HL)
CB36 DEC HL
CB37 PUSH DE
CB38 LD D,(HL)
CB39 DEC HL
CB3A LD E,(HL)
CB3B DEC HL
CB3C PUSH DE
CB3D LD D,(HL)
CB3E DEC HL
CB3F LD E,(HL)
CB40 DEC HL
CB41 PUSH DE
CB42 LD D,(HL)
CB43 DEC HL
CB44 LD E,(HL)
CB45 DEC HL
CB46 PUSH DE
CB47 LD D,(HL)
CB48 DEC HL
CB49 LD E,(HL)
CB4A DEC HL
CB4B PUSH DE
CB4C LD D,(HL)
CB4D DEC HL
CB4E LD E,(HL)
CB4F DEC HL
CB50 PUSH DE
CB51 LD D,(HL)
CB52 DEC HL
CB53 LD E,(HL)
CB54 DEC HL
CB55 PUSH DE
CB56 LD D,(HL)
CB57 DEC HL
CB58 LD E,(HL)
CB59 DEC HL
CB5A PUSH DE
CB5B LD D,(HL)
CB5C DEC HL
CB5D LD E,(HL)
CB5E DEC HL
CB5F PUSH DE
CB60 LD D,(HL)
CB61 DEC HL
CB62 LD E,(HL)
CB63 DEC HL
CB64 PUSH DE
CB65 LD D,(HL)
CB66 DEC HL
CB67 LD E,(HL)
CB68 DEC HL
CB69 PUSH DE
CB6A DJNZ ShiftViewRightByte_Copy Decrease the row count and jump back until every row has been copied.
CB6C LD SP,($5CDA) Restore the stack pointer.
CB70 RET Return.
Prev: CA69 Up: Map Next: CB71