![]() |
Routines |
| Prev: 40682 | Up: Map | Next: 40710 |
|
Used by the routine at CollectBottle.
Plays three buzzes, each with a lower number of pulses and a higher seed than the one before.
|
||||
| PlayBuzzSweep | 40689 | LD BC,816 | Set the number of pulses to 48 and the number of buzzes to 3. | |
| PlayBuzzSweep_Buzz | 40692 | PUSH BC | Save the counters. | |
| 40693 | LD A,B | Fetch the number of buzzes. | ||
| 40694 | ADD A,A | Multiply it by two... | ||
| 40695 | ADD A,A | ...four... | ||
| 40696 | ADD A,A | ...and eight. | ||
| 40697 | ADD A,C | Add the number of pulses to make the seed. | ||
| 40698 | LD E,A | Set the seed. | ||
| 40699 | CALL PlayBuzz | Play the buzz. | ||
| 40702 | POP BC | Restore the counters. | ||
| 40703 | LD A,C | Fetch the number of pulses. | ||
| 40704 | SUB 12 | Subtract 12. | ||
| 40706 | LD C,A | Store it. | ||
| 40707 | DJNZ PlayBuzzSweep_Buzz | Jump back until all of the buzzes have been played. | ||
| 40709 | RET | Return. | ||
| Prev: 40682 | Up: Map | Next: 40710 |