Routines |
Prev: 39116 | Up: Map | Next: 39210 |
|
||||
Preserve the current registers.
|
||||
ControlCode_BlankScreen | 39171 | PUSH DE | Stash DE and BC on the stack. | |
39172 | PUSH BC | |||
First blank the attribute buffer.
|
||||
39173 | LD HL,22528 | HL=22528 (attribute buffer location). | ||
39176 | LD DE,22529 | DE=22529. | ||
39179 | LD BC,767 | BC=767. | ||
39182 | HALT | Halt operation (suspend CPU until the next interrupt). | ||
39183 | LD (HL),0 | Write INK: BLACK, PAPER: BLACK to *HL. | ||
39185 | LDIR | Copy the 0 to the rest of the attribute buffer. | ||
Next blank the screen buffer.
|
||||
39187 | LD B,192 | Set a counter in B of 192; which is 24 rows x 8 pixels in each. | ||
39189 | LD HL,16384 | HL=16384 (screen buffer location). | ||
BlankPixelLine_Loop | 39192 | LD C,L | Save the row start in C. | |
39193 | LD A,32 | Set a counter in A of 32 for the number of bytes in a row. | ||
BlankByte_Loop | 39195 | LD (HL),0 | Write 0 to *HL. | |
39197 | INC L | Move to the next byte in this line. | ||
39198 | DEC A | Decrease the byte counter by one. | ||
39199 | JR NZ,BlankByte_Loop | Jump back to BlankByte_Loop until the byte clearing is done for this pixel row. | ||
39201 | LD L,C | Back to the start of the line. | ||
39202 | CALL NextScreenBufferLine | Call NextScreenBufferLine. | ||
39205 | DJNZ BlankPixelLine_Loop | Decrease counter by one and loop back to BlankPixelLine_Loop until counter is zero. | ||
39207 | JP ControlCode_FullReturn_1 | Jump to ControlCode_FullReturn_1. |
Prev: 39116 | Up: Map | Next: 39210 |