![]() |
Routines |
| Prev: A10B | Up: Map | Next: A12F |
|
This plays the speaker for B iterations with a delay C.
|
||||||||||
| play_speaker | A11D | LD A,C | Self-modify the delay loop at $A126 | |||||||
| A11E | LD ($A126),A | |||||||||
| A121 | LD A,$10 | Initially set the speaker bit on | ||||||||
|
Start loop
|
||||||||||
| play_speaker_0 | A123 | OUT ($FE),A | Play the speaker (and set the border) | |||||||
| A125 | LD C,$37 | Delay | ||||||||
| play_speaker_1 | A127 | DEC C | ||||||||
| A128 | JR NZ,play_speaker_1 | |||||||||
| A12A | XOR $10 | Toggle the speaker bit | ||||||||
| A12C | DJNZ play_speaker_0 | ...loop | ||||||||
| A12E | RET | Return | ||||||||
| Prev: A10B | Up: Map | Next: A12F |