Prev: AEC0 Up: Map Next: AF00
AED9: Increases Wally's step count by one.
Used by the routine at Wally_Jump.
Input
Output
Wally_StepsIncr AED9 LD BC,$0701 Make the sfx for a step.
AEDC LD DE,$0F01
AEDF LD HL,$0404
AEE2 CALL Beep_Effect
AEE5 LD HL,Steps_Count Get the lowest digits for the count and increase by one in BCD.
AEE8 LD A,(HL)
AEE9 ADD A,$01
AEEB DAA
AEEC LD (HL),A
AEED INC HL Continue for each digit using the carry.
AEEE LD A,(HL)
AEEF ADC A,$00
AEF1 DAA
AEF2 LD (HL),A
AEF3 INC HL
AEF4 LD A,(HL)
AEF5 ADC A,$00
AEF7 DAA
AEF8 LD (HL),A
AEF9 INC HL
AEFA LD A,(HL)
AEFB ADC A,$00
AEFD DAA
AEFE LD (HL),A
AEFF RET
Prev: AEC0 Up: Map Next: AF00