--- title: "ROM to RAM Copier" id: 72008 type: "computer_media" slug: "rom-to-ram-copier" url: "http://localhost/computer_media/rom-to-ram-copier/" markdown_url: "http://localhost/computer_media/rom-to-ram-copier.md" published_at: "2026-10-20T14:07:43+00:00" modified_at: "2026-10-20T14:15:19+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "A short BASIC routine that checks whether high memory mirrors the ROM, then copies the 8K ROM byte by byte into RAM at 8192–16383." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" 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/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Utility" slug: "utility" taxonomy: "genre" url: "http://localhost/type/utility/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/ROM%20to%20RAM%20Copier%20%28198x%29%28-%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "198x" related_content: - id: 71901 title: "64K QSAVE" type: "computer_media" url: "http://localhost/computer_media/64k-qsave/" media_type_tags: "Utility" --- # ROM to RAM Copier Copies the 8K ROM into RAM at addresses 8192–16383, for a machine with memory fitted in the 8K–16K area. The first part, lines 10–75, compares every byte from 49152 to 65535 with the ROM, in two passes of 8192 bytes, and stops at the first mismatch; if the upper memory is a mirror of the ROM it prints the final address, 65536. The second part, started with `GOTO 80`, reads each ROM byte with `PEEK` and `POKE`s it into the 8–16K block. It came from an unlabeled tape. Two recordings, `ROM1` and `ROM2`, are identical. Line 160 saves the program as `ROM` and line 170 restarts it with `RUN` after loading. ## Program Analysis ### Program Structure - 10–75: verification loop. `X` starts at 49152 and keeps rising across both passes of the `J` loop while `I` runs 0–8191 each time, so the 16K from 49152 up is checked against two copies of the ROM. - 80–150: copy loop, one byte at a time, with `PAUSE 3` after each byte. - 160–170: `SAVE "ROM"` and `RUN`. ### Potential Issues - The `PAUSE 3` in the copy loop adds about seven minutes of waiting across 8192 bytes; the program does not say why it is there. - On a machine with no RAM at 8192–16383, the `POKE`s have no effect, and the program does not check that the copy worked. ## Source Code ``` 10 LET X=49152 20 FOR J=1 TO 2 30 FOR I=0 TO 8191 40 IF PEEK X<>PEEK I THEN STOP 42 LET X=X+1 50 NEXT I 60 NEXT J 70 PRINT X 75 STOP 80 LET X=8192 90 FOR I=0 TO 8191 100 POKE X,PEEK I 120 PAUSE 3 130 LET X=X+1 140 NEXT I 150 STOP 160 SAVE "RO[M]" 170 RUN ```