Prev: CB71 Up: Map Next: CC71
CBC2: Shift View Right Pixels
Shifts the screen buffer to the right by two pixels, by rotating the bits of each row through the stack.
ShiftViewRightPixels CBC2 LD ($5CDA),SP Save the stack pointer.
CBC6 LD SP,$E5BB Point the stack at the first byte of the screen buffer.
CBC9 LD B,$80 Set the row count to 80.
ShiftViewRightPixels_Loop CBCB XOR A Clear the pixels shifted in from the left of the row.
CBCC POP DE Shift the leftmost two bytes of the row two pixels to the right.
CBCD SRL E
CBCF RR D
CBD1 RRA
CBD2 RR E
CBD4 RR D
CBD6 RLA
CBD7 PUSH DE
CBD8 POP DE
CBD9 POP DE Shift the other twenty-two bytes two pixels to the right and step onto the next row.
CBDA RR E
CBDC RR D
CBDE RRA
CBDF RR E
CBE1 RR D
CBE3 RLA
CBE4 PUSH DE
CBE5 POP DE
CBE6 POP DE
CBE7 RR E
CBE9 RR D
CBEB RRA
CBEC RR E
CBEE RR D
CBF0 RLA
CBF1 PUSH DE
CBF2 POP DE
CBF3 POP DE
CBF4 RR E
CBF6 RR D
CBF8 RRA
CBF9 RR E
CBFB RR D
CBFD RLA
CBFE PUSH DE
CBFF POP DE
CC00 POP DE
CC01 RR E
CC03 RR D
CC05 RRA
CC06 RR E
CC08 RR D
CC0A RLA
CC0B PUSH DE
CC0C POP DE
CC0D POP DE
CC0E RR E
CC10 RR D
CC12 RRA
CC13 RR E
CC15 RR D
CC17 RLA
CC18 PUSH DE
CC19 POP DE
CC1A POP DE
CC1B RR E
CC1D RR D
CC1F RRA
CC20 RR E
CC22 RR D
CC24 RLA
CC25 PUSH DE
CC26 POP DE
CC27 POP DE
CC28 RR E
CC2A RR D
CC2C RRA
CC2D RR E
CC2F RR D
CC31 RLA
CC32 PUSH DE
CC33 POP DE
CC34 POP DE
CC35 RR E
CC37 RR D
CC39 RRA
CC3A RR E
CC3C RR D
CC3E RLA
CC3F PUSH DE
CC40 POP DE
CC41 POP DE
CC42 RR E
CC44 RR D
CC46 RRA
CC47 RR E
CC49 RR D
CC4B RLA
CC4C PUSH DE
CC4D POP DE
CC4E POP DE
CC4F RR E
CC51 RR D
CC53 RRA
CC54 RR E
CC56 RR D
CC58 RLA
CC59 PUSH DE
CC5A POP DE
CC5B POP DE
CC5C RR E
CC5E RR D
CC60 RRA
CC61 RR E
CC63 RR D
CC65 RLA
CC66 PUSH DE
CC67 POP DE
CC68 DEC B Decrease the row count and jump back until every row of the buffer has been shifted.
CC69 JP NZ,ShiftViewRightPixels_Loop
CC6C LD SP,($5CDA) Restore the stack pointer.
CC70 RET Return.
Prev: CB71 Up: Map Next: CC71