Prev: 29560 Up: Map Next: 29717
29651: Check High Score
Used by the routine at GameOver_1UP.
CheckHighScore 29651 LD HL,(24334) HL=1UP_Score_1.
29654 LD DE,(24337) DE=2UP_Score_1.
29658 LD A,L
29659 LD L,H
29660 LD H,A
29661 LD A,E
29662 LD E,D
29663 LD D,A
29664 AND A
29665 SBC HL,DE
29667 JR C,CheckHighScore_0
29669 JR NZ,CheckHighScore_5
29671 LD A,(24336) Compare 1UP_Score_3 against 2UP_Score_3.
29674 LD E,A
29675 LD A,(24339)
29678 CP E
29679 JR C,CheckHighScore_5
CheckHighScore_0 29681 LD HL,24337 HL=2UP_Score_1.
CheckHighScore_1 29684 PUSH HL Stash HL on the stack.
29685 LD DE,24329 DE=HighScore_1.
29688 LD B,3 B=3 (scores are held in three digits).
CheckHighScore_2 29690 LD A,(DE)
29691 CP (HL)
29692 JR C,CheckHighScore_4
29694 JR NZ,CheckHighScore_3
29696 INC HL
29697 INC DE
29698 DJNZ CheckHighScore_2
CheckHighScore_3 29700 POP HL Restore HL from the stack.
29701 RET Return.
CheckHighScore_4 29702 POP HL Restore HL from the stack.
29703 LD DE,24329 DE=HighScore_1.
29706 LD BC,3 BC=0003 (scores are held in three digits).
29709 LDIR
29711 RET Return.
CheckHighScore_5 29712 LD HL,24334 HL=1UP_Score_1.
29715 JR CheckHighScore_1 Jump to CheckHighScore_1.
View the equivalent code in;
Prev: 29560 Up: Map Next: 29717