Prev: 40582 Up: Map Next: 40611
40595: Play Click
Plays one cycle of a tone in which the pulse and the gap are equally long.
Input
B The length of the pulse and the gap
PlayClick 40595 LD A,16 Set the speaker bit.
40597 OUT (254),A Write to the port.
40599 LD A,B Save the length in A.
PlayClick_Pulse 40600 DJNZ PlayClick_Pulse Wait for the length of the pulse.
40602 LD B,A Restore the length in B.
40603 XOR A Clear the speaker bit.
40604 OUT (254),A Write to the port.
40606 LD A,B Save the length in A.
PlayClick_Gap 40607 DJNZ PlayClick_Gap Wait for the length of the gap.
40609 LD B,A Restore the length in B.
40610 RET Return.
View the equivalent code in;
Prev: 40582 Up: Map Next: 40611