Prev: E661 Up: Map Next: E682
E66A: Routine at E66A
Used by the routine at E396.
E66A LD DE,$5822 DE=5822 (attribute buffer location).
E66D LD HL,$E6A3 HL=HomeAttributes.
The home block is 04x04 (04 rows of 04 bytes) but not all of it cycles attributes. Only 03x04 is used here.
E670 LD B,$04 Set a counter in B for 04 rows.
E672 PUSH BC Stash the row counter on the stack.
E673 LD BC,$0003 Copy 0003 bytes from the attribute buffer to HomeAttributes.
E676 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.
E678 EX DE,HL Add 001D to the attribute buffer position.
E679 LD BC,$001D
E67C ADD HL,BC
E67D EX DE,HL
E67E POP BC Restore the row counter from the stack.
E67F DJNZ $E672 Decrease the row counter by one and loop back to E672 until all the rows have been updated.
E681 RET Return.
Prev: E661 Up: Map Next: E682