> Type MAXFILES=0:MENU and press ENTER.

 

The BASIC phrase MAXFILES=0 deallocates all external file buffers.  Only the
internal file buffer, FB#0, remains allocated - it can not be deallocated.

 

Note that as a default, a cold-start allocates one internal files buffer,
FB#1.  Many programs assume that FB#1 is allocated and do not check to see
if it actually is allocated.  If a BASIC statement, such as
OPEN"filnam"FORAPPENDAS#1, is interpreted while the referenced external file
buffer is deallocated, the result is the "?BN Error" message.  So you might
want to use the BASIC phrase MAXFILES=1 in order to allocate external file
buffer FB#1 so as to avoid the "?BN Error" caused by programs the assume
FB#1 is allocated.

 

The most considerate programs that require the use one of more external file
buffers do three things: save the original MAXFILES quantity of external
file buffers during program initialization (a tricky thing to do), allocate
the required quantity of external file buffers (e.g., 2 file buffers
required for a program that reads content from one file and writes content
to another file), and restore the original MAXFILES quantity of external
file buffers upon program termination.  Unfortunately, few programs are this
considerate.

 

Slightly considerate programs simply allocate the required quantity of
external file buffers, and set the MAXFILES quantity of external file
buffers to 1 upon program termination -- the same situation that exists by
default after a cold-start.

 

Completely inconsiderate programs allocate the required quantity of external
file buffers, and leave them allocated upon program termination.  If they
have any user documentation at all, the worst of such inconsiderate programs
do not document this fact.  So the program user has no clue that these
programs potentially reduce the quantity of "Bytes free" after usage.

 

Keeper of the Primordial Bit (born of the Big Bit Bang), -= Ron Wiesen =-

 

  _____  

From: M100 [mailto:m100-boun...@lists.bitchin100.com] On Behalf Of Josh
Malone
Sent: Friday, October 02, 2015 23:09
To: Model 100 Discussion
Subject: Re: [M100] Way to list size of files in memory?

 

Thanks for the detailed reply. I'm still cutting my teeth on this thing.

Hmm... so I had a lot of data stored in my paste buffer, then? Just
wondering how that size came out negative. It's all cleared up now though.

Thanks again.

-Josh

 

On Fri, Oct 2, 2015 at 3:30 AM, Ron Wiesen <ronwie...@att.net> wrote:

Hello Josh:

 

Refer to http://www.club100.org/library/doc/ramabout.html and see the first
illustration.

 

Invoke the BASIC interpreter.  Type NEW and press ENTER.  Type CLEAR0,MAXRAM
and press ENTER.  Type MAXFILES=0:MENU and press ENTER.

 

Invoke file FOO.DO.  Press F7.  Hold the CTRL key depressed and tap the Z
key.  Press F6.  Press F8.  File FOO.DO now has a volume size of 1.

 

Invoke the BASIC interpreter.  Type CLEAR:MAXFILES=0:MENU and press ENTER.

 

Other than deleting files (GHOST.BA, FILESZ.BA, and FOO.DO) in order to
further reduce the RAM consumption within your M10x laptop, RAM consumption
now is at absolute minimum.  This fact should be reflected by the now
increased quantity of "Bytes free" that is reported at the bottom right
corner of the LCD screen.

 

Keeper of the Primordial Bit (born of the Big Bit Bang), -= Ron Wiesen =-

 

Reply via email to