Prev: 52081 Up: Map Next: 52337
52162: 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 52162 LD (23770),SP Save the stack pointer.
52166 LD SP,58811 Point the stack at the first byte of the screen buffer.
52169 LD B,128 Set the row count to 128.
ShiftViewRightPixels_Loop 52171 XOR A Clear the pixels shifted in from the left of the row.
52172 POP DE Shift the leftmost two bytes of the row two pixels to the right.
52173 SRL E
52175 RR D
52177 RRA
52178 RR E
52180 RR D
52182 RLA
52183 PUSH DE
52184 POP DE
52185 POP DE Shift the other twenty-two bytes two pixels to the right and step onto the next row.
52186 RR E
52188 RR D
52190 RRA
52191 RR E
52193 RR D
52195 RLA
52196 PUSH DE
52197 POP DE
52198 POP DE
52199 RR E
52201 RR D
52203 RRA
52204 RR E
52206 RR D
52208 RLA
52209 PUSH DE
52210 POP DE
52211 POP DE
52212 RR E
52214 RR D
52216 RRA
52217 RR E
52219 RR D
52221 RLA
52222 PUSH DE
52223 POP DE
52224 POP DE
52225 RR E
52227 RR D
52229 RRA
52230 RR E
52232 RR D
52234 RLA
52235 PUSH DE
52236 POP DE
52237 POP DE
52238 RR E
52240 RR D
52242 RRA
52243 RR E
52245 RR D
52247 RLA
52248 PUSH DE
52249 POP DE
52250 POP DE
52251 RR E
52253 RR D
52255 RRA
52256 RR E
52258 RR D
52260 RLA
52261 PUSH DE
52262 POP DE
52263 POP DE
52264 RR E
52266 RR D
52268 RRA
52269 RR E
52271 RR D
52273 RLA
52274 PUSH DE
52275 POP DE
52276 POP DE
52277 RR E
52279 RR D
52281 RRA
52282 RR E
52284 RR D
52286 RLA
52287 PUSH DE
52288 POP DE
52289 POP DE
52290 RR E
52292 RR D
52294 RRA
52295 RR E
52297 RR D
52299 RLA
52300 PUSH DE
52301 POP DE
52302 POP DE
52303 RR E
52305 RR D
52307 RRA
52308 RR E
52310 RR D
52312 RLA
52313 PUSH DE
52314 POP DE
52315 POP DE
52316 RR E
52318 RR D
52320 RRA
52321 RR E
52323 RR D
52325 RLA
52326 PUSH DE
52327 POP DE
52328 DEC B Decrease the row count and jump back until every row of the buffer has been shifted.
52329 JP NZ,ShiftViewRightPixels_Loop
52332 LD SP,(23770) Restore the stack pointer.
52336 RET Return.
Prev: 52081 Up: Map Next: 52337