Prev: 90D0 Up: Map Next: 9229
9200: Draw Background
Used by the routines at Demo_Mode, Start_1UP_Game and Start_2UP_Game.
Input
A Background to display
DrawBackground 9200 LD ($5F00),A Write A to Background_Reference.
9203 CALL Change_Background Call Change_Background.
9206 LD A,$48 Call Screen_Calc using 48. On return HL=4820.
9208 CALL Screen_Calc
920B LD B,$40 Set a counter of 40.
920D LD DE,$8000 DE=Shadow_Buffer.
DrawBackground_Loop 9210 PUSH HL Push HL onto the stack.
9211 PUSH DE Push DE onto the stack.
This entry point is used by the routine at B2FB.
DrawBackground_0 9212 PUSH BC Push BC onto the stack.
9213 LD BC,$0020 Copy 20 bytes of data from HL to DE.
9216 LDIR
9218 POP BC Restore BC, DE and HL from the stack.
9219 POP DE
921A POP HL
921B CALL ScreenPos1PixelBelow Call ScreenPos1PixelBelow.
921E PUSH BC Stash the counter on the stack.
921F LD BC,$0020 BC=0020.
9222 EX DE,HL DE+=BC.
9223 ADD HL,BC
9224 EX DE,HL
9225 POP BC Restore the counter from the stack.
9226 DJNZ DrawBackground_Loop Decrease counter by one and loop back to DrawBackground_Loop until counter is zero.
9228 RET Return.
Prev: 90D0 Up: Map Next: 9229