![]() |
Routines |
| Prev: 62762 | Up: Map | Next: 62826 |
|
Used by the routine at GameOver.
Compares the score at HUDText_Player1ScoreDigits with the high score at HUDText_HighScoreDigits, one digit at a time, starting at the left. If the score is higher it is copied to the high score.
|
||||
| UpdateHighScore | 62797 | LD HL,51734 | The high-score digits. | |
| 62800 | LD DE,51696 | The player 1 score digits. | ||
| 62803 | LD B,6 | B=6. | ||
| UpdateHighScore_Compare | 62805 | LD A,(DE) | Read DE. | |
| 62806 | CP (HL) | Return if A is less than the byte at HL. | ||
| 62807 | RET C | |||
| 62808 | JR NZ,UpdateHighScore_Update | Jump to UpdateHighScore_Update if the zero flag is clear. | ||
| 62810 | INC HL | Advance HL. | ||
| 62811 | INC DE | Advance DE. | ||
| 62812 | DJNZ UpdateHighScore_Compare | Decrease B and jump to UpdateHighScore_Compare until none remain. | ||
| UpdateHighScore_Update | 62814 | LD DE,51734 | The high-score digits. | |
| 62817 | LD HL,51696 | The player 1 score digits. | ||
| 62820 | LD BC,6 | BC=6. | ||
| 62823 | LDIR | Copy BC bytes from HL to DE. | ||
| 62825 | RET | Return. | ||
| Prev: 62762 | Up: Map | Next: 62826 |