Download Print this page

Motorola EXORdisk II User Manual page 307

Advertisement

INPUT/OUTPUT FUNCTIONS
25.3 --
Device Independent
IIO
Functions
25.3.3 Open a rile -- . OPEN
The .
OPEN
function prepares a rile for subsequent access
by
the
record or logical sector IIO functions.
Data cannot
be transrerred between the file (or device) and
the
calling
program
until
the
,OPEN
function
has
been invoked.
The
specific function performed
by . OPEN
depends
on
the
device
type
and
on the contents of the IOCDTT entry (specifically,
the non-file format flag (F) and the mode flag (M».
There are four modes in which a rile can
be
opened.
The
input
mode
(M
=
01
of IOCDTT) will allow only input requests
to
be
issued
to the rile.
The out'put mode (M
=
10
Or
IOCDTT)
will
allow only output requests
to
be issued to the rileJ
and
the update modes (M
=
00 or II
o~
IOCDTTl
Wlll
allOw
both
types or
requests to be issued to the file.
The update modes
are only valid if the device type is DK.
The non-file format rlag also
has
an
effect
on
what
.OPEN
does.
If
the rile rormat mode is speciried
(F
=
0
of
IOCDTT),
then
FDR
processing
wi
11
be
per-rormed.
FDR
processing consists
of
searching for a rile descriptor record
or a directory entry
if
the rile is being opened
ror
input.
FDR
processing consists o-r
cre~ting
a rile descriptor record
or a directory entry ir the rile is being opened ror
output.
One Torm ,of update mode processing
(M
=
11
or
IOCDTT) will be
identical to the input mode processing ir
the
rile
already
exists
in
the
dir~ctorYi
or,
it
~ill
be identical to the
output mode
pr~cessing
ir the file
does
not
exist
in
the
directory.
The other form of update mode processing
eM
=
00
of IOCDTT)
will
always
be
the
same
as
the
input
mode
processing since the file must exist ror this mode.
Ir
a
memory-image
rile
is
being
created,
the load
inrormation must be written into the RIB
by
the program
that
is creating the rile and must meet the requirements described
in section 24.2.
The
RIB
can
be
accessed
using
logical
sector
I/O.
It
has
the logical sector number
$FFFF.
Ir
the
non-file
format
mode
is
specified
(F
=
1
of
IOCDTT),
then no
FDR
processing is performed.
The
non-file
format mode is invalid for diskette devices.
ENTRY
PARAMETERS:
x
=
The address of an IOCB which has been
properly reserved
(i.
e.
I
no
errors
occurred)
via
the
.RESRV function.
Since the IOCB needs to
be
reserved
only
once
per
device
or
a
given
log i cal un
i
t n u m be r ,
i
t i s
P
os s i
,b 1
e
to
open
and
close
a file and then
reopen another rile
using
the
same
lOeB
without
issuing another
.RESRV
c a l L I nth e s e ins tan c e s,
the
I DC
B
"\
I
.J
Page
25-34

Advertisement

loading

This manual is also suitable for:

Exordisk iii