![]() |
Routines |
| Prev: 6998 | Up: Map | Next: 69BC |
|
Used by the routine at ClearPixels.
Sets or clears a block of pixels, going up from the bottom row and across from the left column. Which of the two depends on the operands that have been written by ClearPixels or SetPixels.
|
|||||||||||||||||
| PlotPixels | 699D | PUSH BC | Stash BC and HL on the stack. | ||||||||||||||
| 699E | PUSH HL | ||||||||||||||||
| 699F | LD A,L | A=L. | |||||||||||||||
| 69A0 | CPL | Flip the bits. | |||||||||||||||
| 69A1 | RLCA | A=A * 08. | |||||||||||||||
| 69A2 | RLCA | ||||||||||||||||
| 69A3 | RLCA | ||||||||||||||||
| 69A4 | AND %00111000 | Keep only bits 3-5. | |||||||||||||||
|
|||||||||||||||||
| 69A6 | OR %11000110 | Set bits 1-2, 6-7 (this operand is modified). | |||||||||||||||
| 69A8 | LD ($69AF),A | Store A as the opcode of the instruction at 69AF. | |||||||||||||||
| 69AB | CALL ScreenAddress | Call ScreenAddress. | |||||||||||||||
| PlotPixels_Column | 69AE | SET 0,(HL) | Set (or reset) the bit of the byte at HL for this pixel. | ||||||||||||||
| 69B0 | CALL ScreenPosition1PixelAbove | Call ScreenPosition1PixelAbove to move up one pixel. | |||||||||||||||
| 69B3 | DJNZ PlotPixels_Column | Decrease the height counter by one and loop back to PlotPixels_Column until the whole column has been set (or cleared). | |||||||||||||||
| 69B5 | POP HL | Restore HL and BC from the stack. | |||||||||||||||
| 69B6 | POP BC | ||||||||||||||||
| 69B7 | INC L | Move on to the next pixel column. | |||||||||||||||
| 69B8 | DEC C | Decrease the width counter by one and loop back to PlotPixels until all of the columns have been done. | |||||||||||||||
| 69B9 | JR NZ,PlotPixels | ||||||||||||||||
| 69BB | RET | Return. | |||||||||||||||
| Prev: 6998 | Up: Map | Next: 69BC |