[Coco] BASIC: order of operations query, and PRINT MEM
Allen Huffman
alsplace at pobox.com
Fri Jul 8 09:47:06 EDT 2022
On Jul 8, 2022, at 1:58 AM, William Astle via Coco <coco at maltedmedia.com> wrote:
>
> That extra 26 bytes is the stack and several bytes that mark an empty program. The variable table takes zero space unless you actually define a variable. Note that there's also a slop factor used in the calculation for OM errors that MEM doesn't take into account so the maximum usable memory is about 30 bytes less than what MEM says.
What is MEM measuring? In Unravelled, I see they clarify:
"This is not a true indicator of free memory because basic requires a STKBUF size buffer for the stack which MEM does not allow."
I never knew that it was different. I bet I would have if using a 4 K machine when every byte was being counted.
More information about the Coco
mailing list