Prev: BA4B Up: Map Next: BA62
BA4E: Add B to money (digits 3–4)
Adds B to the lower two ASCII digits of the money counter (var_money_digits34).
Carries into digit 4 via money_carry_lo if needed. Refreshes HUD on exit.
money_add BA4E LD HL,($C340) Load digits 3–4 of money (var_money_digits34) into HL
BA51 LD A,L A = L (units digit)
BA52 INC A INC A
BA53 CP $3A If digit overflows '9' → money_carry_lo (carry into tens digit)
BA55 CALL Z,money_carry_lo
BA58 LD L,A L = A
BA59 LD ($C340),HL Store HL back to var_money_digits34
BA5C DJNZ money_add DJNZ — repeat B times
BA5E CALL draw_hud Refresh HUD (draw_hud)
BA61 RET
Prev: BA4B Up: Map Next: BA62