Prev: 915A Up: Map Next: 918D
9163: Paint Header And Footer
Used by the routine at Initialise_SubGame.
PaintHeaderFooter 9163 LD A,($99CC) A=*99CC.
9166 LD C,A Stash this value temporarily in C.
9167 AND %00111000 Keep only bits 3-5.
9169 RRCA RRCA.
916A RRCA
916B RRCA
916C OUT ($FE),A Set border to the colour held by A.
916E LD ($99CC),A Write A to *99CC.
9171 LD A,C Restore the original value of A.
9172 LD HL,$5800 HL=5800 (screen buffer location).
9175 CALL Handler_PaintHeaderFooter Call Handler_PaintHeaderFooter.
9178 LD HL,$5AA0 HL=5AA0 (attribute buffer location).
917B CALL Handler_PaintHeaderFooter Call Handler_PaintHeaderFooter.
917E LD B,$12 Set a counter in B for the playarea height: 12.
9180 LD DE,$001F DE=001F.
9183 LD HL,$5860 HL=5860 (attribute buffer location).
PaintRightHandSide_Loop 9186 LD (HL),A Write A to *HL.
9187 ADD HL,DE HL+=DE.
9188 LD (HL),A Write A to *HL.
9189 INC HL Increment HL by one.
918A DJNZ PaintRightHandSide_Loop Decrease counter by one and loop back to PaintRightHandSide_Loop until counter is zero.
918C RET Return.
Prev: 915A Up: Map Next: 918D