| Routines

7591: Insert a pixel column into a graphic buffer

Used by the routine at 755A. Slides the current contents of a row of the graphic buffer (at EB00, EC00 or ED00) one pixel to the left, and places the new pixel column into the slot freed up on the right.
Input
A | Pixel column byte
DE | Graphic buffer address
7591 | PUSH DE |
7592 | EXX |
7593 | POP HL | HL'=graphic buffer address
7594 | LD C,$08 | There are 8 pixels to insert into the column
7596 | LD B,$08 | There are 8 bytes per row in the buffer
7598 | RRCA | Push a pixel into the carry flag
7599 | RL (HL) | Drag the pixel from the carry flag into the buffer, and slide all the other pixels in the row one to the left
759B | DEC HL
759C | DJNZ $7599
759E | DEC C | Next pixel
759F | JR NZ,$7596 | Jump back until all 8 pixels have been inserted
75A1 | EXX |
75A2 | RET |