--- title: "Cryptoquote" id: 76385 type: "computer_media" slug: "cryptoquote" url: "http://localhost/computer_media/cryptoquote/" markdown_url: "http://localhost/computer_media/cryptoquote.md" published_at: "2026-11-11T08:02:47+00:00" modified_at: "2026-11-11T08:02:47+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/cryptoquote-1.png" excerpt: "Decode a newspaper-style cryptoquote with your ZX80's help: it shows the letter frequencies and redraws the puzzle as you substitute letters." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/Cryptoquote%20%281980%29%28-%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1980" images: - url: "http://localhost/wp-content/uploads/2026/11/cryptoquote-1.png" - url: "http://localhost/wp-content/uploads/2026/11/cryptoquote-2.png" article_media: - id: 19200 title: "Cryptoquote — Use Your ZX80 to Help You Solve Substitution Ciphers" type: "article" url: "http://localhost/article/cryptoquote-use-your-zx80-to-help-you-solve-substitution-ciphers/" related_content: - id: 19209 title: "How to Wire a Big Keyboard" type: "article" url: "http://localhost/article/how-to-wire-a-big-keyboard/" - id: 19898 title: "Dear Editor" type: "article" url: "http://localhost/article/dear-editor-33/" media_type_tags: "Game" license: false --- # Cryptoquote A helper for solving substitution ciphers on a 1K ZX80. The program prints the coded quotation with a dash under each letter you have not yet solved. Answer COMMAND with F to see how often each letter occurs, or with X=L to say that the coded letter X stands for L; the quotation is reprinted with every solved letter filled in. The article lists the usual frequency order of English letters, ETAONRISHDLFCMUGYPWBVKXJQZ, as a starting point. To set a new puzzle, change the quotation in line 990, keeping it no longer than the one printed so the display fits in 1K. The answer to the printed puzzle appeared in the next issue. Published in Syntax November 1980 ([Cryptoquote — Use Your ZX80 to Help You Solve Substitution Ciphers](https://timexsinclair.com/article/cryptoquote-use-your-zx80-to-help-you-solve-substitution-ciphers/)). ## Source Code ``` 6 DIM T(25) 7 LET K=1000 60 FOR X=0 TO 25 65 LET T(X)=220 70 NEXT X 100 CLS 110 GO SUB 990 120 PRINT T$ 123 LET X=CODE(T$) 125 IF X<38 OR X>63 THEN GO TO 170 130 PRINT CHR$(T(X-38)); 140 LET T$=TL$(T$) 160 GO TO 123 170 IF X=1 THEN GO TO 200 175 PRINT CHR$(X); 180 GO TO 140 200 PRINT 205 PRINT "COMMAND:"; 210 INPUT F$ 220 IF CODE(TL$(F$))=227 THEN LET T(CODE(F$)-38)=CODE(TL$(TL$(F$))) 222 IF F$="F" THEN GO TO 400 240 GO TO 100 400 CLS 410 GO SUB 990 460 LET N=CODE(T$)-38 470 IF N=-37 THEN GO TO 500 480 IF N<0 OR N>25 THEN GO TO 485 483 LET T(N)=T(N) + K 485 LET T$=TL$(T$) 490 GO TO 460 500 FOR X=0 TO 12 505 LET S=T(X)-(T(X)/K)*K 506 LET S2=T(X+13)-(T(X+13)/K)*K 510 PRINT CHR$(X+38);"(";CHR$(S);"):";T(X)/K;" ";CHR$(X+51);"(";CHR$(S2);"):";T(X+13)/K 520 LET T(X)=S 525 LET T(X+13)=S2 530 NEXT X 540 GO TO 200 990 LET T$="UVQ JVQQXZX KQ JQYGZKZ UBKV YWJVBPZX WJJZGKX KVZ JQPMBKBQPX QC XFWDZLH" 999 RETURN ```