![]() |
Routines |
| Prev: 9EFE | Up: Map | Next: 9F44 |
|
Clears the pixels of the playfield, which is 1C bytes wide and A0 rows high.
|
||||||||
| ClearPlayfield | 9F2C | LD HL,$B708 | Use the bottom left of the playfield. | |||||
| 9F2F | CALL GetScreenAddress | Find the screen address. | ||||||
| 9F32 | LD C,$A0 | Set the number of rows to A0. | ||||||
| ClearPlayfield_Row | 9F34 | LD B,$1C | Set the number of bytes in a row to 1C. | |||||
| 9F36 | PUSH HL | Save the address of the start of the row. | ||||||
| ClearPlayfield_Byte | 9F37 | LD (HL),$00 | Clear a byte. | |||||
| 9F39 | INC HL | Move on to the next byte. | ||||||
| 9F3A | DJNZ ClearPlayfield_Byte | Loop back to ClearPlayfield_Byte for each byte of the row. | ||||||
| 9F3C | POP HL | Restore the address of the start of the row. | ||||||
| 9F3D | CALL MoveUpARow | Move up to the next row. | ||||||
| 9F40 | DEC C | Decrease the number of rows. | ||||||
| 9F41 | JR NZ,ClearPlayfield_Row | Loop back to ClearPlayfield_Row for each row. | ||||||
| 9F43 | RET | Return. | ||||||
| Prev: 9EFE | Up: Map | Next: 9F44 |