![]() |
Routines |
| Prev: 35082 | Up: Map | Next: 35143 |
|
Write D over a block of attributes, B columns wide and C rows high, stepping up a row at a time. Empty (zero) attributes are left alone.
|
||||||||||||||
| FillAttributeRow | 35121 | PUSH BC | Stash the counters and attribute address. | |||||||||||
| 35122 | PUSH HL | |||||||||||||
| FillAttributeRow_Loop | 35123 | LD A,(HL) | Jump to FillAttributeRow_NextColumn if this attribute is empty. | |||||||||||
| 35124 | AND A | |||||||||||||
| 35125 | JR Z,FillAttributeRow_NextColumn | |||||||||||||
| 35127 | LD (HL),D | Write the fill colour. | ||||||||||||
| FillAttributeRow_NextColumn | 35128 | INC L | Move onto the next column and loop back to FillAttributeRow_Loop. | |||||||||||
| 35129 | DJNZ FillAttributeRow_Loop | |||||||||||||
| 35131 | POP HL | Restore this row and step up one attribute row. | ||||||||||||
| 35132 | LD BC,32 | |||||||||||||
| 35135 | AND A | |||||||||||||
| 35136 | SBC HL,BC | |||||||||||||
| 35138 | POP BC | |||||||||||||
| 35139 | DEC C | Decrease the height and loop back to FillAttributeRow until every row is painted. | ||||||||||||
| 35140 | JR NZ,FillAttributeRow | |||||||||||||
| 35142 | RET | Return. | ||||||||||||
| Prev: 35082 | Up: Map | Next: 35143 |