![]() |
Routines |
| Prev: A163 | Up: Map | Next: A181 |
|
Used by the routine at Make_Dust_Puff.
Plays four cycles of a tone with a half period of E7 which is a low pitch. The counter in D is set to 40 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 | A173 | LD D,$40 | D=40 (the counter). | |
| A175 | DEC D | Decrease the tone counter and return if it is zero (this does not happen when the routine is entered at the start). | ||
| A176 | RET Z | |||
| A177 | LD A,D | Fetch the counter. | ||
| A178 | RRCA | Rotate the counter right three times. | ||
| A179 | RRCA | |||
| A17A | RRCA | |||
| A17B | LD B,A | Use the result as the half period. | ||
| A17C | LD C,$04 | Set the number of cycles to 04. | ||
| A17E | JP SoundsBeep | Jump to SoundsBeep to play the tone. | ||
|
View the equivalent code in;
|
||||
| Prev: A163 | Up: Map | Next: A181 |