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

Re: detecting ProDOS vs. Dos3.3



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.

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.

> Or is there a table of vectors up in Page $BE with the $3D0 vector merely set
> for the convenience of old-school DOS guys like me...

Not to mention the 'Q' command of the IIgs monitor, which jumps to $3D0.

There are five JMP instructions at $BE00:

Warm start entry to BASIC.SYSTEM
Command execution
External command hook
Error handler
Error message printer

The rest of the page contains a variety of temporary variables, copies
of I/O hook locations, mode flags, parameter storage, ProDOS MLI
parameter blocks and calling routines, and a couple of JMPs ($BEF5 and
$BEF8) for the page reservation/release mechanism.