Download Print this page

Motorola EXORdisk II User Manual page 344

Advertisement

INPUT/OUTPUT
PROVISIONS
26.2 --
Device Independent liD
Not
d
2vi
cei
device
whether
1.
Turn the device on,
2.
Turn the device off,
3.
Perform device initialization,
4.
Perform device termination,
5.
Input and/or output a single character.
necessarily all of the five functions apply to each
however; an
ent~y
paint
must
be
provided
in
each
driver
for each of the five functions, regardless of
o~
not the function is performed.
Since the only address that is available to
the
device
independent
110
functions
is
the
starting address of the
device driver (CDBSDA of CDB),
the following convention
must
be
used
by
each
device
driver.
The
starting
address
contained in the CDBSDA entry must
be
the
add~~ss
or
the
beginning
of
a
Jump
table,
one Jump for each of the five
furictions listed above.
An example of
such
Jump
table
is
given below:
DVDRV$
DEVIO
EGU
~MP
~MP
~MP
~MP
EQU
*
DEVON
DEVOFF
DEVINT
DEVTRM
*
ADDRESS KEPT IN CDBSDA
DEVICE ON ROUTINE
DEVICE OFF ROUTINE
INITIALIZATION ROUTINE
TERMINATION ROUTINE
CHARACTER I/O ROUTINE
Each
entry
point to the device driver is accessed from
the device independent liD functions by executing an
indexed
subroutine
call.
.The offset (index value) is defined by the
displacement of the entry point from
the
beginning
of
the
device
driver.
Since these offsets must be the same for all
device drivers,
a set of system symbols
is
defined
in
the
MDOS equate file for the device driver entry point offsets.
The
device
on and off entry points are accessed at the
beginning and at the end of every record
I/O
function
call
LGETRC
and
.PUTRC>.
These
entry points allow the device
driver to turn the device on and off, respectively.
If
such
actions are not defined ror the device,
then the entry points
should Jump to a routine which simply exits the driver with a
"no error" status condition.
The
device
initialization and termination entry points
are
called
once
by
the
. OPEN
and
. CLOSE
functions,
respectively.
These
entry
points
are
intended
to allow
leader to be punched on a paper tape device,
Tor
example.
If
such
actions
are not defined for the device, then the entry
points should Jump to a routine which simply exits the driver
with
a " no error
ll
status condition.
The
character
I/O entry point to the driver is used to
receive or transmit one byte of
data.
The
transmitted
or
received
byte
is
passed
between the I/O functions and the
Page
26-09

Advertisement

loading

This manual is also suitable for:

Exordisk iii