Prev: BA8C Up: Map Next: BAA3
BA8F: Decrement money by B (payment)
Subtracts B from the lower two ASCII digits of money (var_money_digits34).
Borrows from digit 4 via money_borrow_lo if needed; resets to zero on underflow
via reset_money. Refreshes HUD on exit.
deduct_money BA8F LD HL,($C340) Load digits 3–4 of money (var_money_digits34) into HL
BA92 LD A,L A = L
BA93 DEC A DEC A
BA94 CP $2F If below '0' → borrow from digit 4 (money_borrow_lo)
BA96 CALL Z,money_borrow_lo
BA99 LD L,A L = A
BA9A LD ($C340),HL Store HL back to var_money_digits34
BA9D DJNZ deduct_money DJNZ — repeat B times
BA9F CALL draw_hud Refresh HUD (draw_hud)
BAA2 RET
Prev: BA8C Up: Map Next: BAA3