80-Bus News

  

November–December 1982 · Volume 1 · Issue 4

Page 21 of 51

supplied for this. This prevents BASIC from overwriting TOS’s workspace when cold-started. TOS overlays ROM ZEAP, but it is a simple matter to install a switch in the 4K decode line (on the N2) to switch between the two. I of course encountered difficulty in this task owing to Blocks A & B on the N2 card being in different places to that documented (i.e. for block A read block B, and vice versa).

The TOS command structure is fairly extensive, with commands being entered in the true NAS­SYS fashion, i.e. a single command letter followed by a number of arguments. In TOS these arguments are obligatory and are summarised below.

B dSave BASIC file on drive d
C dDisplay catalogue of drive d
D d nnDelete file number nn from drive d
IInitialise a blank tape in drive A
JBASIC cold start
NNAS­SYS cold start
P dSave NASPEN file on drive d
QNASPEN warm start
RRewind both tapes, read in catalogues
R d nnRead file nn from drive d
T d ssssTransfer file nn from drive d to the other drive
W d ssss eeeeWrite file from £ssss to £eeee-1 to drive d
XRewind both tapes prior to removal
ZBASIC warm start

I understand that the latest version of TOS has a multiple-delete command, which presumably is of the form D d nn xx yy … which would delete file numbers nn, xx, yy, etc. from the tape in drive d. I have made alterations to TOS to include the following (extra) commands:

E xxxxExecute program at address xxxx. Additional arguments may be supplied, as with the NAS­SYS ‘E’ command.
R dRewind the tape & read the catalogue of the specified drive (TOS only does this for both drives at once).
X dRewind the specified tape to the start prior to removal.
YBASIC warm start.
Z dSave ZEAP file on the specified drive.

When saving a file, TOS prompts for a filename, which may be upto 17 characters long. This gives ample room for, say, the version number and, in the case of machine code files, the execution address. With the Write command TOS also prompts for a single-character filetype (BASIC & NASPEN default to B and P respectively). No check is made to see if there is already a file of the name you have specified. Each file is assigned a file number, and this number is used to access the file. This reduces the chance of typing errors, which is quite possible if one had to type in 17-character filenames each time. It does mean, however, that when loading a file under program control (i.e. from another program, e.g. loading a data file into RAM) that the file number be specified. While (short) routines are given in the manual for saving a (named) file & loading a (numbered) file under program control, no routine is given for loading a named file. When you consider that the Delete command can cause the assigned filenumbers to change, this is a serious drawback. No source listing is supplied, but having disassembled the software, writing such a routine shouldn’t be too difficult.

There were a couple of bugs in TOS, which interfere with the operation of the ‘I’ command, in which the blank catalogue written to the tape isn’t really blank. If any other reader has found this problem, there are a couple of bytes to

Page 21 of 51