## Physical Device Driver Reference

[prev][next][parent][TOC]

### Physical Device Driver Load Module Layout

The data segment must be the first segment after the EXE file header. Because the device header must be located at the beginning of the file, this allows the data segment to be located immediately after the EXE file header.

Notes

Multisegmented device drivers that support character device monitors must be organized so that the monitor notification routine resides in the first code segment or in fixed memory.
Physical device drivers that support interrupt or timer handlers must ensure that those functions reside in the first code segment.
Physical device drivers that provide IDC services must ensure that the entry point routines reside in the first code segment.

The file image of a physical device driver is shown in the following figure :

          /---------------\

          | Device Driver |     Data Segment (64KB max)

          |    Header     |     Data accessed by interrupt,

      LOW |- - - - - - - -|     timer handlers, and device

         |               |     monitors, must reside in this

       |  |     Data      |     segment.

       |  |               |

       |  |               |

       |  |- - - - - - - -|     Code Segment (64KB max)

       |  |               |     Interrupt and timer handlers,

       |  |     Code      |     and device monitor must reside

       |  |               |     in this segment.

       |  |- - - - - - - -|

       |  | Swappable or  |

       |  |  Temporary    |

       |  |     Data      |

       |  |               |     Multiple

       |  |- - - - - - - -|     Data or

         | Swappable or  |     Code Segments

     HIGH |  Temporary    |

          |     Code      |

          |               |

          |- - - - - - - -|

          |               |