---------- Forwarded message ---------
From: Charles Hudson <clh...@gmail.com>
Date: Thu, Apr 29, 2021 at 10:35 AM
Subject: Memory release question
To: <m100@lists.bitchin100.com>


As noted, got the Model 100 assembler / debugger recently.  Installed on a
Model 102 which has 32k and which, before installation, reported 28k free.
Only 1 .BA program beside the standard applications.

Loaded ZBGASM from tape and saved it to memory, after which the free memory
was about 7k.  I thought that was a big chunk as the manual says the
assembler occupies about 8.5k.  But it was in memory and I was able to
invoke it from the menu so I proceeded to enter a sample program from the
manual, assemble and run it, filling the screen with character 0FFH.

Adding the sample program, SAMPLE.DO, and executable, SAMPLE.CO, didn't
seem to reduce available memory much: still at 7K.  I deleted ("KILL"ed
from BASIC) the two samples and the ZBGASM.CO files and was left with about
15K free memory.  Hmmm....

So I went back into BASIC and entered NEW (no change) CLEAR (no change) and
tried hitting the reset button (no change).  As far as I can tell I have
something occupying about 12k of memory that the system can't dislodge.  I
suppose I could remove all power and turn off the memory backup but I'd
rather think there is another way around this.  And I'd like to figure out
what I'm doing to cause this memory "hole".

I would appreciate any suggestions for figuring out how to remove it and
restore max memory.
Thanks,
-CH-

Thanks to you both for your responses:  As a follow-up to my first post I
brought up the M102 and from a BASIC prompt typed ?HIMEM.  49xxx was the
response.  ?MAXRAM showed 62,960 bytes.  Clearly this was the problem.

I had consulted my *TRS-80 Model 100 Portable Computer* manual on the use
of CLEAR (p.129), where I read: "10 CLEAR clears all variables, closes open
files, sets the available string space to 256 bytes, and releases all of
available memory to BASIC."  I misunderstood the use of "available",
because a note earlier on the page says: "However, if you have protected a
portion of *high memory* in a previous program, BASIC keeps this part of
memory protected until you CLEAR it."

The magic incantation?  CLEAR 100, MAXRAM.  I now have 29,270 bytes free,
according to the OS.  Q.E.D.
Thanks, all for your help.
-CH-

Reply via email to