![]() |
Routines |
| Prev: 58476 | Up: Map | Next: 58509 |
|
Used by the routine at 57069.
|
||||
| Home_DefaultAttributes | 58485 | LD DE,22562 | DE=22562 (attribute buffer location). | |
| 58488 | LD HL,58542 | HL=HomeAttributes. | ||
|
The home block is 4x4 (4 rows of 4 bytes) but not all of it cycles attributes. Only 3x4 is used here.
|
||||
| 58491 | LD B,4 | Set a counter in B for 4 rows. | ||
| Home_DefaultAttributes_Loop | 58493 | PUSH BC | Stash the row counter on the stack. | |
| 58494 | LD BC,3 | Copy 0003 bytes from the attribute buffer to HomeAttributes. | ||
| 58497 | LDIR | |||
|
One full row is 32 bytes, so this is 3 bytes less than one row. Hence this moves down one row, but back to the start of the line.
|
||||
| 58499 | EX DE,HL | Add 0029 to the attribute buffer position. | ||
| 58500 | LD BC,29 | |||
| 58503 | ADD HL,BC | |||
| 58504 | EX DE,HL | |||
| 58505 | POP BC | Restore the row counter from the stack. | ||
| 58506 | DJNZ Home_DefaultAttributes_Loop | Decrease the row counter by one and loop back to Home_DefaultAttributes_Loop until all the rows have been updated. | ||
| 58508 | RET | Return. | ||
| Prev: 58476 | Up: Map | Next: 58509 |