Download Utility

Upgrading from tape to disc can cause memory problems. Here's the remedy.

Volume 2

Number 3

May 1984

When you disc-over you're out of space, the key is to download it!

A DISC interface on the BBC Micro uses part of the RAM. With many programs, particularly those using the "memory eating" modes, you can LOAD them but, when you RUN them, as soon as the program tries to enter the hi-res modes it runs out of space.

The space the disc interface uses is at the bottom of RAM, taking up part of the memory that would normally be available for programs.

However, once we have loaded the program from disc there is no need to waste this space. We can copy our program down from where it has been loaded to a new position at the very bottom of RAM, overwriting the memory that the disc system takes up.

The program now has available to it as much memory as if it had been typed in or loaded from tape.

Moving the program down in memory like this is known as downloading. It only takes a small program to do this. I attach my downloader, called MOVER, to a function key.

When I want to download a program I first CHAIN "MOVER" to set up the function key.

Nothing spectacular happens, and I do not, at this stage, press the function key - after all, I haven't got the program I wish to download in the micro yet!

I then LOAD the program I want and follow that by pressing the function key. This brings the downloader into operation.

After a short pause the cursor returns, showing that downloading is complete and I can now RUN the program.

Incidentally, we've come up with a rather unusual problem in our downloading: The Acorn DFS insists on altering just one byte of a downloaded program.

You can get away with running the program once, but the next time that altered byte will crash the program unless you're lucky.

To get round this, at the beginning of the downloader I've added TAPE to negate the influence of DFS. Listing I contains the new version.

Mike Bibby

1 *KEY0 *TAPE¦M N%=PAGE-%E00 :FOR L%=PAGE TO TOP STEP 4 : !(L%-N%) = !L% :NEXT :PAGE=&E00¦M OLD¦M

Listing I: Mover