![]() |
Routines |
| Prev: 24935 | Up: Map | Next: 25033 |
|
Check _CURRENT_SCORE and copy it into _HIGH_SCORE if it's greater. Zero _CURRENT_SCORE ready for next game and print the high score, including label, regardless of whether it got incremented.
Used by the routine at start.
|
||||
| reset_score_update_high | 24989 | LD DE,(_CURRENT_SCORE) | Current score in DE | |
| 24993 | LD HL,(_HIGH_SCORE) | High score in HL | ||
| 24996 | OR A | Clear flags | ||
| 24997 | SBC HL,DE | Subtract current from high | ||
| 24999 | JR NC,reset_score_update_high_0 | No carry means current less than high | ||
| 25001 | LD (_HIGH_SCORE),DE | Carry, so copy current into high | ||
| reset_score_update_high_0 | 25005 | LD HL,0 | Zero score ready for next game | |
| 25008 | LD (_CURRENT_SCORE),HL | |||
|
This entry point is used by the routine at draw_lives_remaining.
|
||||
| print_high_score | 25011 | CALL print_string_at_caller | Print string which follows this instruction | |
| 25014 | DEFB 21,0 | Print HIGH top right | ||
| 25016 | DEFM "HIGH ",0 | |||
| 25022 | LD BC,26 | cy=0, cx=26 | ||
| 25025 | LD HL,(_HIGH_SCORE) | Pick up high score number | ||
| 25028 | LD A,5 | Length of 5 chars | ||
| 25030 | JP print_score | Print it | ||
| Prev: 24935 | Up: Map | Next: 25033 |