Home » Archimedes archive » Acorn User » AU 1993-04.adf » !Bio/Library/ToneDial/ToneDial

!Bio/Library/ToneDial/ToneDial

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1993-04.adf
Filename: !Bio/Library/ToneDial/ToneDial
Read OK:
File size: 0508 bytes
Load address: FFFFFB44
Exec address: 696EF092
File contents
   10REM     >ToneDial
   20REM     BIO tone dial module
   30REM By  DA & DL
   40REM For 32-bit machines
   50REM (c) BAU April 1993
   60END
   70:
   80DEF FNtonedial_name = "Tone Dialler"
   90DEF FNtonedial_args = "-in Text"
  100:
  110DEF FNtonedial_init
  120LOCAL col$,row$,a%,col%,row%
  130DIM dial_tone1%(12),dial_tone2%(12)
  140col$="160167174"
  150row$="122130136142"
  160a%=1
  170FOR row%=0 TO 3
  180 FOR col%=0 TO 2
  190  dial_tone1%(a%)=VALMID$(col$,col%*3+1,3)
  200  dial_tone2%(a%)=VALMID$(row$,row%*3+1,3)
  210  a%+=1
  220 NEXT
  230NEXT
  240PROCwrite_in_icon(wind_hand%,1,"")
  250=0
  260:
  270DEF FNtonedial_mouse(mx%,my%,mb%,mh%,mi%)
  280=(mi%=2)
  290:
  300DEF FNtonedial_key(wh%,ic%,cx%,cy%,ch%,ci%,key%)
  310=(key%=13)
  320
  330DEF FNtonedial(file$)
  340LOCAL n$,i%,a$,in%,t%,dig%
  350SYS "Sound_Configure" TO i%
  360IF i%<2 VOICES 2
  370*ChannelVoice 1 WaveSynth-Beep
  380*ChannelVoice 2 WaveSynth-Beep
  390SYS "Sound_QBeat",-2
  400IF file$="" THEN
  410 PROCdial(FNicon_text(wind_hand%,1))
  420ELSE
  430 in%=OPENIN(file$)
  440 PROCdial(GET$#in%)
  450 CLOSE #in%
  460ENDIF
  470=0
  480:
  490DEF PROCdial(n$)
  500i%=0
  510WHILE n$<>""
  520 a%=INSTR(" 123456789*0#",LEFT$(n$,1))
  530 IF a%>0 THEN
  540  tone1%=dial_tone1%(a%-1)
  550  tone2%=dial_tone2%(a%-1)
  560  IF tone1%=0 vol%=0 ELSE vol%=&FFF80000
  570  SYS "Sound_QSchedule",i%*30+5,,vol% OR 1,&40000 OR tone1%
  580  SYS "Sound_QSchedule",     -1,,vol% OR 2,&40000 OR tone2%
  590  i%+=1
  600 ENDIF
  610 n$=MID$(n$,2)
  620ENDWHILE
  630ENDPROC

�     >ToneDial
�     BIO tone dial module
� By  DA & DL
(� For 32-bit machines
2� (c) BAU April 1993
<�
F:
P%� �tonedial_name = "Tone Dialler"
Z!� �tonedial_args = "-in Text"
d:
n� �tonedial_init
x� col$,row$,a%,col%,row%
�%� dial_tone1%(12),dial_tone2%(12)
�col$="160167174"
�row$="122130136142"
�a%=1
�� row%=0 � 3
� � col%=0 � 2
�(  dial_tone1%(a%)=��col$,col%*3+1,3)
�(  dial_tone2%(a%)=��row$,row%*3+1,3)
�  a%+=1
� �
��
�#�write_in_icon(wind_hand%,1,"")
�=0
:
*� �tonedial_mouse(mx%,my%,mb%,mh%,mi%)
=(mi%=2)
":
,1� �tonedial_key(wh%,ic%,cx%,cy%,ch%,ci%,key%)
6=(key%=13)
@
J� �tonedial(file$)
T� n$,i%,a$,in%,t%,dig%
^ș "Sound_Configure" � i%
h� i%<2 Ƞ 2
r"*ChannelVoice 1 WaveSynth-Beep
|"*ChannelVoice 2 WaveSynth-Beep
�ș "Sound_QBeat",-2
�� file$="" �
�$ �dial(�icon_text(wind_hand%,1))
��
� in%=�(file$)
� �dial(�#in%)
� � #in%
��
�=0
�:
�� �dial(n$)
�i%=0
�
ȕ n$<>""
  a%=�" 123456789*0#",�n$,1))

 � a%>0 �
  tone1%=dial_tone1%(a%-1)
&  tone2%=dial_tone2%(a%-1)
0(  � tone1%=0 vol%=0 � vol%=&FFF80000
:<  ș "Sound_QSchedule",i%*30+5,,vol% � 1,&40000 � tone1%
D<  ș "Sound_QSchedule",     -1,,vol% � 2,&40000 � tone2%
N  i%+=1
X �
b n$=�n$,2)
l�
v�
�
00000000  0d 00 0a 13 f4 20 20 20  20 20 3e 54 6f 6e 65 44  |.....     >ToneD|
00000010  69 61 6c 0d 00 14 1e f4  20 20 20 20 20 42 49 4f  |ial.....     BIO|
00000020  20 74 6f 6e 65 20 64 69  61 6c 20 6d 6f 64 75 6c  | tone dial modul|
00000030  65 0d 00 1e 11 f4 20 42  79 20 20 44 41 20 26 20  |e..... By  DA & |
00000040  44 4c 0d 00 28 19 f4 20  46 6f 72 20 33 32 2d 62  |DL..(.. For 32-b|
00000050  69 74 20 6d 61 63 68 69  6e 65 73 0d 00 32 18 f4  |it machines..2..|
00000060  20 28 63 29 20 42 41 55  20 41 70 72 69 6c 20 31  | (c) BAU April 1|
00000070  39 39 33 0d 00 3c 05 e0  0d 00 46 05 3a 0d 00 50  |993..<....F.:..P|
00000080  25 dd 20 a4 74 6f 6e 65  64 69 61 6c 5f 6e 61 6d  |%. .tonedial_nam|
00000090  65 20 3d 20 22 54 6f 6e  65 20 44 69 61 6c 6c 65  |e = "Tone Dialle|
000000a0  72 22 0d 00 5a 21 dd 20  a4 74 6f 6e 65 64 69 61  |r"..Z!. .tonedia|
000000b0  6c 5f 61 72 67 73 20 3d  20 22 2d 69 6e 20 54 65  |l_args = "-in Te|
000000c0  78 74 22 0d 00 64 05 3a  0d 00 6e 14 dd 20 a4 74  |xt"..d.:..n.. .t|
000000d0  6f 6e 65 64 69 61 6c 5f  69 6e 69 74 0d 00 78 1c  |onedial_init..x.|
000000e0  ea 20 63 6f 6c 24 2c 72  6f 77 24 2c 61 25 2c 63  |. col$,row$,a%,c|
000000f0  6f 6c 25 2c 72 6f 77 25  0d 00 82 25 de 20 64 69  |ol%,row%...%. di|
00000100  61 6c 5f 74 6f 6e 65 31  25 28 31 32 29 2c 64 69  |al_tone1%(12),di|
00000110  61 6c 5f 74 6f 6e 65 32  25 28 31 32 29 0d 00 8c  |al_tone2%(12)...|
00000120  14 63 6f 6c 24 3d 22 31  36 30 31 36 37 31 37 34  |.col$="160167174|
00000130  22 0d 00 96 17 72 6f 77  24 3d 22 31 32 32 31 33  |"....row$="12213|
00000140  30 31 33 36 31 34 32 22  0d 00 a0 08 61 25 3d 31  |0136142"....a%=1|
00000150  0d 00 aa 10 e3 20 72 6f  77 25 3d 30 20 b8 20 33  |..... row%=0 . 3|
00000160  0d 00 b4 11 20 e3 20 63  6f 6c 25 3d 30 20 b8 20  |.... . col%=0 . |
00000170  32 0d 00 be 28 20 20 64  69 61 6c 5f 74 6f 6e 65  |2...(  dial_tone|
00000180  31 25 28 61 25 29 3d bb  c1 63 6f 6c 24 2c 63 6f  |1%(a%)=..col$,co|
00000190  6c 25 2a 33 2b 31 2c 33  29 0d 00 c8 28 20 20 64  |l%*3+1,3)...(  d|
000001a0  69 61 6c 5f 74 6f 6e 65  32 25 28 61 25 29 3d bb  |ial_tone2%(a%)=.|
000001b0  c1 72 6f 77 24 2c 72 6f  77 25 2a 33 2b 31 2c 33  |.row$,row%*3+1,3|
000001c0  29 0d 00 d2 0b 20 20 61  25 2b 3d 31 0d 00 dc 06  |)....  a%+=1....|
000001d0  20 ed 0d 00 e6 05 ed 0d  00 f0 23 f2 77 72 69 74  | .........#.writ|
000001e0  65 5f 69 6e 5f 69 63 6f  6e 28 77 69 6e 64 5f 68  |e_in_icon(wind_h|
000001f0  61 6e 64 25 2c 31 2c 22  22 29 0d 00 fa 06 3d 30  |and%,1,"")....=0|
00000200  0d 01 04 05 3a 0d 01 0e  2a dd 20 a4 74 6f 6e 65  |....:...*. .tone|
00000210  64 69 61 6c 5f 6d 6f 75  73 65 28 6d 78 25 2c 6d  |dial_mouse(mx%,m|
00000220  79 25 2c 6d 62 25 2c 6d  68 25 2c 6d 69 25 29 0d  |y%,mb%,mh%,mi%).|
00000230  01 18 0c 3d 28 6d 69 25  3d 32 29 0d 01 22 05 3a  |...=(mi%=2)..".:|
00000240  0d 01 2c 31 dd 20 a4 74  6f 6e 65 64 69 61 6c 5f  |..,1. .tonedial_|
00000250  6b 65 79 28 77 68 25 2c  69 63 25 2c 63 78 25 2c  |key(wh%,ic%,cx%,|
00000260  63 79 25 2c 63 68 25 2c  63 69 25 2c 6b 65 79 25  |cy%,ch%,ci%,key%|
00000270  29 0d 01 36 0e 3d 28 6b  65 79 25 3d 31 33 29 0d  |)..6.=(key%=13).|
00000280  01 40 04 0d 01 4a 16 dd  20 a4 74 6f 6e 65 64 69  |.@...J.. .tonedi|
00000290  61 6c 28 66 69 6c 65 24  29 0d 01 54 1a ea 20 6e  |al(file$)..T.. n|
000002a0  24 2c 69 25 2c 61 24 2c  69 6e 25 2c 74 25 2c 64  |$,i%,a$,in%,t%,d|
000002b0  69 67 25 0d 01 5e 1d c8  99 20 22 53 6f 75 6e 64  |ig%..^... "Sound|
000002c0  5f 43 6f 6e 66 69 67 75  72 65 22 20 b8 20 69 25  |_Configure" . i%|
000002d0  0d 01 68 0f e7 20 69 25  3c 32 20 c8 a0 20 32 0d  |..h.. i%<2 .. 2.|
000002e0  01 72 22 2a 43 68 61 6e  6e 65 6c 56 6f 69 63 65  |.r"*ChannelVoice|
000002f0  20 31 20 57 61 76 65 53  79 6e 74 68 2d 42 65 65  | 1 WaveSynth-Bee|
00000300  70 0d 01 7c 22 2a 43 68  61 6e 6e 65 6c 56 6f 69  |p..|"*ChannelVoi|
00000310  63 65 20 32 20 57 61 76  65 53 79 6e 74 68 2d 42  |ce 2 WaveSynth-B|
00000320  65 65 70 0d 01 86 17 c8  99 20 22 53 6f 75 6e 64  |eep...... "Sound|
00000330  5f 51 42 65 61 74 22 2c  2d 32 0d 01 90 10 e7 20  |_QBeat",-2..... |
00000340  66 69 6c 65 24 3d 22 22  20 8c 0d 01 9a 24 20 f2  |file$="" ....$ .|
00000350  64 69 61 6c 28 a4 69 63  6f 6e 5f 74 65 78 74 28  |dial(.icon_text(|
00000360  77 69 6e 64 5f 68 61 6e  64 25 2c 31 29 29 0d 01  |wind_hand%,1))..|
00000370  a4 05 cc 0d 01 ae 11 20  69 6e 25 3d 8e 28 66 69  |....... in%=.(fi|
00000380  6c 65 24 29 0d 01 b8 11  20 f2 64 69 61 6c 28 be  |le$).... .dial(.|
00000390  23 69 6e 25 29 0d 01 c2  0b 20 d9 20 23 69 6e 25  |#in%).... . #in%|
000003a0  0d 01 cc 05 cd 0d 01 d6  06 3d 30 0d 01 e0 05 3a  |.........=0....:|
000003b0  0d 01 ea 0f dd 20 f2 64  69 61 6c 28 6e 24 29 0d  |..... .dial(n$).|
000003c0  01 f4 08 69 25 3d 30 0d  01 fe 0d c8 95 20 6e 24  |...i%=0...... n$|
000003d0  3c 3e 22 22 0d 02 08 20  20 61 25 3d a7 22 20 31  |<>""...  a%=." 1|
000003e0  32 33 34 35 36 37 38 39  2a 30 23 22 2c c0 6e 24  |23456789*0#",.n$|
000003f0  2c 31 29 29 0d 02 12 0d  20 e7 20 61 25 3e 30 20  |,1)).... . a%>0 |
00000400  8c 0d 02 1c 1e 20 20 74  6f 6e 65 31 25 3d 64 69  |.....  tone1%=di|
00000410  61 6c 5f 74 6f 6e 65 31  25 28 61 25 2d 31 29 0d  |al_tone1%(a%-1).|
00000420  02 26 1e 20 20 74 6f 6e  65 32 25 3d 64 69 61 6c  |.&.  tone2%=dial|
00000430  5f 74 6f 6e 65 32 25 28  61 25 2d 31 29 0d 02 30  |_tone2%(a%-1)..0|
00000440  28 20 20 e7 20 74 6f 6e  65 31 25 3d 30 20 76 6f  |(  . tone1%=0 vo|
00000450  6c 25 3d 30 20 8b 20 76  6f 6c 25 3d 26 46 46 46  |l%=0 . vol%=&FFF|
00000460  38 30 30 30 30 0d 02 3a  3c 20 20 c8 99 20 22 53  |80000..:<  .. "S|
00000470  6f 75 6e 64 5f 51 53 63  68 65 64 75 6c 65 22 2c  |ound_QSchedule",|
00000480  69 25 2a 33 30 2b 35 2c  2c 76 6f 6c 25 20 84 20  |i%*30+5,,vol% . |
00000490  31 2c 26 34 30 30 30 30  20 84 20 74 6f 6e 65 31  |1,&40000 . tone1|
000004a0  25 0d 02 44 3c 20 20 c8  99 20 22 53 6f 75 6e 64  |%..D<  .. "Sound|
000004b0  5f 51 53 63 68 65 64 75  6c 65 22 2c 20 20 20 20  |_QSchedule",    |
000004c0  20 2d 31 2c 2c 76 6f 6c  25 20 84 20 32 2c 26 34  | -1,,vol% . 2,&4|
000004d0  30 30 30 30 20 84 20 74  6f 6e 65 32 25 0d 02 4e  |0000 . tone2%..N|
000004e0  0b 20 20 69 25 2b 3d 31  0d 02 58 06 20 cd 0d 02  |.  i%+=1..X. ...|
000004f0  62 0e 20 6e 24 3d c1 6e  24 2c 32 29 0d 02 6c 05  |b. n$=.n$,2)..l.|
00000500  ce 0d 02 76 05 e1 0d ff                           |...v....|
00000508