Prev: 7378 Up: Map Next: 7415
73D3: Check High Score
Used by the routine at GameOver_1UP.
CheckHighScore 73D3 LD HL,($5F0E) HL=1UP_Score_1.
73D6 LD DE,($5F11) DE=2UP_Score_1.
73DA LD A,L
73DB LD L,H
73DC LD H,A
73DD LD A,E
73DE LD E,D
73DF LD D,A
73E0 AND A
73E1 SBC HL,DE
73E3 JR C,CheckHighScore_0
73E5 JR NZ,CheckHighScore_5
73E7 LD A,($5F10) Compare 1UP_Score_3 against 2UP_Score_3.
73EA LD E,A
73EB LD A,($5F13)
73EE CP E
73EF JR C,CheckHighScore_5
CheckHighScore_0 73F1 LD HL,$5F11 HL=2UP_Score_1.
CheckHighScore_1 73F4 PUSH HL Stash HL on the stack.
73F5 LD DE,$5F09 DE=HighScore_1.
73F8 LD B,$03 B=03 (scores are held in three digits).
CheckHighScore_2 73FA LD A,(DE)
73FB CP (HL)
73FC JR C,CheckHighScore_4
73FE JR NZ,CheckHighScore_3
7400 INC HL
7401 INC DE
7402 DJNZ CheckHighScore_2
CheckHighScore_3 7404 POP HL Restore HL from the stack.
7405 RET Return.
CheckHighScore_4 7406 POP HL Restore HL from the stack.
7407 LD DE,$5F09 DE=HighScore_1.
740A LD BC,$0003 BC=0003 (scores are held in three digits).
740D LDIR
740F RET Return.
CheckHighScore_5 7410 LD HL,$5F0E HL=1UP_Score_1.
7413 JR CheckHighScore_1 Jump to CheckHighScore_1.
View the equivalent code in;
Prev: 7378 Up: Map Next: 7415