![]() |
Routines |
| Prev: F52A | Up: Map | Next: F56A |
|
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 | F54D | LD HL,$CA16 | The high-score digits. | |
| F550 | LD DE,$C9F0 | The player 1 score digits. | ||
| F553 | LD B,$06 | B=06. | ||
| UpdateHighScore_Compare | F555 | LD A,(DE) | Read DE. | |
| F556 | CP (HL) | Return if A is less than the byte at HL. | ||
| F557 | RET C | |||
| F558 | JR NZ,UpdateHighScore_Update | Jump to UpdateHighScore_Update if the zero flag is clear. | ||
| F55A | INC HL | Advance HL. | ||
| F55B | INC DE | Advance DE. | ||
| F55C | DJNZ UpdateHighScore_Compare | Decrease B and jump to UpdateHighScore_Compare until none remain. | ||
| UpdateHighScore_Update | F55E | LD DE,$CA16 | The high-score digits. | |
| F561 | LD HL,$C9F0 | The player 1 score digits. | ||
| F564 | LD BC,$0006 | BC=06. | ||
| F567 | LDIR | Copy BC bytes from HL to DE. | ||
| F569 | RET | Return. | ||
| Prev: F52A | Up: Map | Next: F56A |