![]() |
Routines |
| Prev: 9EEA | Up: Map | Next: 9F06 |
|
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 | 9EF1 | LD BC,$0330 | Set the number of pulses to 30 and the number of buzzes to 03. | |
| PlayBuzzSweep_Buzz | 9EF4 | PUSH BC | Save the counters. | |
| 9EF5 | LD A,B | Fetch the number of buzzes. | ||
| 9EF6 | ADD A,A | Multiply it by two... | ||
| 9EF7 | ADD A,A | ...four... | ||
| 9EF8 | ADD A,A | ...and eight. | ||
| 9EF9 | ADD A,C | Add the number of pulses to make the seed. | ||
| 9EFA | LD E,A | Set the seed. | ||
| 9EFB | CALL PlayBuzz | Play the buzz. | ||
| 9EFE | POP BC | Restore the counters. | ||
| 9EFF | LD A,C | Fetch the number of pulses. | ||
| 9F00 | SUB $0C | Subtract 0C. | ||
| 9F02 | LD C,A | Store it. | ||
| 9F03 | DJNZ PlayBuzzSweep_Buzz | Jump back until all of the buzzes have been played. | ||
| 9F05 | RET | Return. | ||
| Prev: 9EEA | Up: Map | Next: 9F06 |