--- title: "Draw and Store" id: 79540 type: "computer_media" slug: "draw-and-store" url: "http://localhost/computer_media/draw-and-store/" markdown_url: "http://localhost/computer_media/draw-and-store.md" published_at: "2026-11-22T19:36:03+00:00" modified_at: "2026-11-22T19:36:03+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-1.png" excerpt: "Draws pictures on the ZX81 or TS1000 and stores them with the program." 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/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "James John Hollandsworth" slug: "james-john-hollandsworth" taxonomy: "indiv" url: "http://localhost/indiv/james-john-hollandsworth/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "James John Hollandsworth" slug: "james-john-hollandsworth" taxonomy: "indiv" url: "http://localhost/indiv/james-john-hollandsworth/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Draw%20and%20Store%20%281982%29%28Hollandsworth%2C%20James%20John%29%28TS1000%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-1.png" - url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-2.png" - url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-3.png" - url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-4.png" - url: "http://localhost/wp-content/uploads/2026/11/draw-and-store-5.png" article_media: - id: 43615 title: "Just for Fun" type: "article" url: "http://localhost/article/just-for-fun-13/" - id: 24568 title: "Just For fun" type: "article" url: "http://localhost/article/just-for-fun-11/" media_type_tags: "Graphics" license: false --- # Draw and Store A drawing program that keeps the picture in a string array, to be saved on tape with the program and drawn again later. Enter GOTO 1 to start and answer Y for a new picture or N for the stored one. Keys 5 to 8 move the pixel, and with SHIFT they leave a trail. ENTER stores the picture; then SAVE the program. The listing is marked 2K, but storing a picture works only with a full display file, so it needs 16K: on 2K the stored picture comes back as garbage. The second file is the shorter 1K version, which only draws. It sets no starting point, so enter LET X=0 and LET Y=0 before GOTO 1. Reprinted from [SYNC, November/December 1982](https://timexsinclair.com/article/just-for-fun-11/). Published in LISTing January 1989 ([Just for Fun](https://timexsinclair.com/article/just-for-fun-13/)). ## Source Code ``` 2K RAM 1 REM JJH 1-31-82 2 REM USE GOTO 1 5 GOTO 600 10 LET Y=0 15 LET X=0 20 PLOT X,Y 25 PAUSE 40000 30 POKE 16437,255 35 LET A=CODE INKEY$ 40 IF A=118 THEN GOTO 500 55 IF A<100 THEN UNPLOT X,Y 60 LET X=X+1*(A=36 OR A=115)*(X<63)-1*(A=33 OR A=114)*(X>0) 70 LET Y=Y+1*(A=35 OR A=112)*(Y<43)-1*(A=34 OR A=113)*(Y>0) 80 GOTO 20 505 FOR A=1 TO 22 510 FOR B=1 TO 32 520 LET A$(A,B)=CHR$ PEEK ((PEEK 16396)+256*(PEEK 16397)+33*(A-1)+B) 530 NEXT B 540 NEXT A 550 STOP 600 PRINT "8K ROM DRAW A PICTURE" 610 PRINT "NEW PICTURE? Y OR N" 620 INPUT D$ 630 CLS 640 IF D$="N" THEN GOTO 700 650 DIM A$(22,32) 660 GOTO 10 700 FOR A=1 TO 22 710 FOR B=1 TO 32 720 PRINT A$(A,B); 730 NEXT B 740 NEXT A 750 GOTO 10 1K RAM 1 PLOT X,Y 2 PAUSE 40000 3 LET A=CODE INKEY$ 4 IF A<100 THEN UNPLOT X,Y 5 LET X=X+1*(A=36 OR A=115)*(X<47)-1*(A=33 OR A=114)*(X>0) 6 LET Y=Y+1*(A=35 OR A=112)*(Y<37)-1*(A=34 OR A=113)*(Y>0) 7 GOTO 1 ```