![]() |
Routines |
| Prev: 41315 | Up: Map | Next: 41345 |
|
Used by the routine at Make_Dust_Puff.
Plays four cycles of a tone with a half period of 231 which is a low pitch. The counter in D is set to 64 and the tone is made from the counter after one has been taken off it.
The routine jumps to the tone player, which returns to the caller.
|
||||
| SoundsBounce | 41331 | LD D,64 | D=64 (the counter). | |
| 41333 | DEC D | Decrease the tone counter and return if it is zero (this does not happen when the routine is entered at the start). | ||
| 41334 | RET Z | |||
| 41335 | LD A,D | Fetch the counter. | ||
| 41336 | RRCA | Rotate the counter right three times. | ||
| 41337 | RRCA | |||
| 41338 | RRCA | |||
| 41339 | LD B,A | Use the result as the half period. | ||
| 41340 | LD C,4 | Set the number of cycles to 4. | ||
| 41342 | JP SoundsBeep | Jump to SoundsBeep to play the tone. | ||
|
View the equivalent code in;
|
||||
| Prev: 41315 | Up: Map | Next: 41345 |