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

Re: detecting ProDOS vs. Dos3.3



David Empson (dempson@actrix.gen.nz) wrote:
: Dave Althoff Jr <dalloff@gcfn.org> wrote:

: > David Empson wrote:
: > : $BE00 is the warm start entry point for BASIC.SYSTEM.  It does a JMP to
: > : the actual warm start routine, which is somewhere earlier in memory (at
: > : a location which may vary between versions).
: > 
: > Now this is an interesting situation as well.  Woz gave us that nice
: > vector in Page $03 for the DOS entry point at $3D0, so that if you change
: > DOS it points to the right place.  Conveniently enough, ProDOS...or
: > rather, BASIC.SYSTEM...uses the same entry point vector at $3D0.  But it
: > appears that the $3D0 vector under BASIC.SYSTEM always points to $BE00,
: > which is itself a vector to the "real" BASIC.SYSTEM entry point somewhere
: > else.  Makes me wonder why BASIC.SYSTEM doesn't just set $3D0 to the
: > "real" entry point location and be done with it.

: Maybe on the principle that nothing outside of the BASIC.SYSTEM code
: should have direct access to its internal locations.  The global page at
: $BE00 contains all of the documented entry points and data structures,
: and $3D0 is outside of BASIC.SYSTEM.

Makes sense.  There are more BASIC.SYSTEM calls (obviously) than just the
entry point; I suppose a programmer playing by The Rules technically
should use the global page entry point at $BE00 rather than the Page 3
vector.  It actually *does* make sense, I guess...

: On the other hand, I think the I/O vectors ($36 to $39) are set to the
: address of the actual routines within BASIC.SYSTEM, rather than going
: through a JMP hook in the $BE page.

Er, those would have to be, wouldn't they?  Those are two-byte vectors,
called with a JMP ($0036) or JMP ($0038).  And they have to work because
they are called by the intrinsic COUT and RDKEY routines at $FDED and $FD0C.

Oh, well, I guess they COULD go through the global page, but why bother
when the code at $BE00 should be setting the I/O hooks anyway...

--Dave Althoff, Jr.
-- 
    /X\        _       _               _*** Closed for the season ***
   /XXX\      /X\     /X\_      _     /X\__      _     _        _____  
  /XXXXX\    /XXX\  _/XXXX\_   /X\   /XXXXX\    /X\   /X\      /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX