![]() |
Routines |
| Prev: 54907 | Up: Map | Next: 54930 |
|
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 | 54914 | LD A,16 | Turn the speaker on. | |||||
| 54916 | OUT (254),A | |||||||
| 54918 | LD A,B | Keep the pitch in A. | ||||||
| PlaySquareWave_On | 54919 | DJNZ PlaySquareWave_On | Wait for the first half of the beep. | |||||
| 54921 | LD B,A | Restore the pitch. | ||||||
| 54922 | XOR A | Turn the speaker off. | ||||||
| 54923 | OUT (254),A | |||||||
| 54925 | LD A,B | Keep the pitch in A. | ||||||
| PlaySquareWave_Off | 54926 | DJNZ PlaySquareWave_Off | Wait for the second half of the beep. | |||||
| 54928 | LD B,A | Restore the pitch. | ||||||
| 54929 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 54907 | Up: Map | Next: 54930 |