Prev: D658 Up: Map Next: D6C6
D6A1: Fill a rectangle with a color attribute in the attribute file
Used by the routines at A34D and BADC.
Input
HL Points to the address in the attributte file for the top-left corner of the rectangle to fill
A Fill color attribute
B Height of the rectangle
E Width of the rectangle
D6A1 PUSH AF Save AF, DE, BC and HL
D6A2 PUSH DE
D6A3 PUSH BC
D6A4 PUSH HL
D6A5 LD ($A22C),A Save color attribute at A22C
D6A8 LD A,E Save width at A22E
D6A9 LD ($A22E),A
D6AC PUSH BC Save BC and HL briefly
D6AD PUSH HL
D6AE LD A,($A22E) Save width at B
D6B1 LD B,A
D6B2 LD A,($A22C) Set color attribute into attribute file
D6B5 LD (HL),A
D6B6 INC HL Increment pointer to the attribute file
D6B7 DJNZ $D6B5 Jump back while there are columns to fill
D6B9 POP HL Restore HL
D6BA LD DE,$0020 Increment pointer to attribute file to the next row
D6BD ADD HL,DE
D6BE POP BC Restore BC
D6BF DJNZ $D6AC Jump back while there are rows to fill
D6C1 POP HL Restore HL, BC, DE and AF
D6C2 POP BC
D6C3 POP DE
D6C4 POP AF
D6C5 RET
Prev: D658 Up: Map Next: D6C6