![]() |
Routines |
| Prev: E46C | Up: Map | Next: E48D |
|
Used by the routine at DEED.
|
||||
| Home_DefaultAttributes | E475 | LD DE,$5822 | DE=5822 (attribute buffer location). | |
| E478 | LD HL,$E4AE | HL=HomeAttributes. | ||
|
The home block is 04x04 (04 rows of 04 bytes) but not all of it cycles attributes. Only 03x04 is used here.
|
||||
| E47B | LD B,$04 | Set a counter in B for 04 rows. | ||
| Home_DefaultAttributes_Loop | E47D | PUSH BC | Stash the row counter on the stack. | |
| E47E | LD BC,$0003 | Copy 0003 bytes from the attribute buffer to HomeAttributes. | ||
| E481 | LDIR | |||
|
One full row is 20 bytes, so this is 03 bytes less than one row. Hence this moves down one row, but back to the start of the line.
|
||||
| E483 | EX DE,HL | Add 001D to the attribute buffer position. | ||
| E484 | LD BC,$001D | |||
| E487 | ADD HL,BC | |||
| E488 | EX DE,HL | |||
| E489 | POP BC | Restore the row counter from the stack. | ||
| E48A | DJNZ Home_DefaultAttributes_Loop | Decrease the row counter by one and loop back to Home_DefaultAttributes_Loop until all the rows have been updated. | ||
| E48C | RET | Return. | ||
| Prev: E46C | Up: Map | Next: E48D |