Hardware manual

A page number between 0 and (n-1), inclusive.
A numchars word = 512 if i<n-1, and <512 if i=n-1. The last page must not be completely full.
([Trident]: = 2048 if i<n-1, and <2048 if i = n-1.)
A real file id which is the same for every page in the file, and different from the real file id of any other
file on the disk.
A file is addressed by an object called a file pointer (FP), which is declared in AltoFileSys.D. A file pointer
contains a virtual file id, and also the virtual address of the leader page of the file. The low-level disk
routines construct a real file id from the virtual one when they must deal with a disk label. Since it is
possible for the user to read a label from the disk and examine its contents, the drivers also provides a
routine which will convert the real file id in the label into a file pointer (of course, the leader address will
not be filled in).
Note: Real disk address 0 (equal virtual disk address 0) cannot be part of any legal Alto file because the
value 0 is reserved to terminate the forward and backward chains in sector labels. However, disk address 0
is used for "booting" the Alto: when the boot key is pressed when no keyboard keys are down, sector 0 is
read in as a bootstrap loader. The normal way to make a file the "boot file" is to first create a legal Alto file
with the bootstrap loader as the first data page (page 1), and then to copy this page (label and data) into
disk sector 0. Thus the label in sector 0 points forward to the remainder of the boot file.
2.2. Legal Alto Disks
A legal disk is one on which every page is either part of a legal file, or free, or "permanently bad." A free
page has a file id of all ones, and the rest of its label is indeterminate. A permanently bad page has a file id
with each of the three words set to -2, and the remainder of the label indeterminate.
2.3. Alto Directory Files
A directory is a file for associating string names and FP’s. It has the directory bit set in its file id, and has
the following format (structure DV declared in AltoFileSys.D).
It is a sequence of entries. An entry contains a header and a body. The length field of the header tells how
many words there are in the entry, including the header. The interpretation of the body depends on the
type, recorded in the header.
dvTypeFree=0: free entry. The body is uninterpreted.
dvTypeFile=1: file entry. The body consists of a file pointer, followed by a Bcpl string containing the
name of the file. The file name must contain only upper and lower case letters, digits, and characters
in the string "+-.!$". They must terminate with a period (".") and not be longer than maxLengthFn
characters. If there are an odd number of bytes in the name, the "garbage byte" must be 0. The
interpretation of exclamation mark (!) is special; if a file name ends with ! followed only by digits (and
the mandatory "."), the digits specify a file version number.
The main directory is a file with its leader page stored in the disk page with virtual address 1. There is an
entry for the main directory in the main directory, with the name SysDir. All other directories can be
reached by starting at the main directory.
2.4. Disk Descriptor
There is a file called DiskDescriptor entered in the main directory which contains a disk descriptor
structure which describes the disk and tells which pages are free. The disk descriptor has two parts: a 16
word header which describes the shape of the disk, and a bit table indexed by virtual disk address. The
declaration of the header structure is in AltoFileSys.D.
Disks & Bfs August 10, 1980 53
For Xerox Internal Use Only -- December 15, 1980