![]() |
Routines |
| Prev: 46443 | Up: Map | Next: 46469 |
|
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 | 46451 | LD HL,38429 | Point HL at the least significant byte of the score. | |||||||||||
| 46454 | LD A,(HL) | Add the units and tens. | ||||||||||||
| 46455 | ADD A,C | |||||||||||||
| 46456 | DAA | |||||||||||||
| 46457 | LD (HL),A | Store the result. | ||||||||||||
| 46458 | DEC HL | Move on to the middle byte of the score. | ||||||||||||
| 46459 | LD A,(HL) | Add the hundreds and thousands, plus the carry. | ||||||||||||
| 46460 | ADC A,B | |||||||||||||
| 46461 | DAA | |||||||||||||
| 46462 | LD (HL),A | Store the result. | ||||||||||||
| 46463 | DEC HL | Move on to the most significant byte of the score. | ||||||||||||
| 46464 | LD A,(HL) | Add the carry. | ||||||||||||
| 46465 | ADC A,0 | |||||||||||||
| 46467 | DAA | |||||||||||||
| 46468 | LD (HL),A | Store the result. | ||||||||||||
|
View the equivalent code in;
Continue on to PrintScore.
|
||||||||||||||
| Prev: 46443 | Up: Map | Next: 46469 |