Download Print this page

Motorola EXORdisk II User Manual page 322

Advertisement

INPUT/OUTPUT FUNCTIONS
The
25.3 -- Device Independent I/O Functions
released).
The
remainder or IOCLUN
is unchanged.
remainder
of
contents
of
the
IOCB
and
the
the data buffer and the
sector buffer are unchanged.
25.3.8
Example of device independent
lID
The following example uses the
device
independent
1/0
functions
described
thus
far.
The
IOCB
shown
below is
used
in the example
as
the control block for writing to
a
diskette
file.
The initial values set up in this IOCB
are
typical
for
most output operations.
A
fou'r-sectcT'
buffer
is
used
to
allow a maximum of four sectors to be written to the diskette
each time
it is accessed.
The larger a sector bUTTer is.
the
fewer
will
be the number of diskette accesses.
The logical
unit
number,
file
name,
and
suffix
are
going
to
be
initialized
from
an
operator-supplied
parameter
on
the
command line.
The system symbols from the MDOS
equate
file
are used throughout this example.
OUTPUT EGU
*
START OF OUTPUT lOCB
FeB
0
IOCSTA
FCB
DT$OPO+DT$CLS . IOCDTT
FOB
0
lOCDBP
FOB
RBUFF
IOCDES
FDB
RBUFFE
IOCDBE
FCC
2,DK
IOCGDW
FCB
'0+0
IOCLUN
DEFAULT
=
0
FCC
8,
IOCNAM
FCC
2~SA
IOCSUF -- DEFAULT
=
SA
FOB
0
IOCRIB
FOB
FD$FMA!<8 . IOCFDF --
ASCII
FDB
0
RESERVED
FOB
0
IOCDEN
FOB
0
IOCSBP
FOB
SCTBUF
IOCSBS
FOB
SCTBUF+(SC$SIZ*4)-1
IDCSBE
FDB
0
IOeSBI
*
SCTBUF
BSZ
SC$SIZ*4
SECTOR BUFFER (4 SECTORS)
RBUFF
BSZ
80
RECORD BUFFER
RBUFFE
EGU
*-1
The
code
that
is
shown
belo~
performs the following
functions.
Firstl a file name specification which
has
been
entered
on
the
MOOS
command
line
is
extracted from the
command line buffer
and
placed
into
the
IOCB.
This
is
accomplished
with
the
.PFNAM
s~stem
function described in
Chapter
27.
Thenl the
IoCB
is reserved and opened.
Next,
an
input
prompt
is displayed on the system console and an
line
of text
is
a'cepted from the kevboard.
If the
entered
line
Page
25-49

Advertisement

loading

This manual is also suitable for:

Exordisk iii