3. SPECIAL FEATURES OF THE RAFS

!BOOT, !TITLE, !HELP and *SNAP

Romlt allows you to store program and data files to Ram using its Ram filing system, and in the following section we will explain how to galvanise the contents of your Ram into Rom (or eprom), so that your files will not be lost once your machine is switched off.

But Romlt also allows the creation of three special types of file not yet discussed. These files always take the names !BOOT, !TITLE and !HELP. Very briefly the !BOOT facility allows an auto-boot option from files stored in Ram or Rom (in a similar way to the DFS); the ITITLE option can put a title or other message on the screen every time that BREAK is pressed; while !HELP allows you to set up your own HELP option which will respond to the *HELP call regardless of whether the RFS or the RaFS are enabled or not.

These three features are now treated in some detail, and are followed in this section by a description of the Snapshot screen dump option.

3.1 !BOOT Files

The !BOOT option allows you to set up a program which automatically runs any time that you press SHIFT R BREAK (ie hold down the SHIFT and R keys, and tap BREAK).

Doing this, effectively performs a *EXEC !BOOT to the RFS. The !BOOT file is then EXECed into memory and run. The !BOOT file itself will typically be a short program to call other programs from the Rom or Ram. For example it might take the form:

*TV255
CHAIN"MENU"

To set up the BOOT option you need to create a special file called !BOOT, and then to initialise the feature with the command *RBOOT.

The format of the !BOOT file follows exactly that of the !BOOT files used by the DFS. It contains no line numbers, and may be created in one of three special ways.

1. If you have a DFS fitted, then you can use the *BUILD option. This puts line numbers on to the screen, but saves the !BOOT file without them. To use this facility, type:

*RAM RETURN
*BUILD !BOOT RETURN
*TV255 RETURN
CHAIN"MENU" RETURN
ESCAPE

and the job is done.

Unfortunately the Watford DFS does not allow you to create named *BUILD files directly. If you are using this DFS you should proceed as follows:

*BUILD DUMMY RETURN
*TV255 RETURN
CHAIN"MENU" RETURN
ESCAPE
*RENAME,!BOOT RETURN

As you can see, this is a little more involved; we have had to create an un-named *BUILD file on disc, then rename it !BOOT, and finally transfer it to the RaFS.

2. You may also use a wordprocessor such as Wordwise Plus. To do this using Wordwise Plus, proceed as'follows:

*WORD. RETURN
*RAM RETURN
ESCAPE (to get into editing mode)
*TV255 RETURN
CHAIN''MENU" RETURN
ESCAPE (to return to the menu)

Then select option 1, and save the file under the name IBOOT.

If you have Wordwise rather than Wordwise Plus, you will not be able to call *RAM from within the wordprocessor. In this case, proceed as above, except that you should not call *RAM, so that you will save to tape or disc.

You then need to use *FILE to transfer your !BOOT file created on tape or disc, to the RaFS.

To do this, proceed as follows:

*FILE DISC R !BOOT RETURN

or

*FILE TAPE R !BOOT RETURN

3. If you do not have a DFS or a suitable wordprocessor, you may create a !BOOT file using a Basic program. The following program will create a !BOOT file identical to that discussed above:

10*RAM
20*SPOOL !BOOT
30PRINT"*TV255"
40PRINT"CHAIN";CHR$34;"MENU";CHR$34
50*SPOOL

The subterfuge in line 40 is just to persuade the PRINT statement to print the pair of quotation marks around the filename. If you now run this program, it will place a file called !BOOT directly into the RaFS containing the two lines:

*TV255
CHAIN"MENU"

Assuming that you have created the !BOOT file by one of the above three methods, it only remains to execute *RBOOT to initialise the option. Just type:

*RBOOT RETURN

You should note that *RBOOT should not be set when no corresponding !BOOT file exists, as this may hang the machine under certain circumstances.

The effect of *RBOOT may be cancelled by typing:

*RBOOT- RETURN

Now, whenever you now press SHIFT R BREAK (ie hold down the SHIFT and the R keys, and tap BREAK) your !BOOT file will automatically run. In this case it will issue the *TV command to lower the screen display by one line, and then CHAIN a program called MENU, which should also be resident in the RaFS.

It should be noted that if you have a number of RFS Roms in your machine with !BOOT options, the one which will auto-boot will be the one which is in the highest priority socket. Also, since pressing SHIFT R BREAK puts you into Acorn's Rom filing system, you will not be able to write to RaFS Ram until you have executed *RAM.

3.2 !TITLE Files

The purpose of !TITLE is to allow your Rom (or Ram) to produce a screen message whenever BREAK is pressed. In this way your Rom can, if you wish, announce itself in the same way as some commercial Roms; though the message which you create may of course serve any purpose that you wish.

The rules for using this facility are very similar to those for !BOOT described above. You must create a !TITLE file containing the text that is to be printed, and you must enable the option with the command *RTITLE.

As with *RBOOT, *RTITLE must not be implemented when no corresponding !file exists; and the effect of *RTITLE may be cancelled by typing:

