Prev: 43197 Up: Map Next: 43227
43212: Next Screen Buffer Line
Input
HL Current screen buffer location
Output
HL Next line down in screen memory
Moves down one pixel line in screen buffer memory, handling all screen boundary calculations.
The ZX Spectrum screen buffer is divided into three sections, each containing 8 character rows of 8 pixels each.
NextScreenBufferLine 43212 INC H Move down one pixel line.
43213 LD A,H Check if we've reached a character boundary.
43214 AND %00000111
43216 RET NZ Return if this is not at a screen boundary.
43217 LD A,L Move down one character block line.
43218 ADD A,32
43220 LD L,A
43221 RET C Return if we wrapped.
43222 LD A,H Move to the next third of the screen.
43223 SUB 8
43225 LD H,A
43226 RET Return.
Prev: 43197 Up: Map Next: 43227