Auto-dial and auto-answer for the Timex/Westridge 2050 modem. The program on the tape is the Autolist Phone-Dialer, a 200-entry telephone list that dials through the modem. The list shows 20 entries a page; pressing the lower-case letter beside an entry pulse-dials its seven-digit number, flashes “PICK UP PHONE NOW!” and beeps, then drops the line when you pick up the handset or press a key. C changes an entry, B goes back a page and ENTER moves on. While the list is shown, the program watches the modem for an incoming ring and beeps when it hears one.
A menu offers Enter a new list, Save the list with the program, Print it, Restart with the data, sort the List by name, Wait (a blank screen that still watches for rings) and Quit. After a long spell with no key pressed, the list switches to the wait screen by itself.
The REM lines credit the dialing and answering routines to Randy Kuhn (“AUTO-DIAL & AUTO-ANSWER FOR WESTRIDGE 2050”) and the Autolist Phone-Dialer to Randy Gordon (Flashware), dated 02/12/85. The title screen reads “AUTOLIST PHONEDIALER” and “FLASHWARE © 1986”, and the save line carries a revision date of 02/01/86. The program is saved as ALLFONE4 with no list data.
Program Analysis
Structure
- Lines 5–140: Randy Kuhn’s dialer. Each digit is sent as pulses (10 for a zero) by switching the modem’s control register with
OUT 119,3andOUT 119,4and shortPAUSEs. - Lines 150–180: the pick-up prompt, then
OUT 119,0to release the line. - Lines 1000–1090: the auto-answer routine. It waits for
IN 119to change from 5, checks twice more about 400 frames apart, and then takes the line. A REM says it answers on the third ring and will not answer if the phone is picked up first. Nothing in the menu calls it; it is started withGO TO 1000. - Lines 1100–1180: list entry and the paged list display, using
b$(200,22)for names andn$(200,7)for numbers. - Lines 3000–3100: the error trap and main menu.
- Lines 4000–4160: the sort.
- Lines 9997–9999: save with
LINE 1144and an optionalVERIFY.
Notable Techniques
ON ERR GO TO 3000doubles as the menu key: any error, including a stray key or the empty list on first load, lands on the menu.- The sort is a Shell-type sort with the gap starting at the largest power of two up to 200 and halving each pass. Before sorting, empty names are set to
CHR$ 123so they sink to the end, and trailing spaces become dots, which gives dot leaders in the listing. Printing skips theCHR$ 123entries. POKE 23658,0turns off CAPS LOCK so the lower-case dial keys work.- The title screen draws a handset-style outline with
CIRCLEandDRAW.
Potential Issues
- Dialing entered from line 5 (the original single-number dialer) runs into the
RETURNat line 180 without aGO SUB, so it appears to work only when called from the list at line 1170. - The menu warns that the sort takes about three minutes; it runs in BASIC over all 200 entries even when the list is short.
Source Code
1 GO TO 1144
2 REM AUTODIAL (modified for AUTOLIST dialer)
5 CLS : PRINT "AUTO-DIALER"
10 INPUT a$: PRINT : PRINT a$: PRINT
15 OUT 119,31
16 PAUSE 90
20 FOR i=1 TO LEN a$
30 LET a=VAL a$(i)
32 IF a=0 THEN LET a=10
35 PAUSE 25
40 GO SUB 60
50 NEXT i
55 GO TO 150
60 FOR d=1 TO a
70 FOR e=3 TO 4
80 OUT 119,e
90 PAUSE 3.4
100 NEXT e
110 OUT 119,1
120 OUT 119,2
130 NEXT d
140 RETURN
150 PRINT AT 20,0; FLASH 1;" PICK UP PHONE NOW! "
155 FOR x=1 TO 4: BEEP .1,25: NEXT x: FOR x=1 TO 1500: IF INKEY$<>"" THEN GO TO 157: NEXT x
156 NEXT x
157 PRINT AT 20,0; FLASH 0;"lower case letter=DIAL NUMBER "
170 OUT 119,0: BEEP .1,5: BEEP .1,7
180 RETURN
1000 REM AUTOANSWER
1001 OUT 119,34
1005 OUT 119,0
1010 LET a=IN 119
1020 IF a=5 THEN GO TO 1010
1030 PAUSE 400
1040 LET a=IN 119
1045 IF a=5 THEN GO TO 1010
1050 PAUSE 400
1060 LET a=IN 119
1065 IF a=5 THEN GO TO 1010
1070 OUT 119,2
1080 OUT 119,34
1090 STOP
1100 REM AUTOPHONE LIST DIALER
1110 DIM n$(200,7): DIM b$(200,22): LET i$=""
1115 CLS : PRINT "INPUT name then INPUT number."
1120 FOR x=1 TO 200
1125 PRINT x;" ";: INPUT b$(x);: PRINT b$(x);: INPUT n$(x): PRINT n$(x): IF CODE b$(x)=32 THEN GO TO 1145
1126 IF i$="C" THEN LET i$="": PAUSE 200: GO TO 1145
1127 NEXT x
1128 GO TO 1145
1130 STOP
1144 INK 7: BORDER 0: PAPER 0: CLS : PRINT AT 3,6;"AUTOLIST PHONEDIALER";AT 14,8;"FLASHWARE \* 1986": CIRCLE 123,110,20: PLOT 127,133: DRAW 20,0: DRAW -5,-20: DRAW -15,0: DRAW -5,-10: DRAW -8,0: DRAW -6,-17: DRAW 0,23: DRAW 6,0: DRAW 4,9: DRAW 6,0: DRAW 2,15: BEEP .2,10: BEEP .2,5: BEEP .2,2: PAUSE 4: BEEP .2,10: BEEP .2,5: BEEP .2,2: PAUSE 8: BEEP .2,10: BEEP .2,5: BEEP .2,2: BEEP .2,5: BEEP .2,10: BEEP .2,10
1145 OUT 119,34: OUT 119,0: LET p=-19
1147 ON ERR GO TO 3000
1150 CLS : LET p=p+20: IF p>200 THEN LET p=1
1155 FOR y=0+p TO 19+p: PRINT CHR$ ((y-p)+97);" ";b$(y);TAB 24;n$(y, TO 3);"-";n$(y,4 TO ): NEXT y
1160 PRINT "lower case letter=DIAL NUMBER C=change entry/B=back one page ": LET timer=0
1161 LET auto=IN 119: IF auto<>5 THEN PAUSE 6: FOR x=1 TO 10: BEEP .05,39: NEXT x
1162 IF INKEY$="" THEN LET timer=timer+1: IF timer=2500 THEN LET x$="w": GO TO 3010
1163 IF INKEY$="" THEN GO TO 1161
1164 LET i$=INKEY$
1165 IF CODE i$=13 THEN GO TO 1150
1166 IF i$="C" THEN PRINT AT 20,0;"INPUT list # to CHANGE ": INPUT x$: LET x=((CODE x$-97)+p): GO TO 1125
1167 IF i$="B" THEN LET p=p-40: GO TO 1150
1170 LET a$=n$((CODE i$-97)+p): PRINT AT (CODE i$-97),0; FLASH 1;i$: IF CODE a$<>32 THEN GO SUB 15
1175 PRINT AT (CODE i$-97),0; FLASH 0;i$
1180 GO TO 1161
1300 REM LPRINT CODE
1305 FOR q=1 TO 200
1306 ON ERR GO TO 3000
1310 IF CODE b$(q)=123 THEN NEXT q
1320 LPRINT ;TAB 1;b$(q);TAB 23;n$(q, TO 3);"-";n$(q,4 TO )
1330 NEXT q
1350 GO TO 3000
2001 REM RANDY KUHN/AUTO-DIAL& AUTO-ANSWER FOR WESTRIDGE 2050. Please note that the PAUSE timesare very important. Auto-answer will answer in three rings. It will not answer if picked up first.
2002 REM RANDY GORDON (FLASHWARE)/AUTOLIST PHONE- DIALER. 02/12/85
3000 REM ERROR TRAP
3001 POKE 23658,0: ON ERR RESET : BEEP 1,1: OUT 119,0: BEEP .1,1
3006 CLS : PRINT "Autodialer Main Menu": PRINT : PRINT "<E>nter new list <S>ave current list <P>rint list <R>estart with data <L>ist sort <W>ait (blank screen) <Q>uit"
3007 INPUT "Choice?: ";x$
3010 IF x$="e" OR x$="E" THEN GO TO 1100
3011 IF x$="s" OR x$="S" THEN GO TO 9997
3012 IF x$="p" OR x$="P" THEN GO TO 1300
3013 IF x$="r" OR x$="R" THEN POKE 23658,0: GO TO 1
3014 IF x$="l" OR x$="L" THEN PRINT : PRINT : PRINT "Sorting. Please wait 3 min...": GO TO 4000
3015 IF x$="q" OR x$="Q" THEN PRINT : PRINT "GOTO 1 to restart with data": STOP
3016 IF x$="w" OR x$="W" THEN CLS : GO TO 3017
3017 LET auto=IN 119: IF auto<>5 THEN PAUSE 6: FOR x=1 TO 10: BEEP .05,39: NEXT x
3018 IF INKEY$<>"" THEN GO TO 1
3019 GO TO 3017
3100 GO TO 3006
3999 STOP
4000 REM SORT
4001 FOR x=1 TO 200
4002 IF CODE b$(x)=32 THEN LET b$(x)=CHR$ 123
4003 NEXT x
4004 FOR x=1 TO 200
4005 FOR y=22 TO 1 STEP -1
4006 IF b$(x,y)="." THEN GO TO 4009
4007 IF b$(x,y)<>" " AND b$(x,y)<>"." THEN LET y=1: GO TO 4009
4008 IF b$(x,y)=" " OR b$(x,y)="." THEN LET b$(x,y)="."
4009 NEXT y: NEXT x
4010 LET s=1
4020 LET s=s*2
4030 IF s<=200 THEN GO TO 4020
4040 LET s=INT (s/2)
4050 IF s=0 THEN GO TO 3000
4060 FOR t=1 TO 200-s
4070 LET y=t
4080 LET w=y+s
4090 IF b$(y)<=b$(w) THEN GO TO 4150
4100 LET z$=b$(y)
4101 LET y$=n$(y)
4110 LET b$(y)=b$(w)
4111 LET n$(y)=n$(w)
4120 LET b$(w)=z$
4121 LET n$(w)=y$
4130 LET y=y-s
4140 IF y>0 THEN GO TO 4080
4150 NEXT t
4160 GO TO 4040
9000 STOP
9997 LET i$="": SAVE "ALLFONE4" LINE 1144: INPUT "VERIFY (y/n)? ";i$: REM rev. date 02/01/86
9998 IF i$="y" OR i$="Y" THEN LET i$="": VERIFY "": GO TO 3000
9999 GO TO 3000Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

