Prev: 46975 Up: Map Next: 47006
46991: Add To Score
Used by the routines at Handler_ChangeRoom and Action_Dig.
Add the points in A to the BCD score.
AddToScore 46991 PUSH HL Remember the caller's pointer.
46992 LD HL,(44750) Load the word at the score into HL.
46995 ADD A,L Add the points into the decimal score.
46996 DAA
46997 LD L,A
46998 JR NC,AddToScore_Next Branch to AddToScore_Next when the carry flag is clear.
47000 INC H Advance the count in H.
AddToScore_Next 47001 LD (44750),HL Store HL in the score.
47004 POP HL Restore the caller's pointer from the stack.
47005 RET Return.
View the equivalent code in;
Prev: 46975 Up: Map Next: 47006