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 POKEs 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.
Xstarts at 49152 and keeps rising across both passes of theJloop whileIruns 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 3after each byte. - 160–170:
SAVE "ROM"andRUN.
Potential Issues
- The
PAUSE 3in 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
POKEs 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 RUNNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.