0% found this document useful (0 votes)
153 views10 pages

Dos Device Drivers BTCS-703

This document discusses device drivers in DOS. It explains that device drivers allow communication with hardware and are loaded at startup from CONFIG.SYS. Built-in drivers include CON:, LPT1:, and disk drives A:, B:, C:. Device drivers are characterized as block or character drivers and transfer data in blocks or individually. The document provides examples of common DOS device drivers like ANSI.SYS, EMM384.SYS, and RAMDRIVE.SYS. It also describes how drivers are organized in memory and searched by DOS.

Uploaded by

rubinder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views10 pages

Dos Device Drivers BTCS-703

This document discusses device drivers in DOS. It explains that device drivers allow communication with hardware and are loaded at startup from CONFIG.SYS. Built-in drivers include CON:, LPT1:, and disk drives A:, B:, C:. Device drivers are characterized as block or character drivers and transfer data in blocks or individually. The document provides examples of common DOS device drivers like ANSI.SYS, EMM384.SYS, and RAMDRIVE.SYS. It also describes how drivers are organized in memory and searched by DOS.

Uploaded by

rubinder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

DOS DEVICE DRIVERS

BTCS-703
Introduction

 Device drivers are sets of procedures that are used to


communicate with the hardware on the computer.
 The task performed by device drivers is in this respect similar
to software interrupts. However, while each interrupt routine
has a different calling strategy, all device drivers have a
standard method of operation.
 This makes it possible to write programs that interface with
arbitrary devices, either monitor, printer or disk drives.
 Device drivers are not like normal programs since they
cannot be run from the DOS command line. Instead they
must be loaded in the CONFIG.SYS file at boot-up time using
a device command.
MS-DOS DEVICE DRIVERS
DOS has a number of built-in drivers to communicate with
the console (keyboard+screen), printer, disk-drives, etc. The
device drivers are given specific names.

Built-In Drivers:
Name of Device Name of Driver
Console CON:
Printer LPT1:LPT2:LPT3:
Serial Ports COM!:COM2:COM3:COM4:
Null device NUL:
Disk drive A A:
Disk drive B B:
Disk drive C C:
Usage of device drivers

 When the programmer uses DOS interrupt


calls, the relevant device drivers are
automatically used.
 File commands can access just about any
device but the more specific commands use
particular devices.
 The screen output DOS commands explicity
use the CON: device while the printer output
DOS commands probably use the PRN:
Loading device drivers

 Device drivers are loaded in memory in the


order in which they are encountered in
CONFIG.SYS.
 DOS maintains a linked list of these drivers,
with new drivers being added to the head of
the list. When a device driver is accessed, the
list is searched from the head. The latest
driver is found first and is subsequently used.
MS-DOS DEVICE DRIVERS TYPES

Block Device Drivers


Character Device Drivers
• Character Device Drivers: one character
or byte at a time for i/o data
transfer
 Single h/w unit support
 Application program accessibility-
By name
By function calls
By using default handles

• Block Device Drivers: Data transfer


fixed or variable blocks/chunks
 Controls random/non random mass storage
devices.
 Two or more h/w unit support
STRUCTURE OF MS-DOS DEVICE DRIVERS
MS – DOS Device Driver Structure
Initialization
Media Check
Build BPB
I/O Control Read and Write
Status
Read

Interrupt Write, Write/Verify


Output until Busy

Header Flash Buffers


Device open
Device Close
Check whether Removable
Generic IOCTL
Get/set Logical Device
Various MS-DOS Device Drivers

ANSI.SYS HIMEM.SYS
EGA.SYS SETVER.EXE
PRINTER.SYS DISPLAY.SYS
INTERLINK.EXE
CHKSTATE.SYS
SMARTDRV.EXE
EMM384.SYS DRIVER.SYS
RAMDRIVE.SYS POWER.EXE
DBLSPACE.SYS SMARTDRV.SYS
Usage of Device Drivers
 ANSI.SYS: Provides Screen customization (includes
coloring and extending) and keyboard functions .
 SETVER.EXE: Includes an label from CONFIG.SYS that
device drivers read while booting the system.
 SMARTDRV.SYS: establishes the disk cache
 RAMDRIVE.SYS: Allows portion of m/y as disk
 MOUSE.SYS is device driver for mouse installed in CONFIG.SYS file
 Screen output DOS commands explicitly use CON:
 Printer output DOS commands use the PRN: or
 ANSI.SYS allows DOS user to move cursor, screen optimization and color
setting etc.
Loading Device Drivers
Device Drivers are loaded in m/y in the order they appear
in COFIG.SYS
DOS maintain Linked list of these drivers .
New Driver added at the head of list.

You might also like