Device Drivers Under Hh O/S - Tandy 600 Programmer's Reference Manual

Bios programmers
Hide thumbs Also See for 600:
Table of Contents

Advertisement

Device
Drivers
Under
HH
0/S
The
HH
0/S
operating
system
recognizes
a
fixed
set
of
devices.
These
devices are defined
in
the Microsoft
Hand
Held
BIOS
Specification,
and
ordinarily,
each
device
is
mapped
into
a
set
of
routines
in
the
BIOS
which handle
the
function
calls
associated
with that device.
The
mapping between
logical
device
and
the routines
that
handle
the functions
for that
device
is
accomplished by each
device being
accessed
through a
different
BIOS
interrupt.
By
modifying
the
interrupt
vector associated
with
a
given
BIOS
interrupt,
it
is
possible
to
map
the
device
to
a
different
set
of
routines
to
handle
the device
functions.
The
HH
O/S
installable
Device
Driver
mechanism
defines a regular
scheme
for
accomplishing
this
alternate
mapping.
A
device
driver
is
an 8086
native
code program
that
resides
in
a
file in
the
HH
O/S
internal
file
system.
The
device
driver
file
contains
a header
that
identifies
it
as a
device
driver
to
the
operating system,
and
provides the
control information
necessary
to
install
it
and remove
it.
The
installation
process
involves placing the
device
driver
code
in
a protected place
in
memory,
calling
an
initialization
entry
point,
and
then modifying the
interrupt
vector
for
the
device
to point
to
the
function
call
entry point
of
the
device
driver.
Removing
the device
driver
from
the
system
involves
calling
a
deactivation entry point
in
the
driver,
deallocating the
protected
memory
location
that
the
driver
occupied,
and
then modifying
the
interrupt
vector
to
point
back
to
the
original
BIOS
entry
point.
General Rules For Device
Drivers
Device
drivers
are
8086 machine code
programs.
They
may
occupy
only
a
single
segment
of
memory
which
may
be up
to
64k
bytes
in
size.
During normal
operation, the
device
driver
resides
in
a
region
of
memory
that
allows
it
to
stay
at
a
fixed
address.
However,
when
a
device
driver
is
removed
from
the
system,
it
may
be necessary
to
move
other
drivers to
different
locations
in
order
to
recover
the
memory
occupied by the
driver
being
removed.
For
this
reason, the device
driver
must
be
coded
in
such a
way
that
it
can be
relocated
easily.
As
long
as
the
driver
does
not
do
FAR
calls
or
jumps
to locations within
itself,
and does
not
refer
to
absolute
segment
addresses
within
itself
for
data access,
it
should
be address
independent.
The
exception
to
this
address independence would be
interrupt
service routines
which
are
contained
in
the device
driver.
Before
HH
O/S
relocates the
driver,
it
will
call
the
initialization
entry point
telling
the
driver
where
it
is
being
relocated
to.
This gives
the
driver
a
chance
to
perform
any
operations
necessary
before the
code
is
moved.
Device
drivers
are
called
by
HH
O/S
as a normal
part of
its
operation.
Because
HH
O/S
in
not
reentrant,
device
drivers
may
not
call
HH
O/S
for
any
reason.
117

Advertisement

Table of Contents
loading

Table of Contents