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

Table of Contents

Advertisement

OPEN
OPEN
Types of open requests:
There are several ways the activation of
a file may be handled.
These are specified
by the 1st word of the supplemental parameter
information.
A file may be opened for either
random or sequential access.
Random access
is specified by setting bit 3 of this word.
Currently, a file being open for random
access has two implications.
One is that the
READ DIRECT request will be accepted (it
will be refused with an INVALID REQUEST error
otherwise).
The other is that in each record
oriented operation, the disk address of the
first record involved will be returned to the
calling program in the supplemental parameter
information field of the parameter vector.
There are five mutually exclusive ways that
the cases of file not found/ file found may
be handled.
These are specified in the
bottom 3 bits of this word.
They are as
follows:
Open for input - 0 - if the file exists, it will be
activated with the pointer ahead of the first
record.
If it does not exist, a FILE NOT
FOUND error (code C7) is returned.
Open for output - 1 - If the file exists, it is
activated and all its records are deleted.
If
it does not exist, it is created.
Open new file - 2 - (also referred to as open for
nondestructive output) -.if the file exists, a
DUPLICATE FILE error (code DO) is returned,
and the file is not activated.
If the file
doe s no t ex is t, i t i s c r e.a ted.
Open for append - 3 - if the file exists, it is
activated with the pointer positioned at the
last record.
If it does not exist, it is
created.
Open for update - 4 - if the file exists, it is
activated with the pointer ahead of the first
record of the file.
If it does not exist, it
is created.
- 128 -

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