--- title: "Bookworm (The Plotter)" id: 80642 type: "computer_media" slug: "bookworm-the-plotter" url: "http://localhost/computer_media/bookworm-the-plotter/" markdown_url: "http://localhost/computer_media/bookworm-the-plotter.md" published_at: "2026-11-26T15:24:19+00:00" modified_at: "2026-11-26T15:24:19+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/bookworm-1.png" excerpt: "The bookworm puzzle, with the worm shown eating through the books, on the TS2068." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" programmers: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Bookworm%20%28The%20Plotter%29%20%281992%29%28Wagner%2C%20Dick%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Bookworm (The Plotter) (1992)(Wagner, Dick)(TS2068)(US)(Program)/Bookworm (The Plotter) (1992)(Wagner, Dick)(TS2068)(US)(Program).tap" mediadate: "1992" images: - url: "http://localhost/wp-content/uploads/2026/11/bookworm-1.png" - url: "http://localhost/wp-content/uploads/2026/11/bookworm-2.png" - url: "http://localhost/wp-content/uploads/2026/11/bookworm-3.png" - url: "http://localhost/wp-content/uploads/2026/11/bookworm-4.png" - url: "http://localhost/wp-content/uploads/2026/11/bookworm-5.png" - url: "http://localhost/wp-content/uploads/2026/11/bookworm-6.png" article_media: - id: 21156 title: "Bookworm" type: "article" url: "http://localhost/article/bookworm-2/" - id: 21151 title: "More on Bookworm" type: "article" url: "http://localhost/article/more-on-bookworm/" media_type_tags: "Game" license: false --- # Bookworm (The Plotter) A puzzle: five 100-page books stand on a shelf and a bookworm eats in a straight line from the first page of the first book to the last page of the last book. How many pages did it eat? Type an answer; a wrong one asks again. The right answer brings up a top view of the books on the shelf, drawn with graphics characters, and the worm eating its way through them. The puzzle is from Marilyn vos Savant’s column in the Sunday Oregonian of October 25 (1992). The program does not start by itself; the article suggests saving it with LINE 50. The second file has Jack Armstrong’s changes from the next issue, as printed: shelf ends, book numbers 1-5, a faster worm, and a colour line 45 printed without its colour numbers, which stops RUN with an error; start that version with RUN 50 (or GO TO 50), or put your own colours in line 45. Published in The Plotter November 1992 ([Bookworm](https://timexsinclair.com/article/bookworm-2/)); Jack Armstrong’s changes in December 1992 ([More on Bookworm](https://timexsinclair.com/article/more-on-bookworm/)). ## Source Code ``` 40 REM BOOKWORM PROGRAM 45 REM DICK WAGNER 50 PRINT AT 0,0;"There is a set of 5 books on a shelf. Each book has 100 pages. A bookworm starts eating on the first page of the first book." 60 PRINT "From there the bookworm eats in a straight line through to the last page of the last book." 70 PRINT "Through how many pages did the bookworm eat?": INPUT p: PRINT : PRINT p: PAUSE 50: PRINT AT 10,0;" " 80 IF P<>302 THEN GO TO 50: IF P=302 THEN GO TO 90 90 CLS : PRINT AT 12,0;"CORRECT, 302 PAGES. HERE IS THE BOOKWORM AT WORK" 120 FOR n=65368 TO 65368+23 130 READ d: POKE n,d: NEXT n 140 DATA 130,254,254,254,254,254,254,254 150 DATA 254,254,254,254,254,254,254,254 160 DATA 254,254,254,254,254,254,254,124 200 PRINT AT 5,5;"A";"A";"A";"A";"A" 210 PRINT AT 6,5;"B";"B";"B";"B";"B" 220 PRINT AT 7,5;"C";"C";"C";"C";"C" 230 PLOT 0,108: DRAW 100,0 240 PLOT 0,140: DRAW 100,0 250 PLOT 0,139: DRAW 100,0 260 PLOT 0,138: DRAW 100,0 270 PRINT AT 0,0;"Top view of 5 books" 280 PRINT " on book shelf." 310 FOR X=45 TO (45+27) 320 PLOT 45,124: DRAW INVERSE 1;(X-45),0 325 PAUSE 50 330 NEXT X ```