Prev: 6473 Up: Map Next: 64B8
64AA: Play square wave sound
Used by the routines at 6473 and 64B8.
Input
D Duration of wave
PlaySquareWave 64AA LD A,$10 A=10 (speaker on = bit 4).
64AC OUT ($FE),A
64AE LD B,D Decrease duration by one and loop back to PlaySquareWave_Loop until counter is zero.
PlaySquareWave_Loop 64AF DJNZ PlaySquareWave_Loop
64B1 XOR A Speaker off.
64B2 OUT ($FE),A
64B4 LD B,D Decrease duration by one and loop back to Silence_Loop until counter is zero.
Silence_Loop 64B5 DJNZ Silence_Loop
64B7 RET Return.
Prev: 6473 Up: Map Next: 64B8