I had this thought yesterday, it is probably not possible, but the thought was:right now, on the zx81 / ts1000 if you want to save variables with your program you can but when you load it you have to do a goto to restart the program, running erases them. My thought was, since variables are right after the program code, could you not make a few pokes to the system variables to move the end of program / beginning of variable pointers ( sorry i forget the correct names) to past the variable data and the save. This would in essence make the variables program code as I don't think the rom looks at the programs when you load it for errors. You can then have the program make a few pokes when first run to restore the pointers and now the variables are accessible as variables.
Does this make sense or am I getting senile?
Bill H
Saving variables
Re: Saving variables
Hi Bill,
Sounds plausible. The display file sits between the code and the variables and i wonder if this would have a bearing on things.
C
Sounds plausible. The display file sits between the code and the variables and i wonder if this would have a bearing on things.
C
Re: Saving variables
I don't understand the problem. Why use RUN when you can use GOTO for not destroy variables ?Bill H wrote:right now, on the zx81 / ts1000 if you want to save variables with your program you can but when you load it you have to do a goto to restart the program, running erases them.
By the way you can save a program by entering SAVE through a line number in your program (e.g. with a defined key or function) and when the program is loaded from tape it automatically continues its run and not destroy defined variables.
