![]() |
Routines |
| Prev: D354 | Up: Map | Next: D37E |
|
Used by the routines at ReloadRevolver and TakeFromBounty.
Subtracts an amount from Bounty, as AddToBounty adds to it.
|
||||||||||||
|
Subtract the lowest two digits.
|
||||||||||||
| SubtractFromBounty | D36B | LD HL,$A259 | Point HL at Bounty_LastByte. | |||||||||
| D36E | LD A,(HL) | Subtract the lower two digits. | ||||||||||
| D36F | SUB C | |||||||||||
| D370 | DAA | Make it decimal. | ||||||||||
| D371 | LD (HL),A | Store the lowest two digits of Bounty. | ||||||||||
| D372 | DEC HL | Move on to the next byte. | ||||||||||
|
Subtract the middle two digits.
|
||||||||||||
| D373 | LD A,(HL) | Subtract the next two digits and the carry. | ||||||||||
| D374 | SBC A,B | |||||||||||
| D375 | DAA | Make it decimal. | ||||||||||
| D376 | LD (HL),A | Store the middle two digits of Bounty. | ||||||||||
| D377 | DEC HL | Move on to the next byte. | ||||||||||
|
Subtract the highest two digits.
|
||||||||||||
| D378 | LD A,(HL) | Subtract the carry. | ||||||||||
| D379 | SBC A,$00 | |||||||||||
| D37B | DAA | Make it decimal. | ||||||||||
| D37C | LD (HL),A | Store the highest two digits of Bounty. | ||||||||||
| D37D | RET | Return. | ||||||||||
| Prev: D354 | Up: Map | Next: D37E |