Prev: 51735 Up: Map Next: 52003
51817: Shift View Left Pixels
Shifts the screen buffer to the left by two pixels, by rotating the bits of each row through the stack.
ShiftViewLeftPixels 51817 LD (23770),SP Save the stack pointer.
51821 LD B,128 Set the row count to 128.
51823 LD SP,61881 Point the stack at the last two bytes of the screen buffer.
ShiftViewLeftPixels_Loop 51826 XOR A Shift the rightmost two bytes of the row two pixels to the left, filling the gap with blank pixels.
51827 POP HL
51828 SLA H
51830 RL L
51832 RRA
51833 RL H
51835 RL L
51837 RLA
51838 PUSH HL
51839 DEC SP
51840 DEC SP
51841 POP HL Shift the middle twenty bytes of the row two pixels to the left.
51842 RL H
51844 RL L
51846 RRA
51847 RL H
51849 RL L
51851 RLA
51852 PUSH HL
51853 DEC SP
51854 DEC SP
51855 POP HL
51856 RL H
51858 RL L
51860 RRA
51861 RL H
51863 RL L
51865 RLA
51866 PUSH HL
51867 DEC SP
51868 DEC SP
51869 POP HL
51870 RL H
51872 RL L
51874 RRA
51875 RL H
51877 RL L
51879 RLA
51880 PUSH HL
51881 DEC SP
51882 DEC SP
51883 POP HL
51884 RL H
51886 RL L
51888 RRA
51889 RL H
51891 RL L
51893 RLA
51894 PUSH HL
51895 DEC SP
51896 DEC SP
51897 POP HL
51898 RL H
51900 RL L
51902 RRA
51903 RL H
51905 RL L
51907 RLA
51908 PUSH HL
51909 DEC SP
51910 DEC SP
51911 POP HL
51912 RL H
51914 RL L
51916 RRA
51917 RL H
51919 RL L
51921 RLA
51922 PUSH HL
51923 DEC SP
51924 DEC SP
51925 POP HL
51926 RL H
51928 RL L
51930 RRA
51931 RL H
51933 RL L
51935 RLA
51936 PUSH HL
51937 DEC SP
51938 DEC SP
51939 POP HL
51940 RL H
51942 RL L
51944 RRA
51945 RL H
51947 RL L
51949 RLA
51950 PUSH HL
51951 DEC SP
51952 DEC SP
51953 POP HL
51954 RL H
51956 RL L
51958 RRA
51959 RL H
51961 RL L
51963 RLA
51964 PUSH HL
51965 DEC SP
51966 DEC SP
51967 POP HL
51968 RL H
51970 RL L
51972 RRA
51973 RL H
51975 RL L
51977 RLA
51978 PUSH HL
51979 DEC SP
51980 DEC SP
51981 POP HL Shift the leftmost two bytes two pixels to the left and step onto the next row.
51982 RL H
51984 RL L
51986 RRA
51987 RL H
51989 RL L
51991 PUSH HL
51992 DEC SP
51993 DEC SP
51994 DEC B Decrease the row count and jump back until every row of the buffer has been shifted.
51995 JP NZ,ShiftViewLeftPixels_Loop
51998 LD SP,(23770) Restore the stack pointer.
52002 RET Return.
Prev: 51735 Up: Map Next: 52003