Phone Number Word Generator

Developer(s): Lawrence Souder
Date: 1982
Type: Program
Platform(s): ZX81, TS 1000

Prints every letter combination for a seven-digit telephone number, using the three letters on each key of the dial (no Q or Z). Enter the digits one at a time, without 0 or 1; the first 40 combinations appear after about 15 seconds, and NEWLINE shows the next 40. The article’s example is 438-5678, which spells GET LOST. Inspired by Harvey Deitel’s Introduction to Computer Programming.

Syntax printed checksums for both ROMs, and the typed listing matches the 8K ROM sum, so the download is a ZX81 file. As printed, line 110 reads NEXT X, which stops the program after 729 combinations; the March and May 1982 correction columns change it to NEXT Z. The download has both versions.

Published in Syntax February 1982 (Phone Number Word Generator).

Related Articles

What does your phone number spell out if changed to letters? A friend's phone number, 438-5678, spells GET LOST. A bank's auto loan department answers NEXT CAR.

Related Content

Image Gallery

Source Code

   5 LET P=0
   7 LET Q=0
  10 INPUT A
  12 INPUT B
  14 INPUT C
  16 INPUT D
  18 INPUT E
  20 INPUT F
  22 INPUT G
  24 FOR Z=0 TO 2
  26 FOR Y=0 TO 2
  28 FOR X=0 TO 2
  30 FOR W=0 TO 2
  32 FOR V=0 TO 2
  34 FOR U=0 TO 2
  36 FOR T=0 TO 2
  38 LET M=A
  40 LET N=T
  42 GO SUB 500
  44 LET M=B
  46 LET N=U
  48 GO SUB 500
  50 LET M=C
  54 LET N=V
  56 GO SUB 500
  58 LET M=D
  60 LET N=W
  62 GO SUB 500
  64 LET M=E
  66 LET N=X
  68 GO SUB 500
  70 LET M=F
  72 LET N=Y
  74 GO SUB 500
  76 LET M=G
  78 LET N=Z
  80 GO SUB 500
  82 PRINT " ";
  84 LET P=P+1
  85 LET Q=Q+1
  86 IF P>39 THEN GO SUB 300
  88 IF Q=2187 THEN GO TO 200
  90 NEXT T
  92 NEXT U
  94 NEXT V
  96 NEXT W
  98 NEXT X
 100 NEXT Y
 110 NEXT X
 200 PRINT "FINE"
 202 STOP
 300 INPUT R$
 302 LET P=0
 304 CLS
 306 RETURN
 500 LET J=2*M+32+M+N
 502 IF J>53 THEN LET J=J+1
 504 PRINT CHR$(J);
 506 RETURN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.