Prev: B4B8 Up: Map Next: B64C
B591: Routine at B591
Used by the routines at StartGame and B724.
B591 LD A,($C279) A=*C279.
B594 CP (IX+$07) Jump to B56F if A is lower than *IX+07.
B597 JR C,$B56F
B599 LD DE,$0018 DE=0018.
B59C CALL $B64C Call B64C.
B59F LD A,($C276) A=*C276.
B5A2 ADD A,$0C A+=0C.
B5A4 LD ($C276),A Write A back to *C276.
B5A7 LD L,(IX+$10) L=*IX+10.
B5AA LD H,(IX+$11) H=*IX+11.
B5AD LD DE,$0180 DE=0180.
B5B0 ADD HL,DE HL+=DE.
B5B1 LD (IX+$10),L Write L to *IX+10.
B5B4 LD (IX+$11),H Write H to *IX+11.
B5B7 LD (IX+$13),B Write B to *IX+13.
B5BA POP HL Restore HL from the stack.
B5BB CALL $B8A6 Call B8A6.
B5BE LD IX,$C2EE IX=C2EE.
B5C2 LD B,$08 B=08 (counter).
B5C4 LD DE,$000D DE=000D.
B5C7 LD A,(IX+$00) A=*IX+00.
B5CA SUB $0C A-=0C.
B5CC LD (IX+$00),A Write A to *IX+00.
B5CF ADD IX,DE IX+=DE.
B5D1 DJNZ $B5C7 Decrease counter by one and loop back to B5C7 until counter is zero.
B5D3 LD IX,$C293 IX=C293.
B5D7 LD B,$04 B=04.
B5D9 LD DE,$000D DE=000D.
B5DC LD HL,$C38C HL=C38C.
B5DF LD A,(IX+$00) A=*IX+00.
B5E2 SUB $0C A-=0C.
B5E4 CP (HL) Jump to B5EE if A is higher than *HL.
B5E5 JR NC,$B5EE
B5E7 CP $20 Jump to B5EE if A is lower than 20.
B5E9 JR C,$B5EE
B5EB SUB (HL) A-=*HL.
B5EC ADD A,$20 A+=20.
B5EE LD (IX+$00),A Write A to *IX+00.
B5F1 ADD IX,DE IX+=DE.
B5F3 DJNZ $B5DF Decrease counter by one and loop back to B5DF until counter is zero.
B5F5 LD B,$03 B=03.
B5F7 LD A,(IX+$00) A=*IX+00.
B5FA SUB $0C A-=0C.
B5FC LD (IX+$00),A Write A to *IX+00.
B5FF ADD IX,DE IX+=DE.
B601 DJNZ $B5F7 Decrease counter by one and loop back to B5F7 until counter is zero.
This entry point is used by the routine at B4B8.
B603 CALL $B208 Call B208.
B606 CALL $B147 Call B147.
B609 CALL $B3BE Call B3BE.
B60C LD IX,$C293 IX=C293.
B610 LD B,$07 B=07.
B612 PUSH BC Stash BC on the stack.
B613 CALL $C057 Call C057.
B616 LD BC,$000D BC=000D.
B619 ADD IX,BC IX+=BC.
B61B POP BC Restore BC from the stack.
B61C DJNZ $B612 Decrease counter by one and loop back to B612 until counter is zero.
B61E LD IX,$C2D4 IX=C2D4.
B622 CALL $BD27 Call BD27.
B625 LD BC,$000D BC=000D.
B628 ADD IX,BC IX+=BC.
B62A CALL $BD27 Call BD27.
B62D LD HL,$7080 HL=ShadowBuffer_Pixels.
B630 LD BC,$2014 BC=2014.
B633 LD DE,$4040 DE=4040 (screen buffer location).
B636 CALL Copier Call Copier.
B639 LD HL,$7840 HL=ShadowBuffer_Attributes.
B63C LD IX,$5840 IX=5840 (attribute buffer location).
B640 LD BC,$1420 BC=1420.
B643 CALL $B2D1 Call B2D1.
B646 CALL $B416 Call B416.
B649 JP GameLoop Jump to GameLoop.
Prev: B4B8 Up: Map Next: B64C