![]() |
Routines |
| Prev: 54100 | Up: Map | Next: 54142 |
|
Used by the routines at ReloadRevolver and TakeFromBounty.
Subtracts an amount from Bounty, as AddToBounty adds to it.
|
||||||||||||
|
Subtract the lowest two digits.
|
||||||||||||
| SubtractFromBounty | 54123 | LD HL,41561 | Point HL at Bounty_LastByte. | |||||||||
| 54126 | LD A,(HL) | Subtract the lower two digits. | ||||||||||
| 54127 | SUB C | |||||||||||
| 54128 | DAA | Make it decimal. | ||||||||||
| 54129 | LD (HL),A | Store the lowest two digits of Bounty. | ||||||||||
| 54130 | DEC HL | Move on to the next byte. | ||||||||||
|
Subtract the middle two digits.
|
||||||||||||
| 54131 | LD A,(HL) | Subtract the next two digits and the carry. | ||||||||||
| 54132 | SBC A,B | |||||||||||
| 54133 | DAA | Make it decimal. | ||||||||||
| 54134 | LD (HL),A | Store the middle two digits of Bounty. | ||||||||||
| 54135 | DEC HL | Move on to the next byte. | ||||||||||
|
Subtract the highest two digits.
|
||||||||||||
| 54136 | LD A,(HL) | Subtract the carry. | ||||||||||
| 54137 | SBC A,0 | |||||||||||
| 54139 | DAA | Make it decimal. | ||||||||||
| 54140 | LD (HL),A | Store the highest two digits of Bounty. | ||||||||||
| 54141 | RET | Return. | ||||||||||
| Prev: 54100 | Up: Map | Next: 54142 |