[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .SYSTEM file extensions
In article <23r545$kl@sleepy.cc.utexas.edu>
foegelle@sleepy.cc.utexas.edu (Michael Foegelle) writes:
| It doesn't matter if it's protected by Prodos, it's Basic.system that
| is doing the loading. To do that, it opens ANOTHER buffer ($9200-$9600)
| and then tries loading the file in the intervening space from $2000-$9200
| and gives an error if the file is longer than $7200 bytes.
Uh.. Wrong. :)
The BASIC.SYSTEM program has to use the ProDOS MLI to load the files
(that's why they call it an operating system).
BASIC.SYSTEM allocates a 1K intermediate read buffer and donates it to
ProDOS. BASIC.SYSTEM then does a ProDOS READ call using the auxilliary
address field of the file as the loading point of the file (which
happens to be $2000 for all SYS files).
The error results from ProDOS finding out that BASIC.SYSTEM's read
call is going to write over some memory protected by the ProDOS
bitmap (which ironically is the BASIC.SYSTEM interpreter).
So, it *does* indeed matter if the memory is protected by ProDOS.
Just a moot point, but the address of the allocated 1K read buffer is
$9600. The BASIC.SYSTEM general purpose buffer (GPB) is relocated
down 1K to $9200. This is to give as much room to read in a file as
possible (as BASIC.SYSTEM doesn't care if the GPB is overwritten).
| >[ ... ]
| >I think that the SHRINKIT.SYSTEM file zeroes all memory usage in the
| >ProDOS bitmap except for ProDOS itself. That way when it tries to
| >load the SHRINKIT file at $2000, the overwrite of BASIC.SYSTEM code is
| >no longer considered a memory violation.
|
| Of course it does! The Basic.System program no longer 'exists' in memory
| because it gave up control to another system program. The BI frees its
| space in the bitmap (or is supposed to) not the next program that gets
| loaded.
"Of course it does"? It ain't necessarily so.
I *could* write a program that loads in a file, 1K blocks at a time
and relocates them as they are loaded. So, I could be violating
ProDOS's memory bitmap without ProDOS knowing about it (as I would be
handling the relocation of code myself).
I doubt that anyone would ever be silly enough to write a bootstrap
loader in this manner, but then again, I haven't seen the source code
to SHRINKIT.SYSTEM either. :)
Just another moot point, but BASIC.SYSTEM does *not* free its space in
the bitmap. If it *did*, you would *not* get an error when loading a
SYS program of $7201 bytes (as was the starting point for this entire
discussion). Also if it did, any error you received would be because
your read call would potentially overwrite ProDOS (as that is the
first memory block above your loading point that is still marked as
used in the ProDOS global page. In essence, it would be an unloadable
system program.
| Well, it may be >your< unspoken convention, but I can't say that there's
| any consensus on the subject, and since it has never been documented by
| Apple as a necessary limitation to system files, it doesn't exist.
You have inadvertantly struck upon my main reason for using the word
"unspoken".
It means that it isn't talked about, but (by accident or design) it is
an acceptable working rule.
| >I was referring to the size of files with a .SYSTEM extension. I
| >don't believe that I have ever seen one larger than $7A00 bytes. This
| Just because you've never seen them doesn't mean they don't exist. Then
| again, most programs get divided into sub-components since they're usually
| supplied together on a disk and it's easier to do that way. For Shrinkit
| to be a useful utility for the telecommunications novice it is somewhat
| essential that it be contained in one simple to use file.
That is completely correct -- just because [I've] never seen them
doesn't mean they don't exist. But, did you catch the part where I
was asking for people to give me examples of any that are?
| That's totally absurd! The only time the .SYSTEM part of the filename
| has ANY effect on its loading is if it is the first .SYSTEM file in the
| root directory at boot time. Beyond that, Prodos, Basic.System, or any
| other program could care less what the filename is as long as it's a SYS
| file.
I believe that I addressed this issue (in a later message).
My question has nothing to do with the issue of whether or not .SYSTEM
file extentions are tied to any other program.
I'm still waiting for someone to notify me as to a distributed system
program that was *originally* named with a .SYSTEM extention that is
larger than $7200. That's all I want to know.
| So, there was a bug (feature? =) in earlier versions of Prodos that didn't
| allow the maximum system file size to be loaded. So what? Doesn't have
| anything to do with the discussion above.
This "irrelevant" discussion evolved from the fact that original
poster (I can't remember your name, sorry) mentioned that he was using
a venerable version of ProDOS (something like v1.0.2).
So, David Empson and myself started discussing the maximum size of a
system program that could be loaded by ProDOS's of old. A bug was
fixed in ProDOS 8 v1.9 (wow, where did you read that before?) that
allowed even larger system programs to be loaded upon boot-up.
| Michael Foegelle | Call Wunderland BBS! | foegelle@ccwf.cc.utexas.edu
I hope that I have responded to all of your concerns. :)
--
internet: dockery@griffin.cuc.ab.ca
-or- sbdocker@acs.ucalgary.ca
-or- dockery@pro-calgary.cts.com
pro-line: dockery@pro-calgary