Date : Fri, 19 Sep 2003 15:01:07 +0100
From : Richard_Talbot-Watkins@...
Subject: Re: DFS Execution address of BASIC program
Ben Newsam 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.
On later versions of Basic, the execution address changed (&8023 for Basic
2, &802B for Basic 4), but by this time, I suspect they were just
continuing the trend for consistency, rather than because they believed it
was possibly useful for anything - for a start it would render a file saved
by one version of Basic incompatible with another version of Basic, if
Acorn ever intended Basic files to be loadable by *RUNing them.
Rich
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster@...
This footnote also confirms that this email message has been checked
for all known viruses.
**********************************************************************
SCEE 2003