Memory Left

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!
Post Reply
Bill H
Posts: 129
Joined: Sat Nov 27, 2010 5:05 pm

Memory Left

Post by Bill H » Sun Nov 04, 2012 6: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

User avatar
PokeMon
Posts: 2171
Joined: Sat Sep 17, 2011 5:48 pm

Re: Memory Left

Post by PokeMon » Mon Nov 05, 2012 5:16 pm

It should be ERR_SP-STK_END-machine_stack.
Maybe calculate 100 Byte for machine stack to be on the safe site.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest