![]() |
Routines |
| Prev: 24497 | Up: Map | Next: 24585 |
|
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 | 24559 | XOR A | Write 0 to | |
| 24560 | LD (23672),A | |||
| 24563 | LD (24180),A | |||
|
Reset the players life count.
|
||||
| 24566 | LD A,3 | Set the number of lives to 3. | ||
| 24568 | LD (24125),A | |||
|
Reset the players score (3 digits).
|
||||
| 24571 | LD HL,24140 | Point HL at the score (Score_1). | ||
| 24574 | LD B,3 | Set the byte counter to 3 as the score is held in three bytes. | ||
| ResetScore_Loop | 24576 | LD (HL),0 | Clear a byte of the score. | |
| 24578 | INC HL | Move on to the next byte of the score. | ||
| 24579 | DJNZ ResetScore_Loop | Decrease the byte counter by one and loop back to ResetScore_Loop until the whole score has been cleared. | ||
| 24581 | EI | Enable interrupts. | ||
| 24582 | CALL NewGame | Set up a new game using NewGame. | ||
|
View the equivalent code in;
|
||||
| Prev: 24497 | Up: Map | Next: 24585 |