Prev: 5FB1 Up: Map Next: 6028
5FEF: Start Game
Used by the routine at GameInitialisation.
StartGame 5FEF XOR A Write 00 to
5FF0 LD ($5C78),A
5FF3 LD ($5E74),A
Reset the players life count.
5FF6 LD A,$03 Write starting lives to Player_Lives.
5FF8 LD ($5E3D),A
Reset the players score (03 digits).
5FFB LD HL,$5E4C HL=Score_1.
5FFE LD B,$03 B=03.
ResetScore_Loop 6000 LD (HL),$00 Write 00 to HL.
6002 INC HL Increment HL by one.
6003 DJNZ ResetScore_Loop Decrease counter by one and loop back to ResetScore_Loop until counter is zero.
6005 EI Enable interrupts.
6006 CALL GameInit Call GameInit.
This entry point is used by the routines at HandlerCup and 6A73.
StartGame_0 6009 LD IX,$5E80 IX=5E80.
600D LD SP,$5E00 Set the stack pointer to 5E00.
This entry point is used by the routine at 6A73.
MainLoop 6010 LD HL,$6A73 HL=6A73.
6013 PUSH HL Stash HL on the stack.
6014 LD HL,$6028 HL=JumpTable_Main.
6017 LD A,(IX+$00)
601A RLCA
601B AND %01111110 Keep only bits 1-6.
601D LD C,A Create an offset in BC.
601E LD B,$00
6020 ADD HL,BC HL=HL + offset.
6021 LD A,(HL) HL=address from JumpTable_Main + offset.
6022 INC HL
6023 LD H,(HL)
6024 LD L,A
6025 JP $5CB0 Jump to 5CB0.
View the equivalent code in;
Prev: 5FB1 Up: Map Next: 6028