3 Disc organisation Throughout this and the following sections, a distinction will be made whenever there are differences between the two supported file structures; the Acorn DNFS format, and the HDFS native format. In cases where no distinction is made, the file structures are the same. 3.1 Files Data is stored in named files by the disc filing system. These files have certain features which are common across filing systems; they are accessible in the same way by a set of operating systems commands. In both the DNFS and HDFS files have certain features; they are held in contiguous areas on the disc, have the same attributes, and the maximum length of filenames is 7 characters. A file's attributes are its length, start sector address, load address, execution address, and permissions. The maximum length of a file is determined by the amount of free space available in the directory; this can be up to 200K for the DNFS, and up to 400K for HDFS. The DNFS allocates 18 bits to the file length, whereas HDFS allocates 19 bits. The start sector address determines where the file is held, relative to the start of the directory. There are 10 bits allocated to the start sector by DNFS and 11 bits by HDFS. The load address determines whereabouts in memory the file is placed when it is loaded. There are 18 bits allocated to the load address by both HDFS and DNFS; if the high-order bits (above 16) are all 1s, the low-order 16 bits are used to refer to an address in the I/O processor memory, if a second processor is fitted. The execution address determines where the computer jumps to start a program that is run from the disc. As with the load address, 18 bits are allocated to the execution address, and if the high-order bits of the execution address are all 1s, the address referred to is in the I/O processor. If there is no second processor fitted, the load and execution addresses always refer to the I/O processor. A file's permissions determine whether the file can be read, written, executed, or deleted. 3.2 Directories Directories are used for partitioning files. In the DNFS, directory names are a single character prefix which may be used to sort the files into different types. The 'current directory' is a single prefix character which is added to all filenames which do not specify a directory. There may be no more than 31 files per disc in the DNFS. The directory information for the DNFS takes two sectors (512 bytes). HDFS supports hierarchical, nested directories. These directories are held in contiguous blocks, exactly like files. Directory names must be between 2 and 7 characters long, and appear like normal filenames in the directory listing. Each of these directories, as well as the disc's root directory, may contain 31 files and sub-directories. HDFS directories have all of the normal file attributes, and also a flag which marks them as directories rather than files. The length of a directory determines how much space is available for files and sub- directories inside the directory . It will always be a whole number of sectors (a multiple of 256 bytes) and 2 sectors (512 bytes) will be used for the directory information. The load and execution addresses are meaningless for directories. The readable and writable permissions are meaningless for directories. 3.3 Permissions The HDFS supports the full range of permissions for files; they may be marked as readable, writable, executable, and/or locked (not deletable). The characters R , W , X , and L are used to indicate these in directory listings. The readable and writable permissions refer to the file-handling operations OSFIND, OSBPUT , OSBGET and OSGBPB. Unwritable files can still be saved over, and unreadable files can still be loaded. HDFS directory permissions are the same as for files except that the readable and writable flags are meaningless. The executable flag has a special meaning; when a directory is executed, it is made the current directory, and the directory options are used to determine whether to search for and load, run, or *EXEC a file called !BOOT, in the same way as the auto-boot facility . This facility allows applications to be organised within directories, and set up and run by simply executing the directory. The DNFS only supports the locked permission. In DNFS, locked files are unwritable, and all files are readable and executable. 3.4 Auto-booting Both the DNFS and HDFS support the auto-boot facility; if SHIFT-BREAK is pressed, and BREAK is released first, the filing system will look at the root directory's options to determine whether to search for and load, run, or *exec a file named !BOOT. The values of the options for each of the possibilities is given in section 11.7. To allow the HDFS and DNFS to co-exist in a machine, each filing system checks whether certain keys are held down before initialising on a BREAK. If there are no keys held down, the filing system in the higher priority socket will take control. The DNFS will not initialise if any other key than D is pressed with BREAK. HDFS recognises two keys, H and I. The H key causes a normal initialisation. The I key initialises the computer for I/O processor operation only, if a second processor is present. This has the same effect as turning the second processor off, in software. CTRL-BREAK must be pressed to re-activate the second processor.