--- title: "Spaces in REM Statements" id: 77764 type: "computer_media" slug: "spaces-in-rem-statements" url: "http://localhost/computer_media/spaces-in-rem-statements/" markdown_url: "http://localhost/computer_media/spaces-in-rem-statements.md" published_at: "2026-11-18T16:43:08+00:00" modified_at: "2026-11-18T16:43:08+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/spaces-in-rem-statements-1.png" excerpt: "Make a REM line of any length, up to 14991 characters, to hold machine code, using a 9-byte routine that calls the ZX81 ROM to open one space at a time." 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: "Frank O'Hara" slug: "frank-ohara" taxonomy: "indiv" url: "http://localhost/indiv/frank-ohara/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" programmers: - name: "Frank O'Hara" slug: "frank-ohara" taxonomy: "indiv" url: "http://localhost/indiv/frank-ohara/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Spaces%20in%20REM%20Statements%20%281982%29%28O%27Hara%2C%20Frank%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/spaces-in-rem-statements-1.png" - url: "http://localhost/wp-content/uploads/2026/11/spaces-in-rem-statements-2.png" article_media: - id: 19288 title: "Spaces in REM Statements" type: "article" url: "http://localhost/article/spaces-in-rem-statements/" media_type_tags: "Machine Language" license: false --- # Spaces in REM Statements Typing a long REM line of filler characters to hold machine code is tedious. This program builds one for you. RUN it and it tells you to enter 200 REM, then GOTO 40. Enter how many characters you want, and the REM at line 200 grows one full stop at a time, up to 14991 of them. A 500-byte REM takes less than 20 seconds. Line 10 holds a small machine-code routine that calls the ROM to make one space and move all the pointers up. When your REM is ready, delete lines 10-130. To change its line number, edit line 200, or if the line is too big to edit, POKE 16510,1 after deleting lines 10-130. To fill the REM with digits 1234… instead of full stops, change line 100 to POKE D+I,I-10*INT (I/10)+28. The article has you type line 10 as keystrokes (1, 2, E, graphics shift W, RND, LN, inverse full stop, graphics shift D, TAN). The download has the line already in place. Published in Syntax August 1982 ([Spaces in REM Statements](https://timexsinclair.com/article/spaces-in-rem-statements/)). ## Source Code ``` 10 REM 12E▙RNDLN .▓TAN 20 PRINT "ENTER 200 REM; THEN GOTO 40" 30 STOP 40 INPUT N 50 LET D=PEEK 16396+256*PEEK 16397-2 60 FOR I=1 TO N 70 POKE 16515,INT ((D+I)/256) 80 POKE 16514,D+I-256*PEEK 16515 90 RAND USR 16516 100 POKE D+I,27 110 NEXT I 120 POKE D-1,INT ((N+2)/256) 130 POKE D-2,N+2-256*PEEK (D-1) ```