Prev: A4A0 Up: Map Next: A4BE
A4B0: Sounds: Bounce
Used by the routine at HandlerWeapon.
Plays a tone of 04 cycles. The half period is made by rotating the counter right three times. The counter is set to 40 and decreased before it is tested for zero, so the routine always carries on and plays the tone, with a half period of E7.
SoundsBounce A4B0 LD D,$40 D=40.
A4B2 DEC D Decrease D by one.
A4B3 RET Z Return if it is zero.
A4B4 LD A,D A=D.
A4B5 RRCA Rotate right three times.
A4B6 RRCA
A4B7 RRCA
A4B8 LD B,A Keep the half period in B.
A4B9 LD C,$04 C=04 (the number of cycles).
A4BB JP SoundsBeep Jump to SoundsBeep to play the tone.
View the equivalent code in;
Prev: A4A0 Up: Map Next: A4BE