![]() |
Routines |
| Prev: A185 | Up: Map | Next: A1AE |
|
Used by the routines at PopCreature and HandlerFrankenstein.
Adds some points to the score, which is held as three bytes of BCD starting at Score_1 (the most significant byte is first). It then carries on to print the score.
|
||||||||||||
| AddPointsToScore | A19C | LD HL,$5E2C | Point HL at the last byte of the score at Score_3. | |||||||||
| A19F | LD A,(HL) | Fetch the last byte of the score. | ||||||||||
| A1A0 | ADD A,C | Add C. | ||||||||||
| A1A1 | DAA | Convert the result to BCD. | ||||||||||
| A1A2 | LD (HL),A | Update the last byte of the score. | ||||||||||
| A1A3 | DEC HL | Move on to the middle byte of the score. | ||||||||||
| A1A4 | LD A,(HL) | Fetch the middle byte of the score. | ||||||||||
| A1A5 | ADC A,B | Add B, with the carry. | ||||||||||
| A1A6 | DAA | Convert the result to BCD. | ||||||||||
| A1A7 | LD (HL),A | Update the middle byte of the score. | ||||||||||
| A1A8 | DEC HL | Move on to the first byte of the score. | ||||||||||
| A1A9 | LD A,(HL) | Fetch the first byte of the score. | ||||||||||
| A1AA | ADC A,$00 | Add 00 (i.e. just the carry flag). | ||||||||||
| A1AC | DAA | Convert the result to BCD. | ||||||||||
| A1AD | LD (HL),A | Update the first byte of the score. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: A185 | Up: Map | Next: A1AE |