EasyManuals Logo

Tandy 1000 Programmer's Reference Guide

Default Icon
251 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #179 background imageLoading...
Page #179 background image
Chapter
5
I
Device Drivers
Installation
of
Device Drivers
MS-DOS allows new device drivers
to
be installed dynamically at
boot time. This
is
accomplished by INIT code in the BIOS, which
reads and processes the CONFIG.SYS file.
MS-DOS calls
a
device driver by making a far call
to
its strat-
egy entry point, and passes the information describing the func-
tions of the device driver in
a
Request Header.
This structure allows you
to
program an interrupt-driven device
driver.
For
example, you may want
to
perform local buffering in a
printer.
MS-DOS passes
a
pointer
to
the Request Header in ES:BX. This
is
a
fixed-length header, followed by data pertinent
to
the opera-
tion being performed. Note that
it
is the device driver’s responsi-
bility
to
preserve the machine state (for example, save all
registers on entry and restore them on exit). There is enough
room on the stack
to
do about
20
pushes. If more stack space is
needed, the driver should set up its own stack.
Request
Header
BYTE Length of record
BYTE Unit code
Length in bytes of this Request Header
The subunit the operation is for (minor device)
(no meaning on character devices)
I
BYTE Command code
I
I
WORD
Status
I
18
bytes RESERVED
I
Unit Code Field
The unit code field identifies which unit in your device driver the
request
is
for.
For
example,
if
your device driver has
3
units de-
fined, then the possible values of the unit code field would be
0,
1,
and
2.
177

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals