![]() |
Routines |
| Prev: C977 | Up: Map | Next: C9E0 |
|
Fills a two-by-two block of screen attributes from HL.
|
||||||||||
|
Set the size of the block.
|
||||||||||
| FillChamber | C9CF | LD BC,$0202 | Set the width and height to 02. | |||||||
| C9D2 | LD DE,$001E | Set the distance to the next row to 1E. | ||||||||
|
Fill each row.
|
||||||||||
| FillChamber_Row | C9D5 | PUSH BC | Stash the width and height on the stack. | |||||||
| FillChamber_Attribute | C9D6 | LD (HL),A | Set an attribute. | |||||||
| C9D7 | INC HL | Move on. | ||||||||
| C9D8 | DJNZ FillChamber_Attribute | Jump to FillChamber_Attribute until the row is done. | ||||||||
| C9DA | ADD HL,DE | Move on to the next row. | ||||||||
| C9DB | POP BC | Restore the width and height from the stack. | ||||||||
| C9DC | DEC C | Jump to FillChamber_Row until all of the rows are done. | ||||||||
| C9DD | JR NZ,FillChamber_Row | |||||||||
| C9DF | RET | Return. | ||||||||
| Prev: C977 | Up: Map | Next: C9E0 |