![]() |
Routines |
| Prev: 59176 | Up: Map | Next: 59291 |
|
Used by the routine at 58397.
|
||||
| ClearCharacterItems | 59258 | PUSH HL | Stash HL, BC and DE on the stack. | |
| 59259 | PUSH BC | |||
| 59260 | PUSH DE | |||
| 59261 | LD IX,33272 | IX=ScreenBuffer_Locations. | ||
|
The number of rows to blank.
|
||||
| 59265 | LD C,32 | C=32 (rows). | ||
|
Fetch the screen buffer address.
|
||||
| ClearCharacterItems_NextLine | 59267 | LD L,(IX+0) | L=IX+0. | |
| 59270 | LD H,(IX+1) | H=IX+1. | ||
|
The number of columns to blank.
|
||||
| 59273 | LD B,15 | B=15. | ||
| ClearCharacterItems_Loop | 59275 | LD (HL),0 | Write 0 to *HL. | |
| 59277 | INC HL | Increment HL by one. | ||
| 59278 | DJNZ ClearCharacterItems_Loop | Decrease counter by one and loop back to ClearCharacterItems_Loop until counter is zero. | ||
|
Move onto the next line down in the screen buffer.
|
||||
| 59280 | INC IX | Increment IX by two. | ||
| 59282 | INC IX | |||
|
Keep looping until all rows have been blanked.
|
||||
| 59284 | DEC C | Decrease C by one. | ||
| 59285 | JR NZ,ClearCharacterItems_NextLine | Jump to ClearCharacterItems_NextLine until C is zero. | ||
|
Restore the registers and return.
|
||||
| 59287 | POP DE | Restore DE, BC and HL from the stack. | ||
| 59288 | POP BC | |||
| 59289 | POP HL | |||
| 59290 | RET | Return. | ||
| Prev: 59176 | Up: Map | Next: 59291 |