Download Print this page

Motorola EXORdisk II User Manual page 318

Advertisement

INPUT/OUTPUT FUNCTIONS
25.3 -- Device Independent I/O Functions
even if only a single record has been
~ritten
into the sector buffer.
IOCNAM,
IOCSUF,
IoeSBP,
and lOeSBI
are unchanged if the
device
is
not
DK.
The remainder
or
the IOCB is unchanged.
The
contents
or
the
data
buffer
are
unchanged.
The sector bufrer contains the data
that
are
going
to
be
written to diskette
starting
~ith
the
logical
sector
specified
by
IOCLSN.
The
sector
burfer
i~
not
cleared
arter
having
been written.
Thus, the parts
of the
sector buffer
not
affected
by
the
.PUTRC
call
will
still contain the
data from the buffer last written.
25.3.6
Close a file -- . CLOSE
The. CLOSE function is used to signiry completion or all
I/O
transfers
to a file
or
device
in the current
open mode.
Data cannot be. transrerred between the file (or
device)
and
the
calling
program
after
the
. CLOSE
function
has been
invoked.
The specific function performed
by
.CLOSE
depends
on
the
mode
flag
(M
of IOCDTT)
I
the
1/0
transfer- flag
(10
of
IOCDTT), and the device type.
If the IOCB has been opened in the input mode (M
=
01 of
IOCDTT)
I
th en th e . CLOSE func t
i
on wi
11
simp
1
y
chang e th e IOCB
to indicate that the file is closed.
If the lOeB has been opened in the output mode (M
=
10
of
I OCDTT ) ,
t h en
. CLOSE wi
11
per for
m
the f
0
11
0
til
i n
g .
For a
device type of
DK, .
CLOSE will zero-fill any unused
portions
or
the
untllritten
sector buffer to a sector- boundar-y before
writing the buffer- to the diskette (only
if
record
lID
is
being
performedi
logical sector
lID
will not cause the last
sec tor
bur
fer to bee han g e d
0
r- tIIr itt en) .
All spa c
e
t
hat
has
been
newly
allocated
but
not
written into (those logical
sectors greater than IOCMLS) will nOrmally be deallocated
on
a
cluster-
boundary
and
returned
to
the
~~ee
space pool
(assumes that the truncate flag
and
IOCMLS
have
not
been
changed by the calling program).
The end-of-file LSN will be
adJusted in the
RIB.
If the device
is
not
DK,
then
.CLOSE
tIIill
cause an end-of-file recor-d to be written to the device
(file format mode only).
In
the non-file format mode, . CLOSE
will
only write an end-of-file r-ecord to the
de~ice
if it
is
a file-type device (e. g.
I
an end-of-file is written to
CP but
Page
25-45

Advertisement

loading

This manual is also suitable for:

Exordisk iii