--- title: "Etching Program" id: 76424 type: "computer_media" slug: "etching-program" url: "http://localhost/computer_media/etching-program/" markdown_url: "http://localhost/computer_media/etching-program.md" published_at: "2026-11-11T08:02:43+00:00" modified_at: "2026-11-11T08:02:43+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/etching-program-1.png" excerpt: "Watch a line bounce around the ZX81 screen, etching a pattern from the slope you choose, until it runs into a corner." 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: "David Rowland" slug: "david-rowland" taxonomy: "indiv" url: "http://localhost/indiv/david-rowland/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "David Rowland" slug: "david-rowland" taxonomy: "indiv" url: "http://localhost/indiv/david-rowland/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Etching%20Program%20%281982%29%28Rowland%2C%20David%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/etching-program-1.png" - url: "http://localhost/wp-content/uploads/2026/11/etching-program-2.png" - url: "http://localhost/wp-content/uploads/2026/11/etching-program-3.png" article_media: - id: 19352 title: "Etching Program" type: "article" url: "http://localhost/article/etching-program/" related_content: - id: 19395 title: "Syntax Errors" type: "article" url: "http://localhost/article/syntax-errors-7/" media_type_tags: "Graphics" license: false --- # Etching Program A self-drawing pattern program for the 8K ROM. Enter a slope (0 for horizontal, 1 for 45 degrees up, -1 for 45 degrees down; values between -5 and 5 work best), and the program traces a line from the left edge, bouncing off the sides, top and bottom, until it runs into a corner. Press M to pause and any key to go on; BREAK stops it. The December 1982 issue corrected line 380 to LET X=X-1. As printed it reads LET X=X+1, so when the line reaches the right edge it keeps going and the program stops with error B at line 830. The download has both versions. With 1K the program runs out of memory (error 4) as the pattern fills the screen; give it more RAM. Published in Syntax November 1982 ([Etching Program](https://timexsinclair.com/article/etching-program/)). ## Source Code ``` 110 LET X=0 120 LET Y=0 130 PLOT X, Y+20 140 INPUT Z 160 LET U = 1 165 LET T = 2 170 LET Y = Y+1 180 LET X = X+1 185 GOSUB 800 220 GOTO 170 260 LET U = 0 265 LET T = 3 270 LET Y = Y-1 280 LET X = X+1 285 GOSUB 800 320 GOTO 270 360 LET U = 3 365 LET T = 0 370 LET Y = Y+1 380 LET X = X+1 385 GOSUB 800 420 GOTO 370 460 LET U = 2 465 LET T = 1 470 LET Y = Y-1 480 LET X = X-1 485 GOSUB 800 520 GOTO 470 800 LET B=20+Z*Y 805 IF INKEY$ = "M" THEN PAUSE 10000 810 IF ABS B > 43 THEN GOTO (460-100*T) 820 IF ABS X = 64 THEN GOTO (460-100*U) 830 UNPLOT X,B 840 PLOT X,B 850 RETURN ```