![]() |
Routines |
| Prev: 50387 | Up: Map | Next: 50469 |
|
Used by the routines at DisplayObjectsCarried, DisplaySunMoonFrame, SetBorderAttributes, ColourSunMoon and DrawChangedObjects.
Fills a rectangle of the screen buffer, or of the attribute file, with one byte. The rows of the rectangle are 32 bytes apart.
|
||||||||||||||
|
Fill each line of the rectangle, then move down a row.
|
||||||||||||||
| FillWindow | 50453 | LD DE,32 | Set DE to the length of a line. | |||||||||||
| FillWindow_Line | 50456 | PUSH BC | Stash the width and height on the stack. | |||||||||||
| 50457 | PUSH HL | Stash the address of the start of the line on the stack. | ||||||||||||
| FillWindow_Byte | 50458 | LD (HL),A | Fill a byte. | |||||||||||
| 50459 | INC HL | Move on to the next byte. | ||||||||||||
| 50460 | DJNZ FillWindow_Byte | Jump to FillWindow_Byte until the line is filled. | ||||||||||||
| 50462 | POP HL | Restore the address of the start of the line from the stack. | ||||||||||||
| 50463 | ADD HL,DE | Move on to the next line. | ||||||||||||
| 50464 | POP BC | Restore the width and height from the stack. | ||||||||||||
| 50465 | DEC C | Decrease the number of lines left. | ||||||||||||
| 50466 | JR NZ,FillWindow_Line | Jump to FillWindow_Line until all of the lines have been filled. | ||||||||||||
| 50468 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 50387 | Up: Map | Next: 50469 |