Prev: D8C0 Up: Map Next: D92E
D909: Fill a rectangle with a color attribute in the attribute file
Used by the routines at A1A5, CE7B and DB96.
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
D909 PUSH AF Save AF, DE, BC and HL
D90A PUSH DE
D90B PUSH BC
D90C PUSH HL
D90D LD ($A093),A Save color attribute at A093
D910 LD A,E Save width at A095
D911 LD ($A095),A
D914 PUSH BC Save BC and HL briefly
D915 PUSH HL
D916 LD A,($A095) Save width at B
D919 LD B,A
D91A LD A,($A093) Set color attribute into attribute file
D91D LD (HL),A
D91E INC HL Increment pointer to the attribute file
D91F DJNZ $D91D Jump back while there are columns to fill
D921 POP HL Restore HL
D922 LD DE,$0020 Increment pointer to attribute file to the next row
D925 ADD HL,DE
D926 POP BC Restore BC
D927 DJNZ $D914 Jump back while there are rows to fill
D929 POP HL Restore HL, BC, DE and AF
D92A POP BC
D92B POP DE
D92C POP AF
D92D RET
Prev: D8C0 Up: Map Next: D92E