Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!lll-winken!unixhub!slacvm!maji From: MAJI@SLACVM.SLAC.STANFORD.EDU (Ji Ma) Newsgroups: comp.sys.ti Subject: Use TI as phone dialer Message-ID: <90344.133141MAJI@SLACVM.SLAC.STANFORD.EDU> Date: 10 Dec 90 21:31:41 GMT Organization: Stanford Linear Accelerator Center Lines: 38 Hi, I design a small program which allow you to dial a phone number by your ti computer. Following is the program. You have to put your phone receiver close to tv speaker in order to work. Good Luck and have fun! FUNCTION: automatic touch tone dialor INPUT : phone number OUTPUT : dial tone Version : 1.00 (c) 5-DEC-89 LANGUAGE: TI Basic PROGRAM : ! TONE_TAB stores tones for each digits DIM TONE_TAB(9,2) ! fill the tone table FOR I=1 TO 2 FOR J=0 TO 9 READ TONE_TAB(J,I) NEXT J NEXT I ! data block DATA 914,697,697,770,770,770,852,852,852 DATA 1336,1209,1336,1477,1209,1336,1477,1209,1336,1477 ! dialing loop DISPLAY AT(11,1) ERASE ALL:"MOVE PHONE RECEIVER CLOSE TO TV SPEAKER" 1 DISPLAY AT(12,1) BELL:"ENTER PHONE NUMBER? (0 to exit) " ACCEPT AT(12,21)VALIDATE(NUMERICAL):PHNUM$ IF PHNUM$="0" THEN STOP ELSE CALL GTONE(PHNUM$) :: GOTO L1 ! extract each digit and produce the sound SUB GTONE(N$) duration of dialing tone (100ms), loudest volume DUR=100 :: VOL=0 FOR I=1 TO LEN(N$) N=VAL(SEG$(N$),I,1)) CALL SOUND(DUR,TONE_TAB(N,1),VOL,TONE_TAB(N,2),VOL) FOR DELAY=1 TO 100 :: NEXT DELAY NEXT I SUBEND