Writing an OSDI Overview

Writing an OSDI consists of modifying the device interface module of the OSDI. This module provides empty functions each with a specific purpose (initialise the devices, start input, send output, and so on). These functions broadly map to the application-level functionality available to you in DP4. You supply the appropriate code in each function for your specific Device Group.

For example, suppose the way to write to the display in case B above is to move the data to a video RAM held at D000:0000. You must write a piece of code to place the data at the given address. The OSDI is automatically passed the two pieces of data that you require: the identifier of the POD that ultimately receives the output and the output data itself. You modify a specified function to handle the output - this function is called when the application "prints" to the display.

The device interface module must be compiled and linked with the supplied object modules that comprise the rest of the OSDI. This produces a device-specific OSDI executable program. More information on how to write an OSDI using the OSDI pack can be found here.

The general structure of the OSDI is fairly consistent across the various operating systems. For example the skeleton functions to be modified have the same names and parameters in MS-DOS,OS/2 and Unix/Linux. However, the Windows OSDI uses a different set of functions, and you should therefore be careful only to study the appropriate pages in the part of the manual that deals with writing OSDIs.