[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on ProDOS's BASIC.SYSTEM



On Sat, 25 Dec 2004 06:16:32 GMT, Don Bruder <dakidd@sonic.net> wrote:

>I'd estimate 99% of BASIC.SYSTEM to be nothing but glue code to connect 
>the ROM-based AppleSoft to the ProDOS MLI, with the other 1% being 
>patches to fix the ROMM Applesoft bugs and add a couple of commands that 
>AppleSoft/DOS never had.

BASIC.SYSTEM replaces the Applesoft ROM garbage collection for BASIC
strings with it's own garbage collection. As far as I know the
BASIC.SYSTEM one is (much) faster but even more important it's able to
accomodate a "moving HIMEM".

DOS 3.3 had a MAXFILES statement and allocated static file buffers
according to it and set HIMEM just below them ($9600 for the default
of three buffers). ProDOS8 file buffers are much larger and probably
this was at least one of the reasons for the different setup:

BASIC.SYSTEM allocates only one "static" buffer (for CAT and alike).
When a file is opened by a BASIC program then BASIC.SYSTEM allocates
dynamically another buffer effectively moving HIMEM downwards. This is
made possible by forcing a BASIC string garbage collection that "as a
side effect" moves the strings downwards im memory.

Oliver