Prev: 6809 Up: Map Next: 681E
680D: Play square wave sound
Input
D Duration of wave
PlaySquareWave 680D LD A,$10 A=10 (speaker on = bit 4).
680F OUT ($FE),A
6811 LD B,D Decrease duration by one and loop back to PlaySquareWave_Loop until
This entry point is used by the routines at SoundsThrusters, SoundsRocketBuild and SoundsPickupFuel.
PlaySquareWave_Loop 6812 DJNZ PlaySquareWave_Loop counter is zero.}
6814 XOR A Speaker off.
6815 OUT ($FE),A
6817 LD B,D Decrease duration by one and loop back to Silence_Loop until counter is zero.
Silence_Loop 6818 DJNZ Silence_Loop
681A DEC C
681B JR NZ,PlaySquareWave
681D RET Return.
Prev: 6809 Up: Map Next: 681E