CONTINUE command

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Posts: 409
Joined: Wed Apr 22, 2009 10:22 am

Re: CONTINUE command

Post by Shaun_B » Sun May 14, 2017 4:30 pm

PokeMon wrote:
Sun May 14, 2017 2:06 pm
Yes but what do you do with a saved byte only and how many bytes do you need to manipulate the CONTINUE target ?
This is all theoretical with no practice relevance and by the way, using GOTO A needs also a variable entry with 5 bytes ... :P
Only if you assume that I need to update the CONTINUE end-point more than once. Also I am programming the ZX80 with 4K ROM - not 8K ROM. Variables are 2-bytes as far as I know, not 5.



User avatar
Posts: 2224
Joined: Sat Sep 17, 2011 6:48 pm

Re: CONTINUE command

Post by PokeMon » Sun May 14, 2017 6:25 pm

In fact it is 3 bytes it takes in the variables section. Letter plus it's value.
It is possible to use CONTINUE and save just a single byte.
You can prepare the desired start value in 16407 in your program already as variables are part of the loaded program.

But you have then only one single GOTO statement to serve. Or a single BASIC POKE statement in your program takes 12 additional bytes to change the CONTINUE value. And be aware that any STOP statement -or- BASIC error will destroy (set) your CONTINUE value to some unwanted data. So your approach is possible in general but not useful in practice to save just one single byte for the whole program.

Post Reply