Stop Autorunning Programs

Developer(s): Karl Brendel
Date: 1984
Type: Program
Platform(s): ZX81, TS 1000
Tags: Utility

A program saved with SAVE inside a program line starts running as soon as it loads, which makes it hard to look at or copy. This utility calls the ROM LOAD routine from machine code with an empty file name (“”), so after the load it comes back to the routine, which jumps to the STOP code. You get report 9 instead of a running program.

First set RAMTOP for your memory size: POKE 16389,n, POKE 16388,235 and NEW, where n is 67 for 1K, 71 for 2K, 127 for 16K, 191 for 32K and 255 for 48K or 64K. Then LOAD this program and type GOTO 10. It copies the 20 bytes, held in the array D, to just above RAMTOP and prints LOAD WITH RAND USR and the address to use. Start the tape you want to examine and type that RAND USR.

The article has you type in the listing, RUN it, enter the 20 numbers and delete line 30 before saving. The download is that saved program, with the numbers already in the array.

Published in Syntax July 1984 (Stop Autorunning Programs).

Image Gallery

Source Code

   5 DIM D(20)
  10 LET A=(PEEK 16389)*256+(PEEK 16388)
  20 FOR X=1 TO 20
  40 POKE A+X,D(X)
  50 NEXT X
  60 PRINT "LOAD WITH RAND USR ";A+1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.