![]() |
Routines |
| Prev: 812D | Up: Map | Next: 8179 |
|
||||||||
|
Two routines used in both menus - one routine to clear screen pixels, the second to clear the screen colours.
Clear the screen (pixels):
|
||||||||
| 815B | LD HL,$4000 | Top left of screen display | ||||||
| 815E | LD DE,$1800 | Number of bytes to clear | ||||||
| 8161 | LD (HL),$00 | Clear screen pixels | ||||||
| 8163 | INC HL | Move to next screen byte position | ||||||
| 8164 | DEC DE | Decrement byte counter | ||||||
| 8165 | LD A,E | |||||||
| 8166 | OR D | |||||||
| 8167 | JR NZ,$8161 | Keep clearing until counter = 0 | ||||||
| 8169 | RET | |||||||
|
Clear the screen (colours):
|
||||||||
| 816A | LD HL,$5800 | Top left of (attribute) screen display | ||||||
| 816D | LD DE,$0300 | Number of bytes | ||||||
| 8170 | LD C,A | Retrieve attribute/colour value to use | ||||||
| 8171 | LD (HL),C | Put colour on screen | ||||||
| 8172 | INC HL | Advance to next screen square | ||||||
| 8173 | DEC DE | Decrement byte counter | ||||||
| 8174 | LD A,E | |||||||
| 8175 | OR D | |||||||
| 8176 | JR NZ,$8171 | Keep colouring until counter = 0 | ||||||
| 8178 | RET | |||||||
| Prev: 812D | Up: Map | Next: 8179 |