Date : Fri, 19 Nov 2010 23:39:50 +0000
From : mfirth@... (Michael Firth)
Subject: BBC file formats
On 19/11/2010 21:21, Alex Taylor wrote:
> On 19 November 2010 20:57, James McGill<plexer@...> wrote:
>
>> I'm curious, what was the purpose of shifting the machine code in that
>> BASIC loop, rather than loading it there directly, and what was the
>> advantage of having moved it there?
> I have vague recollections of doing this on my Electron when I bought
> a brand new PRES AP3 and 3.5" drive, using money earned from
> delivering free newspapers.
>
> For an otherwise unexpanded Model B or Electron, PAGE is set to&E00
> for a cassette-based machine, having a disk system pushes PAGE up for
> the workspace it needs (&1D00 is ADFS if I remember correctly, DFS
> sets PAGE to&1900).
>
> I recall that loading something over the disk workspace would crash
> the machine. The technique is to load everything in higher up in
> memory, then when everything's loaded, to move it down in memory. At
> that point nothing more can be loaded from disk without doing a
> CTRL-BREAK.
>
What he said :-)
Plus, the reason it can be done is that games usually have a startup
screen in Mode 7, which only needs 1K of RAM (HIMEM=&7C00), but run the
actual game in one of the high graphics and colour modes (usually Mode 1
or Mode 2), which need 20K of RAM (HIMEM=&3000).
Thus, with DFS you load the game above PAGE while in Mode 7, then switch
to TAPE, move the code down, and then you can switch to the high memory
mode.
Regards
Michael