Prev: 40639 Up: Map Next: 40675
40657: Play Default Buzz
Plays a buzz, using a pattern of pulses which is based on the number of the pulse and a seed. This entry point uses 28 pulses and a seed of 39.
PlayDefaultBuzz 40657 LD C,28 Set the number of pulses to 28.
40659 LD E,39 Set the seed to 39.
This entry point is used by the routines at PlayShortBuzz, PlayTinyBuzz, PlayBuzzSweep, PlayLongBuzz, PlayMediumBuzz and PlayBriefBuzz.
This entry point takes the number of pulses in C and the seed in E.
PlayBuzz 40661 LD A,C Fetch the number of the pulse.
40662 XOR E Combine it with the seed.
40663 ADD A,A Double it.
40664 LD B,A Use it as the length of the pulse.
40665 AND %00011111 Use bits 0-4.
40667 LD D,A Use it as the length of the gap.
40668 CALL PlayPulse Play a pulse.
40671 DEC C Decrease the number of pulses by one.
40672 JR NZ,PlayBuzz Jump back until they have all been played.
40674 RET Return.
View the equivalent code in;
Prev: 40639 Up: Map Next: 40675