OPEN
Action:
OPEN
If a filename assignment is specified (3rd byte
of the supplemental information is not -1),
the ASSIGN subroutine is called as though an
ASSIGN request had been made.
If there is a
filename assigned to the unit, i.e., if it is not
assigned to a scratch file, the directory on
the specified drive is searched for the
filename.
If the drive is specified as '*', a
check is made to determine the ready status of
all drives, then each ready drive is searched,
from drive I to drive 7, followed by drive 0,
until the file is found or all drives have
been searched.
The ID of the diskette which holds or
will hold the file is read into a buffer and
compared against the ID on the corresponding
map in memory.
If they do not match, and no
other unit has a file open on the same
physical drive, a new map (and ID) will be
read into memory.
If another unit is open on
that drive, a WRONG DISKETTE error will be
returned and the file will not be activated.
If the file is found, its descriptor
record is read, the relevant parts are moved
into the active file table entry for the unit,
and, if requested, moved to the user's data
transfer area.
The file is then flagged as
open.
If the file is to be created, the
descriptor record is created in a buffer, then
moved to the active file table, and, if
requested, to the user's data area. If the
file is not a scratch (no-name) file, the
descriptor record is written out to the disk
and a directory entry is created.
Possible errors:
All DISK ERRORS are possible.
NOT READY (code
C2) may indicate designation of a specific
drive that was recorded as 'not ready' the
last time the ready status was checked.
- 129 -
Need help?
Do you have a question about the Z80-RIO and is the answer not in the manual?
Questions and answers