Frequently Asked Questions about the Sinclair ZX81
Forum rules
This is designed to be a simple set of questions and answers - please no general chit chat in here - keep it focused to help new users!
Bill H
Posts: 163 Joined: Sat Nov 27, 2010 6:05 pm
Post
by Bill H » Sun Nov 04, 2012 7:57 pm
Can anyone tell me what combination of peeks will tell me how much memory I have left while writing a Basic program? I believe it would be STKBOT - E_LINE
Code: Select all
PRINT ((PEEK(16410)*256) + PEEK(16411)) - ((PEEK(16404)*256) + PEEK(16405))
but am not sure.
Bill H
PokeMon
Posts: 2264 Joined: Sat Sep 17, 2011 6:48 pm
Post
by PokeMon » Mon Nov 05, 2012 6:16 pm
It should be ERR_SP-STK_END-machine_stack.
Maybe calculate 100 Byte for machine stack to be on the safe site.