╔═╗ ║$║ (Root directory) ╚Đ╝ ┌─────────────┬─────────────┴─┬────────────────┬──────────────┐ ┌──┴──┐ ╔══¤═══╗ ╔══¤═══╗ ╔═══¤═══╗ ╔══¤══╗ │!Boot│ ║Extras║ ║Manual║ ║Library║ ║Utils║ └─────┘ ╚══════╝ ╚══════╝ ╚═══Đ═══╝ ╚══Đ══╝ │ │ ┌────────┬────────┬──────┬───────┬───────────┬──┘ ┌──────┴──┐ ┌─┴──┐ ┌──┴──┐ ┌──┴──┐ ╔¤═╗ ┌──┴───┐ ┌────┴───┐ ┌───┴─┐ ┌───┴──┐ │Copy│ │Disks│ │ETree│ ║lp║ │MakeLP│ │TreeCopy│ │HEdit│ │HUtils│ └────┘ └─────┘ └─────┘ ╚Đ═╝ └──────┘ └────────┘ └─────┘ └──────┘ │ ┌───────┬───┴──┬───────┐ ┌┴─┐ ┌──┴──┐ ┌┴─┐ ┌──┴──┐ │a4│ │nlqa4│ │66│ │nlq66│ └──┘ └─────┘ └──┘ └─────┘
The root directory is called $. This diagram, which shows part of the HADFS System disk, shows the root directory containing several sub- directories, Extras, Manual, Library and Utils. Library and Utils in turn each have files and subdirectories of their own.
When HADFS is first used, or a
*MOUNT command is used, the $ directory
becomes the 'Currently Selected Directory', or CSD. When you type
*. a catalogue of the CSD is displayed. You can also show other directories
by giving the
*. command a directory name, eg:
*CAT Library or
*DIRcommand is used to change the CSD and move around the directory tree, for example to make the root the CSD, use:
You can use pathnames of any length, eg:
If you want to move back 'up' the directory tree, you use the
pronounced 'up'. Suppose you had set the CSD to $.Library.lp using the
above command, then
would move you back to $.Library. You can also select another disk by
starting the pathname with
:, so for example
would set the CSD to
$ on drive 1.
*CDIRcommand. As an example
would create the directory Games inside the Utils directory. If the CSD was already set to $.Utils, you could use
for the same effect. Once you have created a directory, you can move into
it with the
*DIR command and move back out of it with
*character is used to ignore everything after the position it is used in. For instance
would show the information on the first object that started with the
letters 'Let'. If would match Letters, Lettace and Lettings. The
character matches to any character for one position only. For instance
would match to Food, Find, Ford or Fred. It would not match to Finds, Fly or Feeding.
D - Directory. This is a directory which may contain more files and directories.
R - Read. If this letter is present, the file can be read using LOAD or
OPENIN, or can be run using
W - Write. If this letter is absent, the file cannot be written to with OPENOUT. The file can however be overwritten with SAVE.
L - Locked. A locked file cannot be deleted or renamed and cannot be overwritten with SAVE. Directories are locked by default.
E - Execute. If this option is present, the file can only be run as
machine code with
*RUN. If the Execute option is set, the
Read option is masked out.
P - Private. This can make an entry invisible to a user that does not own the directory. By default, the whole disk is owned.
Each file has two sets of access codes. The ones to the left of the '/' are the owner's access code, the ones to the right are the public's access codes. In general use, you will only need to be concerned with the owner codes as the entire disk is owned by you. See Chapter 4 for more information.
*ACCESS comand allows a file's access code to be changed:
*ACCESS DATA LWR Allows the file to be read and written with
OPEN, but cannot be renamed, deleted or
overwritten with SAVE.
*ACCESS PROG WR/R Allows the file to be read by anyone, but
can be written to with OPEN only by its
owner. It can be deleted, overwritten or
renamed (only by its owner).
The default attributes are
WR/wr for a file and
L for a directory.
*DELETEcommand removes a single named entry from a directory; the filename must not have any wildcards in it. For example:
You cannot delete a file which has been locked with the '
L' access code.
To successfully delete such a file, the access must be removed, eg:
Directories are created locked, and they must also be empty when you delete them.
Being able to rename files is very useful, as it can be used not only to change the name of a file, but to move it around the directory structure.
*RENAME command is followed by the old filename, and then the new
filename. The command
*RENAME old new
will change the file old to have the name new. Furthermore, the command
*RENAME test $.Programs.test
actually moves the file test from the CSD to the directory $.Programs. You can also change the name of a file while moving it, so
*RENAME OldFile ^.NewFile
will move OldFile into the directory above the CSD, and change its name to
NewFile. Directories as well as files can be renamed like this. You cannot
use wildcards in the newname part of a
*RENAME command and you cannot
rename a directory into a subdirectory of itself.
*COPY command makes a copy of a file whilst retaining the original.
The command is followed by the source filename, and the the destination
filename. An example would be:
*COPY ThisFile $.Data.ThatFile
*COPY uses as much unused shadow memory as possible to transfer the file
and avoids using the program memory. If you want to copy lots of files, or
copy files between different disks in the same drive or between different
filing systems, the TreeCopy program should be used, see Chapter 5. In
current versions of HADFS, the
*COPY command is a transient command in the
system Library directory.
*command is issued, the MOS and sideways ROMs fitted in the computer are searched to find a match. If the command cannot be found there, then it is passed on to the filing system. HADFS looks in the CSD for a file of the name. If it cannot find one, then it looks in the currently selected library directory, the LIB. By default, the LIB is set to a directory called Library on the default drive or the drive mounted on. To set the CSD to the parent of the current directory. To specify a new library, the
*LIBcommand is used, eg:
You could set the LIB to be the same as the CSD by using
@, which refers
to the CSD:
*INFOcommand displays this extra information. The result of a
*INFOcommand might look like this:
Chapter1 FFFFFF00 FFFFFFFF 001B78 WR/WR 28/12/1993 00078B
The numbers shown are the load address, the execution address and the
length, then the access code, date and sector address. There is also a
*EX which does a
*INFO on all the entries in the specified
If you use
*INFO $ information about the disk is displayed, for example:
$ 00006400 00015556 000300 DL/ 28/12/1993 000047
The load address is the disk size, the execution address holds the disk flags in the top 16 bits, and the disk ID in the bottom 16 bits, and the date is the date the disk was *INSTALLed.
Disks have only a finite amount of space on them. To find out how much
space is available, the
*FREE command is used. A typical display would be:
0001A4 Sectors = 107,520 bytes free
00049C Sectors = 302,808 bytes used
The first hexadecimal figures are the number of sectors free or used, the decimal number is the space in bytes.
To format an HADFS disk, you use the
*FORM command, followed by the number
of tracks. The most common size is double-sided 80 tracks, making 160
tracks in total, so you would use:
to format the disk in drive 0. Before formatting, you are asked to confirm the operation:
Format drive 0
You must respond by pressing
Y. Anything else will abort the process.
Once a disk has been formatted, it can be used immediately. Freshly
formatted disks are Data disks with the title '(Untitled)'. This can be
*INSTALL. If you want the disk to be a system
disk, you must copy the HADFSROM file into the root directory, or use
*INSTALL, for example:
*INSTALL 0 $ NewDisk 400K
This installs the system files onto the disk in drive 0, setting its title to 'NewDisk'.
Non-floppy disks, such as hard drives and RAM disks, usually do not need
formatting or will be supplied with a program to format them. You then
just need to initialise the drive with the
*INSTALL command. For instance,
to install HADFS on a 16M hard disk in drive 4, use:
*INSTALL 4 $ IDEDisk4 16384K
*OPT4command. This file can be in any directory, but the most common place for it is in the
$directory. When you log on to a directory using
*I AM, then the boot option set with
*OPT4is looked at and the !Boot file is loaded, run or executed. Pressing Shift-Break is the same as doing
*I AM BOOT
If there is no $.BOOT directory, then the $ directory is logged into.
*I AM is similar to doing
*MOUNT <drv> then
you will get a listing from the previous disk. If you try to write or save
anything, or select another directory, a
Disk changed error will occur.
You have to inform the computer that you have changed the disk. You do
*BYE closes all open files, and then goes into
a 'dismounted' state. After using
*BYE, all disks can be removed and
*MOUNT forgets all information, and selects a new drive. If no
parameter is given, then the default drive (usually drive 0) is selected.
If a drive parameter is given, then that drive is selected.
*BYE is the
*CLOSE followed by
$means 'root directory' and points to the top of the directory tree.
^ means 'parent directory' and points to the directory that is the
parent of the current one. The parent of the $ directory is $.
% means 'library directory' and points to the directory set with
or the one selected after doing
@ means 'current directory', the one selected with
*DIR. If a command
needs a directory and you need to select the CSD, you use this, eg
*LIB @ makes the library directory the same as the
currently selected directory.
: means 'drive', and is followed by a drive number. Drive numbers can
be from 0 to 9, and A to V.
Operation: BBC MSDOS
Show this directory:
Move down a directory:
Move up a directory:
*DIR ^ CD ..
Move to another drive:
To change a disk:
*MOUNT d <Ctrl>-C