![]() |
Routines |
| Prev: F52A | Up: Map | Next: F56A |
|
Used by the routine at game_over.
Compares the current player's score as printed on the panel (six characters from p1_score_digits) with the high score (hiscore_digits), digit by digit from the left, and copies it over if it is greater.
|
||||
| check_high_score | F54D | LD HL,hiscore_digits | The score's six digits against the high score's | |
| F550 | LD DE,p1_score_digits | |||
| F553 | LD B,$06 | |||
| check_high_score_0 | F555 | LD A,(DE) | A digit less: not a high score | |
| F556 | CP (HL) | |||
| F557 | RET C | |||
| F558 | JR NZ,check_high_score_1 | Equal: the next digit | ||
| F55A | INC HL | |||
| F55B | INC DE | |||
| F55C | DJNZ check_high_score_0 | |||
| check_high_score_1 | F55E | LD DE,hiscore_digits | Greater: the new high score | |
| F561 | LD HL,p1_score_digits | |||
| F564 | LD BC,$0006 | |||
| F567 | LDIR | |||
| F569 | RET | |||
| Prev: F52A | Up: Map | Next: F56A |