Prev: F66C Up: Map Next: F6B5
F68F: Play Wave #3
Input
BC Delay
DE Duration
PlayWave3 F68F PUSH BC Stash the delay counter on the stack twice.
F690 PUSH BC
F691 CALL Delay_Loop Call Delay_Loop.
F694 LD BC,$FFFE Send *Active_BorderColour to the speaker port.
F697 LD A,($5BD0)
F69A OUT (C),A
F69C POP BC Restore the delay counter from the stack.
F69D CALL Delay_Loop Call Delay_Loop.
F6A0 LD BC,($FFFE) BC=*FFFE (C points to the speaker port).
F6A4 LD A,($5BD0) A=*Active_BorderColour.
F6A7 OR %00010000 Turn on the speaker (set bit 4).
F6A9 OUT (C),A Send A to the speaker port.
F6AB POP BC Restore the delay counter from the stack.
F6AC DEC BC Decrease the delay counter by three.
F6AD DEC BC
F6AE DEC BC
F6AF DEC DE Decrease the duration counter by one.
F6B0 LD A,D Keep looping back to PlayWave3 until the duration counter is zero.
F6B1 OR E
F6B2 JR NZ,$F68F
F6B4 RET Return.
Prev: F66C Up: Map Next: F6B5