Prev: A8BD Up: Map Next: A8DB
A8CC: 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 08 character rows of 08 pixels each.
NextScreenBufferLine A8CC INC H Move down one pixel line.
A8CD LD A,H Check if we've reached a character boundary.
A8CE AND %00000111
A8D0 RET NZ Return if this is not at a screen boundary.
A8D1 LD A,L Move down one character block line.
A8D2 ADD A,$20
A8D4 LD L,A
A8D5 RET C Return if we wrapped.
A8D6 LD A,H Move to the next third of the screen.
A8D7 SUB $08
A8D9 LD H,A
A8DA RET Return.
Prev: A8BD Up: Map Next: A8DB