Prev: BAC2 Up: Map Next: BAE4
BAD0: Decrement score — digit 3 (lowest significant)
Reads digits 3–4 from var_score_digits34 into HL. Decrements L (digit 3).
If underflow, calls score_borrow_lo (borrow from digit 4).
Input
B Number of times to decrement (DJNZ)
score_dec_lo BAD0 LD HL,($C348) Load digits 3–4 of score from var_score_digits34 into HL
BAD3 LD A,L A = L; DEC A (decrement digit 3)
BAD4 DEC A
BAD5 CP $2F CP $2F — check for underflow below '0'
BAD7 CALL Z,score_borrow_lo If underflow, call score_borrow_lo (borrow from digit 4)
BADA LD L,A LD L,A
BADB LD ($C348),HL Store HL to var_score_digits34
BADE DJNZ score_dec_lo DJNZ $BAD0
BAE0 CALL draw_hud CALL $B9AF ; Refresh HUD
BAE3 RET
Prev: BAC2 Up: Map Next: BAE4