--- title: "Retrace Your Steps" id: 76583 type: "computer_media" slug: "retrace-your-steps" url: "http://localhost/computer_media/retrace-your-steps/" markdown_url: "http://localhost/computer_media/retrace-your-steps.md" published_at: "2026-11-11T08:02:25+00:00" modified_at: "2026-11-11T08:02:25+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/retrace-your-steps-1.png" excerpt: "Draw on the ZX81 screen with the arrow keys, then press R to watch the computer retrace every step." 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 Margrave" slug: "david-margrave" taxonomy: "indiv" url: "http://localhost/indiv/david-margrave/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "David Margrave" slug: "david-margrave" taxonomy: "indiv" url: "http://localhost/indiv/david-margrave/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Retrace%20Your%20Steps%20%281983%29%28Margrave%2C%20David%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/retrace-your-steps-1.png" - url: "http://localhost/wp-content/uploads/2026/11/retrace-your-steps-2.png" article_media: - id: 19621 title: "Retrace Your Steps" type: "article" url: "http://localhost/article/retrace-your-steps/" media_type_tags: "Graphics" license: false --- # Retrace Your Steps Move a point from the lower left corner with the 5, 6, 7 and 8 keys, leaving a line behind; every position is stored in two 1000-element arrays. Press R and the screen clears and the drawing is replayed in order, then the program stops. Needs 16K. RUN in SLOW mode, as the article says. BREAK quits early. Published in Syntax October 1983 ([Retrace Your Steps](https://timexsinclair.com/article/retrace-your-steps/)). ## Source Code ``` 10 CLS 20 DIM X(1000) 30 DIM Y(1000) 40 FOR Z=1 TO 1000 50 IF INKEY$="5" THEN LET X(Z)=X(Z)-1 60 IF INKEY$="8" THEN LET X(Z)=X(Z)+1 70 IF INKEY$="6" THEN LET Y(Z)=Y(Z)-1 80 IF INKEY$="7" THEN LET Y(Z)=Y(Z)+1 90 PLOT X(Z),Y(Z) 100 IF INKEY$="R" THEN GOSUB 5000 110 LET X(Z+1)=X(Z) 120 LET Y(Z+1)=Y(Z) 130 NEXT Z 5000 CLS 5010 FOR Z=1 TO 1000 5020 PLOT X(Z),Y(Z) 5030 NEXT Z 5040 STOP ```