Chapter 9 Device Drivers

9.1 Introduction

Device drivers are special programs, loaded when the system starts, that give MS-DOS a device-independent hardware interface that it uses to carry out input and output operations with system hardware devices. This chapter describes device-driver formats, functions, and operations.

As part of its BIOS, MS-DOS provides resident device drivers that support required devices: keyboard, screen, serial port, parallel port, real-time clock, and disk drive. Computer manufacturers create resident drivers and incorporate them in MS-DOS for their computers.

Installable device drivers support printers, plotters, and pointing devices that are not part of the original computer's equipment but are installed by the user. Manufacturers who develop add-on devices for MS-DOS computers create installable device drivers to support them. Users install the drivers by using device or devicehigh commands in the CONFIG.SYS file.

Installable device drivers can also be used to extend or replace existing resident device drivers. For example, the device driver ANSI.SYS provided with MS-DOS extends the resident device driver for the screen, enabling programs to use ANSI escape sequences to move the cursor and control the color and format of characters on the screen.

Although the focus of this chapter is on installable device drivers, the discussion also applies to resident device drivers.