![]() |
Routines |
| Prev: 5FB1 | Up: Map | Next: 6009 |
|
Used by the routine at GameInitialisation.
Resets the frame counter, the number of lives and the score, creates a new game, and then falls into the main loop.
|
||||
| StartGame | 5FEF | XOR A | Write 00 to | |
| 5FF0 | LD ($5C78),A | |||
| 5FF3 | LD ($5E74),A | |||
|
Reset the players life count.
|
||||
| 5FF6 | LD A,$03 | Set the number of lives to 03. | ||
| 5FF8 | LD ($5E3D),A | |||
|
Reset the players score (03 digits).
|
||||
| 5FFB | LD HL,$5E4C | Point HL at the score (Score_1). | ||
| 5FFE | LD B,$03 | Set the byte counter to 03 as the score is held in three bytes. | ||
| ResetScore_Loop | 6000 | LD (HL),$00 | Clear a byte of the score. | |
| 6002 | INC HL | Move on to the next byte of the score. | ||
| 6003 | DJNZ ResetScore_Loop | Decrease the byte counter by one and loop back to ResetScore_Loop until the whole score has been cleared. | ||
| 6005 | EI | Enable interrupts. | ||
| 6006 | CALL NewGame | Set up a new game using NewGame. | ||
|
View the equivalent code in;
|
||||
| Prev: 5FB1 | Up: Map | Next: 6009 |