Prev: 26778 Up: Map Next: 26815
26801: Play Square Wave
Plays one cycle of a square wave; the speaker is switched on for a period of time and then switched off for the same amount of time.
Input
D Duration of wave
PlaySquareWave 26801 LD A,16 Play square wave sound.
26803 OUT (254),A
26805 LD B,D
PlaySquareWave_Loop 26806 DJNZ PlaySquareWave_Loop
26808 XOR A Play "silence".
26809 OUT (254),A
26811 LD B,D
Silence_Loop 26812 DJNZ Silence_Loop
26814 RET Return.
View the equivalent code in;
Prev: 26778 Up: Map Next: 26815