Prev: F618 Up: Map Next: F66C
F648: Play Wave #1
Input
BC Delay
DE Duration
PlayWave1 F648 PUSH BC Stash the delay counter on the stack.
F649 LD A,($5BD0) Send *Active_BorderColour to the speaker port.
F64C LD BC,$FFFE
F64F OUT (C),A
F651 POP BC Restore the delay counter from the stack.
F652 PUSH BC Stash the delay counter on the stack.
F653 CALL Delay_Loop Call Delay_Loop.
F656 LD A,($5BD0) A=*Active_BorderColour.
F659 LD BC,$FFFE BC=FFFE (C points to the speaker port).
F65C OR %00010000 Turn on the speaker (set bit 4).
F65E OUT (C),A Send A to port *C.
F660 POP BC Restore the delay counter from the stack.
F661 PUSH BC Stash the delay counter on the stack.
F662 CALL Delay_Loop Call Delay_Loop.
F665 POP BC Restore the delay counter from the stack.
F666 DEC DE Decrease the duration counter by one.
F667 LD A,E Keep looping back to PlayWave1 until the duration counter is zero.
F668 OR D
F669 JR NZ,PlayWave1
F66B RET Return.
Prev: F618 Up: Map Next: F66C