Prev: 9126 Up: Map Next: 915A
9134: Copy Buffer To Screen
Used by the routine at Initialise_SubGame.
CopyBufferToScreen 9134 LD BC,$2012 Set the size of the playarea in BC (width 20 height 12).
9137 LD HL,$78C0 HL=78C0.
CopyBufferToScreen_Loop 913A PUSH BC Stash the playarea size and HL on the stack.
913B PUSH HL
913C CALL $9562 Call 9562.
913F POP HL Restore HL from the stack.
9140 INC HL Increment HL by two.
9141 INC HL
9142 POP BC Restore the playarea size from the stack.
9143 DJNZ CopyBufferToScreen_Loop Decrease the playarea width counter by one and loop back to CopyBufferToScreen_Loop the whole width has been drawn for this line.
9145 LD B,$20 Reset the playarea width in B back to 20.
9147 DEC C Decrease the playarea height counter by one.
9148 JR NZ,CopyBufferToScreen_Loop Jump to CopyBufferToScreen_Loop until all the playarea lines have been drawn.
914A LD HL,$4040 HL=4040 (screen buffer location).
914D LD C,$20 C=20.
914F CALL ClearScreenArea Call ClearScreenArea.
9152 LD HL,$50A0 HL=50A0 (screen buffer location).
9155 LD C,$60 C=60.
9157 JP ClearScreenArea Jump to ClearScreenArea.
Prev: 9126 Up: Map Next: 915A