[comp.sys.apple] ROM 3 vs. ROM 1

dlyons@Apple.COM (David Lyons) (08/22/89)

In article <10006@phoenix.Princeton.EDU> wagner@pucc.Princeton.EDU (John Wagner) writes:
[...]
>Given that I have a ROM 1 machine, how does 5.0 recogize what routines it has
>to replace (i.e. the missing functionality present in 5.0)?  If there is a
>new toolbox function I can see where that should be simple, but what about
>function that is simply enhanced?

There are (at least) two ways the system software can check your ROM version.
it can make calls to IDROUTINE ($FE1F) and see what your ROM version is; and
it can make xxxVersion toolbox calls to see what versions of various toolsets
are available.

The toolbox architecture was designed in a reasonable way.  The system software
can add new toolbox functions, and it can replace old ones.  Replacing an old
function doesn't necessarily mean all the ROM code for that function becomes
dead--the new code can check for the new cases and pass control along to the
old code otherwise.  No problem.


>I think some of the heat of this argument may be masking the reason an owner
>should worry about enhancements like this.  If the replacement function is
>not in ROM, then it must run in RAM.  This means my older machine with 1.25
>meg may not run code that a ROM3 (or later) machine with 1.25 meg can run.
>I may need up to 256K additional memory (assuming the absolute worst case
>[...]

Yes, that's the worst case.  Life isn't actually that bad (for example, there
are RAM patches for ROM 3 in System Software 5.0, too).


>In addition, how does 5.0 recognize that the enhanced code is even needed.
>I'm sure that you load what you feel is needed even if the program that is
>being run succesfully ran with ROM 0 or 1.  There is simply no way for you to
>know this at the OS level.  But the result is lost memory in my machine on a
>daily use basis.  Sooner or later this will turn in to additional expense to
>do exactly what I did before.

Yes, you probably need more RAM to run some existing applications; too bad.
It's more complicated than this, though.  At one level, the system loads
whatever toolsets the application requests.  Within a toolset, there are
new toolbox calls (and new functionality for old calls) that aren't used
by old applications.  On the other hand, in some cases the extra code is
stored in dynamic segments, so that it isn't actually loaded into RAM
until (or unless) it's actually called.  (On the 3rd hand, if *tons* of
stuff was done in dynamic segments, there could be an annoying number of
"please insert your startup disk" dialogs.)

 --Dave Lyons, Apple Computer, Inc.          |   DAL Systems
   AppleLink--Apple Edition: DAVE.LYONS      |   P.O. Box 875
   AppleLink--Personal Edition: Dave Lyons   |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons

   My opinions are my own, not Apple's.