Date : Fri, 19 Sep 2003 20:39:57 +0100
From : Sprow <info@...>
Subject: Re: DFS Execution address of BASIC program
In article <OF312C83C9.15B5702D-ON80256DA6.004BBD5D@...>,
<Richard_Talbot-Watkins@...> wrote:
> > >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?
>
> I imagine that when Basic 1 was conceived at the very start, they had to
> choose an execution address for the Basic SAVE command to assign to the
> file, and thought it would be nice to use its warm start entry point
> (&801F) so that if a Basic file was *RUNed (from Basic), it would behave.
> On an unexpanded Beeb, running just the tape filing system in the OS, this
> would work fine, as the Basic ROM would be paged in. When attemping to
> *RUN from disc however, the DFS ROM will be paged in, and therefore it
> tries to jump to that location in the DFS ROM, which is undefined and leads
> to the strange results we see when we try it.
Bingo.
What would have been cunning (and make the machine more intuitive to use)
would be to have a fixed address in the OS (eg.along with all the other
&FFxx entry points) which in turn caused the OS to find BASIC, page it in,
and call it's language entry with A=3 (or some other unused reason code) -
causing BASIC to RUN the program too.
This would make *RUN and CHAIN very similar,
Sprow.