Prev: 41349 Up: Map Next: 41390
41372: Add Points To Score
Used by the routine at HandlerBatlet.
Input
BC Points to add to score
AddPointsToScore 41372 LD HL,24108 HL=Score_3.
41375 LD A,(HL) A=score byte #3.
41376 ADD A,C Add C to score byte #3 with BCD conversion.
41377 DAA
41378 LD (HL),A Update score byte #3.
41379 DEC HL Move onto the next score byte.
41380 LD A,(HL) A=score byte #2.
41381 ADC A,B Add (with carry) B to score byte #2 with BCD conversion.
41382 DAA
41383 LD (HL),A Update score byte #2.
41384 DEC HL Move onto the next score byte.
41385 LD A,(HL) A=score byte #1.
41386 ADC A,0 Add 0 (i.e. just the carry flag) to score byte #1 with BCD conversion.
41388 DAA
41389 LD (HL),A Update score byte #1.
View the equivalent code in;
Prev: 41349 Up: Map Next: 41390