Jump to content

Physical Device Driver Reference

From EDM2
Physical Device Driver Reference
  1. Introduction
  2. Physical Device Driver Overview
  3. Physical Device Driver Architecture and Structure
  4. OS/2 Physical Device Driver Operations
  5. OS/2 Physical Device Driver Design Issues
  6. Character Device Monitors
  7. Installation of External Loadable Device Drivers
  8. Physical Device Driver Strategy Commands
  9. Device Helper (DevHlp) Services
  10. Resource Management
  11. Linking Resource Manager Services
  12. Generic IOCtl Commands
Appendixes
OS/2 Version Compatibility Considerations
Running OS/2 Version 1.3 16-Bit PDDs on OS/2
Using Advanced Bios
Notices
Glossary

By IBM

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

Description

Device drivers are software modules that act as an interface between OS/2* (or its applications) and physical devices. In DOS, applications are responsible for knowing and managing all the differences between different devices of like types. The device drivers of OS/2 enable applications to focus on the logic of the actual application and treat devices in a device-independent way.

This device-independence is a fundamental benefit of the OS/2 programming environment. For example, drawing a circle on the screen or on a printer is as easy as opening a device context for the correct output device and performing the drawing operations. By placing the drawing operation into the device context, the programmer does not have to be concerned about whether the device is a printer or a display.

API Information

Links and Editions

About this Book

The OS/2 Physical Device Driver Reference defines what a physical device driver is and how it operates. In addition, a description of the types of physical device drivers, their interfaces, and the available system services is provided. System and application programmers can use the information found in this book to write their own physical device drivers and subsystems.

Knowledge of at least one programming language that is used for writing OS/2 applications is necessary, and the programmer must be familiar with the workings of the OS/2 operating system.

  • Introduction contains a general description of OS/2 physical device drivers, presentation drivers, and virtual device drivers, explaining their differences and how they fit into the operating system.
  • Physical Device Driver Overview contains a detailed description of OS/2 physical device drivers, including the types of drivers, installation of the drivers, and I/O support for applications.
  • Physical Device Driver Architecture and Structure contains a description of the physical device driver architecture, component structure, and driver contexts.
  • OS/2 Physical Device Driver Operations contains a breakdown of physical device driver operations, including physical device driver initialization and hardware interrupt management.
  • OS/2 Physical Device Driver Design Issues contains design considerations for physical device drivers and Physical Device Drivers/Virtual Device Driver pairs, a description of the types of communication between device drivers, and a description of how to build a physical device driver.
  • Character Device Monitors contains a description of character device monitors, their processes, support, and monitor functions.
  • Installation of External Loadable Device Drivers contains information on how to install external loadable device drivers and a description and sample of a device driver profile.
  • Physical Device Driver Strategy Commands contains descriptions of the commands that the device driver strategy routine must support.
  • Device Helper (DevHlp) Services contains descriptions, listed alphabetically, of the kernel functions (DevHlp services) that are available to physical device drivers. These functions are written in C and assembler language.
  • Resource Management contains an architecture overview, programming interface definitions, programming structure definitions, and general development usage information.
  • Generic IOCtl Commands contains descriptions of the IOCtl commands, listed by category and function, and guidelines for using the I/O Protect Level (IOPL) code segments.
  • Appendixes
    • OS/2 Version Compatibility Considerations lists the new information that has been added or changed since the Warp release.
    • Running OS/2 Version 1.3 16-Bit PDDs on OS/2 describes the problems and solutions of running a 16-bit physical device driver on the OS/2 2.1 operating system.
    • Using Advanced Bios (ABIOS) contains information on how the physical device driver uses the Advanced BIOS methods, including obtaining a Logical ID and handling ABIOS requests and spurious interrupts.

A glossary and an index are included in the back of the book.

The IBM OS/2 Warp OS/2 Physical Device Driver Reference is an overview of physical device drivers and should be used in conjunction with the specific device reference.

OS/2, as used in this book, refers to the Warp Version of the OS/2 operating system unless stated otherwise.

Throughout this publication, there are references to specific values for character strings. These values are for the single-byte character set (SBCS). When using the double-byte character set (DBCS), note that one DBCS character equals two SBCS characters.

What's New

The following changes have been included in this release of the OS/2 Physical Device Driver Reference.

Five new Category 05h IOCtls have been added in support of bidirectional data transfers through the parallel port:

       PRT_SETCOMMMODE (52h) - Set Parallel Port Communication Mode
       PRT_QUERYCOMMMODE (72h) - Query Parallel Port Communication Mode
       PRT_SETDATAXFERMODE (53h) - Set the Parallel Port Data Transfer Mode
       PRT_QUERYDATAXFERMODE (73h) - Query the Parallel Port Data Transfer Mode
       PRT_QUERYDEVICEID (74h) - Query Parallel Port Device ID 

For information on functions and items that have been added to OS/2 (beginning with Warp), see OS/2 Version Compatibility Considerations.