<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 19 Sep 2003 18:53:56 +0100 (BST)
From   : Pete Turnbull <pete@...>
Subject: Re: DFS Execution address of BASIC program

On Sep 19, 13:27, Ben Newsam wrote:
> Steve Fewell <kranser@...> writes, despite their Organization
> header saying ''
> >What I want to know is, if *RUN loads the BASIC
> >program and calls the Execution address (BASIC ROM start), why
doesn't
> >BASIC set the execution address to be the start of the RUN keyword
> >execution (&8F15 on the Master), so that the program is run instead
-
> >wouldn't that make more sense?
>
> How would it know which ROM to jump to?

The MOS always knows which ROM slot BASIC is in, regardless of which
version of BASIC it is.  See OSBYTE 187.  BASIC ROMs have a unique type
byte, and the MOS stores all the type bytes when it starts up.

Anyway, when you *RUN a BASIC program it doesn't call BASIC.  It's
illegal to jump straight into a ROM and IIRC the MOS (or maybe the
current FS) traps exec addresses in sideways ROM space.  It does
exactly the same if something other than BASIC is the current language.


-- 
Pete                                           Peter Turnbull
                                               Network Manager
                                               University of York
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>