![]() |
Routines |
| Prev: B56B | Up: Map | Next: B585 |
|
Adds points to the score of the player and then prints the new score. The score is stored as six decimal digits in three bytes.
|
||||||||||||||
| AddPointsToScore | B573 | LD HL,$961D | Point HL at the least significant byte of the score. | |||||||||||
| B576 | LD A,(HL) | Add the units and tens. | ||||||||||||
| B577 | ADD A,C | |||||||||||||
| B578 | DAA | |||||||||||||
| B579 | LD (HL),A | Store the result. | ||||||||||||
| B57A | DEC HL | Move on to the middle byte of the score. | ||||||||||||
| B57B | LD A,(HL) | Add the hundreds and thousands, plus the carry. | ||||||||||||
| B57C | ADC A,B | |||||||||||||
| B57D | DAA | |||||||||||||
| B57E | LD (HL),A | Store the result. | ||||||||||||
| B57F | DEC HL | Move on to the most significant byte of the score. | ||||||||||||
| B580 | LD A,(HL) | Add the carry. | ||||||||||||
| B581 | ADC A,$00 | |||||||||||||
| B583 | DAA | |||||||||||||
| B584 | LD (HL),A | Store the result. | ||||||||||||
|
View the equivalent code in;
Continue on to PrintScore.
|
||||||||||||||
| Prev: B56B | Up: Map | Next: B585 |