![]() |
Routines |
| Prev: 39928 | Up: Map | Next: 39979 |
|
Sets the attributes of a rectangle of character cells to yellow ink on black paper (bright). The rectangle is given in pixels.
|
||||||||||
| Set_Area_Attributes | 39952 | LD E,70 | Set the attribute to 70. | |||||||
| 39954 | CALL AttributeAddress | Convert the position into an address in the attribute buffer. | ||||||||
| 39957 | SRL C | Divide the height by eight to get the number of rows of cells. | ||||||||
| 39959 | SRL C | |||||||||
| 39961 | SRL C | |||||||||
| Set_Area_Attributes_Row_Loop | 39963 | PUSH BC | Stash the counters on the stack. | |||||||
| 39964 | PUSH HL | Stash the address on the stack. | ||||||||
| Set_Area_Attributes_Cell_Loop | 39965 | LD (HL),E | Set the attribute of the cell. | |||||||
| 39966 | INC L | Move on to the next cell. | ||||||||
| 39967 | DJNZ Set_Area_Attributes_Cell_Loop | Decrease the width counter and loop back until the row is done. | ||||||||
| 39969 | POP HL | Restore the address from the stack. | ||||||||
| 39970 | LD BC,32 | Set the size of a row of cells to 32. | ||||||||
| 39973 | ADD HL,BC | Move down to the next row of cells. | ||||||||
| 39974 | POP BC | Restore the counters from the stack. | ||||||||
| 39975 | DEC C | Decrease the row counter and loop back until all of the rows of cells are done. | ||||||||
| 39976 | JR NZ,Set_Area_Attributes_Row_Loop | |||||||||
| 39978 | RET | Return. | ||||||||
| Prev: 39928 | Up: Map | Next: 39979 |