--- title: "RENUM (Syntax)" id: 77756 type: "computer_media" slug: "renum-syntax" url: "http://localhost/computer_media/renum-syntax/" markdown_url: "http://localhost/computer_media/renum-syntax.md" published_at: "2026-11-18T16:43:06+00:00" modified_at: "2026-11-18T16:43:06+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/renum-mc-1.png" excerpt: "A 27-byte machine-code line renumberer for the ZX81 that hides above RAMTOP and renumbers your program 10, 20, 30... with one RAND USR call." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" 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: "Mike Mullen" slug: "mike-mullen" taxonomy: "indiv" url: "http://localhost/indiv/mike-mullen/" genre: - name: "Renumber" slug: "renumber" taxonomy: "genre" url: "http://localhost/type/renumber/" media_type: "Program" programmers: - name: "Mike Mullen" slug: "mike-mullen" taxonomy: "indiv" url: "http://localhost/indiv/mike-mullen/" download_url: "https://archive.org/download/timex-sinclair-software-archive/RENUM%20%28Syntax%29%20%281982%29%28Mullen%2C%20Mike%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/renum-mc-1.png" - url: "http://localhost/wp-content/uploads/2026/11/renum-mc-2.png" - url: "http://localhost/wp-content/uploads/2026/11/renum-mc-3.png" article_media: - id: 19988 title: "Line Renumbering" type: "article" url: "http://localhost/article/line-renumbering-2/" media_type_tags: "Renumber" license: false --- # RENUM (Syntax) A tiny machine-code renumberer. LOAD it and it runs by itself: it copies its 27 bytes of machine code from the line 10 REM to address 32000, moves RAMTOP down to 32000 to protect them, and clears itself with NEW. You see a flicker and the K cursor. Then type or LOAD your own program and enter RAND USR 32000 to renumber every line 10, 20, 30 and so on. GOTO and GOSUB targets are not changed. To start at a line other than 10, POKE 32004 with the first line number; to use a step other than 10, POKE 32020 with the step (both up to 255). [Editor’s note: the article gives POKE 16518 and POKE 16534. Those are the bytes in the REM copy, which NEW erases; once the routine has moved, the same bytes are at 32004 and 32020.] The article has you type lines 10-210, RUN and enter the decimal bytes, then delete the entry lines 20-70 and 150 and save with GOTO 200. The download is that saved program, with the machine code already in the REM. It needs 16K. The same article also prints RENO, a BASIC renumberer by Larry Lockwood. Published in Syntax June 1982 ([Line Renumbering](https://timexsinclair.com/article/line-renumbering-2/)). ## Source Code ``` 10 REM 123456789012345678901234567 80 LET L=16514 90 FOR X=32000 TO 32026 100 POKE X,PEEK L 110 LET L=L+1 120 NEXT X 130 POKE 16388,0 140 POKE 16389,125 160 NEW 200 SAVE "RENUM" 210 RUN ```