Prev: F68F Up: Map Next: F6DB
F6B5: Play Wave #4
Input
BC Delay
DE Duration
PlayWave4 F6B5 PUSH BC Stash the delay counter on the stack twice.
F6B6 PUSH BC
F6B7 CALL Delay_Loop Call Delay_Loop.
F6BA LD BC,$FFFE Send *Active_BorderColour to the speaker.
F6BD LD A,($5BD0)
F6C0 OUT (C),A
F6C2 POP BC Restore the delay counter from the stack.
F6C3 CALL Delay_Loop Call Delay_Loop.
F6C6 LD BC,$FFFE BC=FFFE (C points to the speaker port).
F6C9 LD A,($5BD0) A=*Active_BorderColour.
F6CC OR %00010000 Turn on the speaker (set bit 4).
F6CE OUT (C),A Send A to the speaker port.
F6D0 POP BC Restore the other delay counter from the stack.
F6D1 DEC BC Decrease the delay counter by one.
F6D2 LD A,C Return if the delay counter is zero.
F6D3 OR B
F6D4 RET Z
F6D5 DEC DE Decrease the duration counter by one.
F6D6 LD A,D Keep looping back to PlayWave4 until the duration counter is zero.
F6D7 OR E
F6D8 JR NZ,PlayWave4
F6DA RET Return.
Prev: F68F Up: Map Next: F6DB