Code position effects memory usage?

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Bill H
Posts: 163
Joined: Sat Nov 27, 2010 6:05 pm

Code position effects memory usage?

Post by Bill H »

I have a game I am making in pure Basic. I am writing it using a text editor and using labels for line numbers and then using zxtext2p to make a .P file. It has 550 lines of code that replicate 220 some data statements using LET and GOTO (referenced with a computed GOSUB). If this code is in the middle of my overall program I have 500 bytes of memory left, if I move it to the end, remake the.Pfile and reload I have 832 bytes of memory left. Why would I get more memory by moving the code?

Bill H
Post Reply