*RTITLE- RETURN

The !TITLE file takes a very similar form to the !BOOT file described above, and the user is referred to the three methods outlined above for its creation.

In the case of !TITLE, the file must contain only the text to be printed (no PRINT statements are required), with a blank line at the end.

To clarify this, if you are using method 3 to create your file, you might use the following program:

10*RAM
20*SPOOL !TITLE
30PRINT"My ROM v1.0"
40PRINT"© 1985 Me"
50PRINT
60*SPOOL

Remember that because of the way in which *SPOOL works, the PRINT statements that appear in this program will not appear in the ITITLE file created.

If you run this program, and type:

*RTITLE RETURN

You should see something like the following each time that BREAK is pressed:

BBC Computer

My ROM v1.0
© 1985 Me
Acorn DFS

BASIC

You should note that for a screen message to be printed in this way, the Rom or Ram carrying the message must be in a higher priority socket than the DFS, if one is fitted.

If you have more than one RFS Rom in your machine using the !TITLE option, the machine's operating system will confuse which !TITLE file to display for each Rom. This may be avoided by labelling each !TITLE file with a unique code as follows.

When you create the !TITLE file, you may append its name with up to four characters which will uniquely define it. For example, line 20 of the program above might be altered to:

20*SPOOL !TITLERom1

Any combination of numbers and/or upper and lower case letters may be used for the code, as you wish. Now, when the command *RTITLE is issued, Romlt looks at the !TITLE file to see what code you have used, and uses this as an identifier each time that the TITLE file is accessed.

If for any reason you change your !TITLE code in a given Rom (or Ram), you should re-issue the command *RTITLE, so that Romlt can register your new code. Of course, once you have rommed your code it can no longer be changed.

3.3 !HELP Files

The purpose of !HELP is to allow your Rom (or Ram) to produce a response to the operating system command *HELP. Many commercial Roms use this feature to give a summary of the commands which they provide; and some also use it to give syntax information. This is the case with Romlt itself, as you will see if you type:

*HELP RETURN

Romlt will announce itself along with other Roms in your machine.

To produce a similar response from your own Rom (or Ram) you will need to create a !HELP file containing the text to be printed; and then enable the HELP facility with the command *RHELP in much the same way as described above for ITITLE. There is just one small difference in the !HELP file. This must contain a blank line at the start of text, rather than at the end as with !TITLE.

Suppose that you wish to produce the HELP message:

Screenshot Display Rom
Boot with SHIFT R BREAK

If you are using the program method (method 3 above) for generating the !HELP file, the program would read as follows:

10*RAM
20*SPOOL !HELP
30PRINT
40PRINT"Screenshot Display Rom"
50PRINT"Boot with SHIFT R BREAK"
60*SPOOL

If you run this program, this will save the appropriate !HELP file into Ram. You then need to type:

*RHELP RETURN

This will initialise the facility, and now every time that a *HELP is issued, whether from within the RaFS or not, your message will be among those appearing on screen.

As with *RBOOT and *RTITLE, the HELP facility can be turned off when so desired. This time the command to use is:

*RHELP- RETURN

Again, if you have a number of RFS Roms in your machine which have the HELP facility enabled, the operating system will confuse which HELP file belongs to which Rom. To avoid this, the same convention should be used as with !TITLE.

In other words the filename !HELP should be appended with a code of up to four characters which uniquely defines the Rom to which the HELP facility belongs; though you do not have to use the same identifying code as used with !TITLE in the same Rom. When you subsequently call *RHELP, Romlt will take a note of the code, and make use of it each time to ensure the correct destination of *HELP calls.

3.4 Saving Screens with *SNAP

The contents of any screen in modes 4 to 7 may be saved to the RaFS using the *SAVE command as with the cassette or disc filing systems. But Romlt provides a special command *SNAP (and *SNAPR) to do this automatically. This can be useful for various purposes; and particularly where mode 7 is concerned, since the 16K RaFS could hold 14 complete screens.

To use the SNAP facility proceed as follows:

*RAM RETURN
*SNAPR RETURN

You may now create the screen which you wish to save. At any point, even if you are not in the RaFS or RFS, pressing:

CTRL @

(ie hold down CTRL then tap @ ) should freeze the screen, and await the pressing of one of the number keys (0-9). Suppose that 5 is pressed, Romlt will save the screen to the RaFS under the filename SNAP5.

To load in the screen at any time, you must select the correct mode, then *LOAD the screen data. For example:

*RAM RETURN
MODE7 RETURN
*LOAD SNAP5 RETURN

If when *SNAP was called, it was called without the "R" following it (R for RaFS), then when the screen was saved on pressing CTRL @ , it would be saved to the currently active filing system; which may or may not be the RaFS.

You should note that when saving and loading screens on the BBC micro, whether using *SNAP or any other means, the screen which you save must not have been scrolled prior to saving. Similarly, you should ensure that a screen to which you load a screen dump, such as that produced by *SNAP, should not have been scrolled once the screen mode has been selected.