Hi Willard,
Actually, all files grow upwards from the bottom of RAM. BASIC files
are first, TEXT files are second, .CO files are last. As you add lines
to BASIC or TEXT files, everthing just shifts up. So free space at the
top is truly free.
But when you edit a TEXT file, anything in that free space will be wiped
out. When you launch TEXT to edit a file, the first thing TEXT does is
expand that file to occupy all remaining RAM. It does this by shoving
all files that are higher in RAM address to the very top, then allocates
the space in-between to that file. That way as you are typing, the
performance is better because it doesn't have to move every file with
each keystroke. Then when you exit TEXT, it compresses the file back to
the required size by moveing the higher files back to low RAM.
Yes, there are pointers for the start of .BA, .DO, .CO, BASIC
Variables. From Virtualt's src/m100rom.c file:
0xF99A, /* Address of unsaved BASIC prgm */
0xF9A5, /* Address of next DO file */
0xFBAE, /* Start of DO file area */
0xFBB0, /* Start of CO file area */
0xFBB2, /* Start of Variable space */
0xFBB4, /* Start of Array data */
0xFBB6, /* Pointer to unused memory */
0xF5F4, /* Address where HIMEM is stored */
0xF88C, /* End of RAM for file storage */
0xFAC0, /* Lowest RAM used by system */
0xF962, /* Start of RAM directory */
Ken
On 1/31/17 11:14 PM, Willard Goosey wrote:
I know BASIC files grow upwards from the bottom of RAM, and other
files grow downward from the top. Are there system pointers to the
end of BASIC files and the end of data files?
I'm thinking of a .CO file that would need a fairly large buffer
space... Can I just put my (volatile) data in the free space between
files or do I need to formally create a file and size it before using
that space? It would NOT be ASCII data...
And would the rules be different for an OptROM?
Willard
Sent from Samsung tablet