![]() |
Routines |
| Prev: C463 | Up: Map | Next: C481 |
|
Plays a single beep by switching the speaker on, waiting, switching it off and waiting again. The bigger the pitch, the longer the beep.
|
||||||||
|
Hold the speaker on, then off.
|
||||||||
| PlaySquareWave | C471 | LD A,$10 | Turn the speaker on. | |||||
| C473 | OUT ($FE),A | |||||||
| C475 | LD A,B | Keep the pitch in A. | ||||||
| PlaySquareWave_High | C476 | DJNZ PlaySquareWave_High | Wait, to make the first half of the cycle. | |||||
| C478 | LD B,A | Restore the pitch. | ||||||
| C479 | XOR A | Turn the speaker off. | ||||||
| C47A | OUT ($FE),A | |||||||
| C47C | LD A,B | Keep the pitch in A. | ||||||
| PlaySquareWave_Low | C47D | DJNZ PlaySquareWave_Low | Wait, to make the second half of the cycle. | |||||
|
Get the pitch back and return.
|
||||||||
| C47F | LD B,A | Restore the pitch. | ||||||
| C480 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: C463 | Up: Map | Next: C481 |