That Zero Line Again

Author(s): D. Spencer
Publication: LISTing Newsletter
Date: September 1984
Pages: 11

On reading the last issue of Computerchat, I became interested in the different methods used to create line 0’s in listings. The easiest way to do this is to write a line 1 and then POKE 23756,0. However any line 0 can be removed by POKE 23756,1 or whatever.

I put my copyright message at the other end of the program. When a line 1 is written, POKE 23755,46: POKE 23756,224 will turn it into a line 2000 (in effect a line 12000). This type of line will list after 9999 and is also edit-proof as it cannot be re-entered. For POKE 23755,n, n can take any value between 40 and 63.

It is simple to write a program and then merge a short two-line BASIC program containing the copyright messages with it. However when a program of 7K or more, containing a line greater than 9999, is merged into the machine the result is a crash as the machine tries to compose a line greater than 9999 with the contents of memory. This means the auto-run cannot be avoided. If POKE 23613, PEEK 23730-5 is used to disengage the BREAK key, then the BASIC program produced can be as hard to copy as a machine code program.

The line number POKEs depend on BASIC program area starting at 23755 which is not true on a Spectrum with microdrives.

P.S. Did you know that on the Spectrum a basic line can be entered that does not contain a key word? A basic line can be entered that contains only a cursor colour command, 1-0 in extended mode….is this another bug in the ROM?

P.P.S. Try this:

10 PLOT 128,0
20 DRAW 0, 175, 189xPI

D. Spencer
Leek, Staffs

Quarterly Newsletter of the SOFTWARE LIBRARY

Also printed in LISTing September 1989.