This document, "Part 5: DOS/BATCH Device Drivers," provides a detailed guide to understanding, structuring, and utilizing device drivers for the PDP-11 computer system, both within and outside the Disk Operating System (DOS/BATCH) environment.
Chapter 1 introduces the concept of device drivers as subroutines for handling I/O transfers between a PDP-11 and its peripherals. It explains that these drivers, originally developed for DOS/BATCH, are also made available in an I/O Utilities Package for users running programs independently of the operating system.
Chapter 2 delves into the fundamental format of device drivers, emphasizing the need for a common interface to ensure device-independent operation. It describes key components such as the Driver Interface Table (containing device information and subroutine entry points), Setup Routines (initiating I/O actions), Interrupt Servicing (handling device interrupts and error checks), and Error Handling mechanisms (for both recoverable and irrecoverable errors). The chapter also details the driver's interface, including a "link word" for control parameters and a mechanism for interrupt handling.
Chapter 3 focuses on the stand-alone use of device drivers. It explains how drivers can be assembled directly with a program, detailing the process of setting interrupt vectors and defining a standardized parameter table for driver calls. It provides assembly code examples and discusses how drivers return control and report errors. The chapter also covers methods for assembling drivers separately (e.g., as binary modules) and their use in device-independent scenarios where a program may need to adapt to different peripheral configurations based on a driver's "Facility Indicator."
Chapter 4 specifically examines I/O drivers within the DOS/BATCH operating system. It outlines the principal function of drivers in fulfilling Monitor requests for data block transfers and their role in handling device start-up, shut-down, and special features. The chapter details the standardized structure all drivers must adhere to, including a table of identifying information with a "Busy Flag" and "Facility Indicator" bits that define device characteristics. It explains how the Monitor calls drivers via a Driver Queue Manager, and describes the specific routines a driver must provide: TRANSFER (to initiate data transfer), Interrupt Servicing (to manage transfer termination and errors), OPEN (for hardware initialization), CLOSE (for hardware shut-down), and SPECIAL (for device-specific functions). Special considerations for terminal drivers, such as handling variable data lengths and circular buffering, are also discussed.
Chapter 5 concludes the document by presenting a "Sample Line Printer Driver Listing" (LP11 Line Printer Driver). This comprehensive listing includes assembly code for the driver's various routines, along with symbol and cross-reference tables, serving as a practical illustration of the concepts and structures detailed in the preceding chapters.
Site structure and layout ©2025 Majenko Technologies