Prev: 31987 Up: Map Next: 32055
32034: Click speaker bit, causes 2 clicks separated by the given pitch
This calls the toggle speaker routine for one click, makes a very brief delay (4 NOPs) then drops through to the toggle_speaker routine which follows to toggle the bit back again.
The pitch is implemented in the routine this calls.
Input
C Pitch
click_speaker 32034 LD A,(_BURBLER_PORT254_SHADOW) Pick up saved border colour
32037 CALL toggle_speaker Call forward to the toggle routine then drop through and do it again
32040 LD B,4 13Ts delay times 4 then drop through
click_speaker_0 32042 DJNZ click_speaker_0
Toggle speaker bit, causes a click based on the given pitch A small delay based on pitch, then toggle the speaker bit for a single click. Input:C Pitch
toggle_speaker 32044 LD B,C C contains a delay factor
click_speaker_1 32045 NOP 4Ts
32046 NOP 4Ts
32047 NOP 4Ts
32048 DJNZ click_speaker_1 12*C Ts delay
32050 XOR 16 Toggle speaker bit
32052 OUT (254),A
32054 RET
Prev: 31987 Up: Map Next: 32055