ZiLOG Z80-RIO Operating System User's Manual page 133

Table of Contents

Advertisement

It is created by opening a file on a logical unit that has
an assignment to a zero-length name (all assignments are
initialized to scratch files, so opening a unit without
making an assignment has the same effect).
No directory
entry is created, and the descriptor information is only
stored internally rather than on the diskette. When the file is
closed, any records which have been created on it are
deallocated, and the file ceases to exist.
Such a file is
ideal for temporary storage of intermediate data.
The
programmer will find it advantageous to use scratch files
whenever an application is suited to them, since opening
them does not involve the directory operations that opening
a named file does, and is therefore faster.
The directory is made up of sectors.
Each sector is, in
turn, made up of one or more variable length entries.
Each
entry consists of a single byte giving the length of the
name, followed by the characters of the name, and a two
byte pointer to the descriptor record (described below).
The file names can be from
I
to 32 characters in length.
The last entry in a sector is followed by a byte of -1
(OFFH).
Directory entries do not span sector boundaries,
so that if a new entry will not fit completely in a sector,
it is put in the next one.
Occasionally, all the entries in a sector will be deleted.
This happens relatively infrequently, and is indicated by
the first byte of the sector (normally a length byte, which
must be from I to 32) being the terminator byte, OFFH.
The pointer contained in the directory entry for a file
points to a special record, which is not one of the data
records and is not included in the record count, called
the file descriptor record.
As its name indicates, it
contains information describing the file to the system.
Some of the information is also available to the user.
Regardless of the length of the data records, the descriptor
record is always
I
physical sector, or 128 bytes long.
Of
these,
zoos
has defined 40 bytes, leaving 88 which are
available for programmer definition.
Note, however, that
there are some system conventions on how these remaining
bytes will be used for some files.
Most notably, procedure
files contain segment addresses and lengths in this area
(see Appendix
J).
- 115 -

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Z80-RIO and is the answer not in the manual?

Questions and answers

Table of Contents