![]() |
Routines |
| Prev: 44895 | Up: Map | Next: 44918 |
|
Plays one pulse, which is a high and a low half of the same length, by toggling the speaker. B is unchanged.
|
||||||||
|
Turn the speaker on for the length of the pulse.
|
||||||||
| PlaySquareWave | 44902 | LD A,16 | Set the speaker bit. | |||||
| 44904 | OUT (254),A | Turn the speaker on. | ||||||
| 44906 | LD A,B | Keep the length of the pulse in A. | ||||||
| PlaySquareWave_FirstDelay | 44907 | DJNZ PlaySquareWave_FirstDelay | Wait for the length of the pulse. | |||||
| 44909 | LD B,A | Restore the length of the pulse. | ||||||
|
Turn the speaker off for the same length.
|
||||||||
| 44910 | XOR A | Clear the speaker bit. | ||||||
| 44911 | OUT (254),A | Turn the speaker off. | ||||||
| 44913 | LD A,B | Keep the length of the pulse in A. | ||||||
| PlaySquareWave_SecondDelay | 44914 | DJNZ PlaySquareWave_SecondDelay | Wait for the length of the pulse. | |||||
| 44916 | LD B,A | Restore the length of the pulse. | ||||||
| 44917 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 44895 | Up: Map | Next: 44918 |