symbol txmon = b0 symbol txout = 2 symbol tone = b3 txmon = 1 b6 = 0 b7 = 0 main: txmon = pin3 if txmon = 0 then goto keyed w1 = w1 + 1 goto main keyed: high 2 gosub sendtone gosub sendtone gosub sendtone checktx: txmon = pin3 if txmon = 0 then w1 = w1 + 1 goto checktx end if unkeyed: high 2 gosub sendtone gosub sendtone gosub sendtone low 2 goto main redotone: b7 = b7 + 1 if b7 > 15 then goto toneit sendtone: RANDOM w1 w1 = w1//16 tone = w1 + 108 if tone = b6 then goto redotone toneit: b6 = tone b7 = 0 sound 4,(tone,8) return