![]() |
Routines |
| Prev: E728 | Up: Map | Next: E79B |
|
Used by the routine at E41D.
|
||||
| ClearCharacterItems | E77A | PUSH HL | Stash HL, BC and DE on the stack. | |
| E77B | PUSH BC | |||
| E77C | PUSH DE | |||
| E77D | LD IX,$81F8 | IX=ScreenBuffer_Locations. | ||
|
The number of rows to blank.
|
||||
| E781 | LD C,$20 | C=20 (rows). | ||
|
Fetch the screen buffer address.
|
||||
| ClearCharacterItems_NextLine | E783 | LD L,(IX+$00) | L=IX+00. | |
| E786 | LD H,(IX+$01) | H=IX+01. | ||
|
The number of columns to blank.
|
||||
| E789 | LD B,$0F | B=0F. | ||
| ClearCharacterItems_Loop | E78B | LD (HL),$00 | Write 00 to *HL. | |
| E78D | INC HL | Increment HL by one. | ||
| E78E | 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.
|
||||
| E790 | INC IX | Increment IX by two. | ||
| E792 | INC IX | |||
|
Keep looping until all rows have been blanked.
|
||||
| E794 | DEC C | Decrease C by one. | ||
| E795 | JR NZ,ClearCharacterItems_NextLine | Jump to ClearCharacterItems_NextLine until C is zero. | ||
|
Restore the registers and return.
|
||||
| E797 | POP DE | Restore DE, BC and HL from the stack. | ||
| E798 | POP BC | |||
| E799 | POP HL | |||
| E79A | RET | Return. | ||
| Prev: E728 | Up: Map | Next: E79B |