--- title: "Dial-A-Word" id: 71928 type: "computer_media" slug: "dial-a-word" url: "http://localhost/computer_media/dial-a-word/" markdown_url: "http://localhost/computer_media/dial-a-word.md" published_at: "2026-10-20T14:07:48+00:00" modified_at: "2026-10-20T14:11:11+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/DIALAWORD.png" excerpt: "Lists every letter combination a seven-digit telephone number can spell on a standard dial, 76 combinations per screen, to help find a memorable word." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "David Wahl" slug: "david-wahl" taxonomy: "indiv" url: "http://localhost/indiv/david-wahl/" genre: - name: "Home" slug: "home" taxonomy: "genre" url: "http://localhost/type/home/" media_type: "Program" programmers: - name: "David Wahl" slug: "david-wahl" taxonomy: "indiv" url: "http://localhost/indiv/david-wahl/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Dial-A-Word%20%281983%29%28Wahl%2C%20David%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/10/DIALAWORD.png" - url: "http://localhost/wp-content/uploads/2026/10/DIALAWORD-scaled.jpg" article_media: - id: 20201 title: "Dial-A-Word" type: "article" url: "http://localhost/article/dial-a-word/" media_type_tags: "Home" --- # Dial-A-Word Takes a seven-digit telephone number and prints every letter combination it can spell using the letters on a telephone dial. Digits 2 through 9 each stand for three letters, from ABC to WXY (Q and Z are left out, as on dials of the period), while 0 and 1 are printed as they are. A number made only of the digits 2–9 gives 37 = 2187 combinations. The results fill the screen 76 at a time, and the user presses C to continue or Q to quit. The cassette has a handwritten label reading “DIAL A WORD (Z.)”. The listing matches David Wahl’s type-in published in Timex Sinclair User #5. ## Program Analysis ### Program Structure The 24-letter alphabet is held in `A$`, and the array `A(7)` holds a 0–2 offset for each digit position. For each digit `d`, line 280 prints `A$(VAL (N$(I))*3-5+A(I))`, so 2 maps to positions 1–3 (ABC), 3 to 4–6 (DEF), and so on. Lines 410–460 step through the combinations like an odometer: the first position’s offset is incremented, and when it passes 2, or when the digit is 0 or 1, it is reset and the carry moves to the next position. When the carry runs past position 7, the program prints DONE. ### Notable Techniques - Input is validated for length and checked one character at a time with string comparisons against `"0"` and `"9"`. - `PAUSE 4E4` waits for a keypress, which `INKEY$` then reads. - Positions holding 0 or 1 are skipped by the odometer, so no duplicate combinations are printed. ### Potential Issues - If the number contains a non-digit, line 220 jumps to line 280 instead of back to the input prompt. At that point `I` is 8 after the checking loop, so `N$(8)` is out of range and the program stops with an error rather than asking again. - The error flag `FL` is set only once, at line 80, and is never reset. ## Source Code ``` 10 DIM A(7) 20 LET A$="ABCDEFGHIJKLMNOPRSTUVWXY" 30 LET NP=0 40 FOR I=1 TO 7 50 LET A(I)=0 60 NEXT I 70 SLOW 80 LET FL=0 89 REM --GET TELEPHONE NUMBER-- 90 CLS 100 PRINT TAB 10;"DIAL-A-WORD" 110 PRINT 120 PRINT "PLEASE TYPE IN A 7-DIGIT PHONE","NUMBER (IN THIS FORM: 5558888):" 130 PRINT "THEN PRESS " 140 PRINT 150 PRINT "NUMBER?" 160 INPUT N$ 170 PRINT N$ 179 REM --CHECK FOR ERRORS-- 180 IF LEN N$<>7 THEN GOTO 90 190 FOR I=1 TO 7 200 IF N$(I)<"0" OR N$(I)>"9" THEN LET FL=1 210 NEXT I 220 IF FL<>0 THEN GOTO 280 230 CLS 240 FOR I=1 TO 7 250 IF N$(I)>="2" THEN GOTO 280 260 PRINT N$(I); 270 GOTO 290 280 PRINT A$(VAL (N$(I))*3-5+A(I)); 290 NEXT I 300 PRINT " "; 310 LET NP=NP+1 320 IF NP<76 THEN GOTO 410 330 PRINT 340 PRINT 350 PRINT "PRESS TO CONTINUE,"," TO QUIT." 359 REM --WAIT FOR KEY TO BE PRESSED-- 360 PAUSE 4E4 370 IF INKEY$ ="Q" THEN STOP 380 IF INKEY$ <>"C" THEN GOTO 360 390 LET NP=0 400 CLS 409 REM --PRODUCE NEXT COMBINATION-- 410 LET P=1 420 LET A(P)=A(P)+1 430 IF A(P)<3 AND N$(P)>"1" THEN GOTO 240 440 LET A(P)=0 450 LET P=P+1 460 IF P<8 THEN GOTO 420 470 PRINT 480 PRINT "DONE." 490 STOP 500 SAVE "DIALAWOR[D]" 510 GOTO 10 ```