--- title: "Reverse" id: 76589 type: "computer_media" slug: "reverse" url: "http://localhost/computer_media/reverse/" markdown_url: "http://localhost/computer_media/reverse.md" published_at: "2026-11-11T08:02:26+00:00" modified_at: "2026-11-11T08:02:26+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/reverse-1.png" excerpt: "Put nine digits in order by reversing groups of them: say how many digits from the left to flip, in as few moves as you can." 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/" indiv: - name: "Bill Eckel" slug: "bill-eckel" taxonomy: "indiv" url: "http://localhost/indiv/bill-eckel/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" programmers: - name: "Bill Eckel" slug: "bill-eckel" taxonomy: "indiv" url: "http://localhost/indiv/bill-eckel/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Reverse%20%281981%29%28Eckel%2C%20Bill%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1981" images: - url: "http://localhost/wp-content/uploads/2026/11/reverse-1.png" - url: "http://localhost/wp-content/uploads/2026/11/reverse-2.png" article_media: - id: 19994 title: "Reverse" type: "article" url: "http://localhost/article/reverse/" media_type_tags: "Game" license: false --- # Reverse The program shows a list of the digits 1 to 9 in random order. Answer NO. TO REVERSE with a number from 1 to 9 and that many digits, counted from the left, are reversed. Get the list into order 1 to 9 and it tells you how many moves you took and offers another game; 0 makes a new list. Syntax added changes for the 8K ROM (lines 100, 120, 260 and 310), with a note that the game then needs more than 1K. Published in Syntax November 1981 ([Reverse](https://timexsinclair.com/article/reverse/)). ## Source Code ``` 30 LET N=9 40 DIM A(N) 50 LET T=0 100 LET A(1)=RND(N-1)+1 110 FOR K=2 TO N 120 LET A(K)=RND(N) 130 FOR J=1 TO K-1 140 IF A(K)=A(J) THEN GO TO 120 150 NEXT J 160 NEXT K 210 GO SUB 600 220 PRINT 230 PRINT "NO. TO REVERSE" 240 INPUT R 250 IF R=0 THEN GO TO 50 260 IF R=N OR R