Ms dos device Drivers Sources of Information



Yüklə 458 b.
tarix08.10.2017
ölçüsü458 b.
#3930


MS DOS Device Drivers

  • Sources of Information

  • Device driver basics

  • Structure and internal routines


Sources of information

  • John Angermeyer and Kevin Jaeger, MS-DOS Developer’s Guide, Howard W. Sams, Indianapolis, 1986

  • Ray Duncan, Advanced MS-DOS, Microsoft Press, Redmond, Washington, 1986

  • Robert Lai, Writing MS-DOS Device Drivers, Addison-Wesley, Reading, Massachusetts, 1992



Device driver basics

  • Operating System modules that control hw

  • Isolate higher levels from hw specifics

  • Standard interface with OS

  • Installable at boot time as a “chain” (CONFIG.SYS)

  • Not necessary to modify the OS

  • Similar to Unix/Xenix/Linux device drivers

  • Two types: Block and Character



General Structure



Device Header



Strategy Routine

  • Called by MS-DOS when driver is first loaded

  • Called by MS-DOS whenever I/O request is issued to device

  • Request call includes a pointer to a request header; driver saves pointer and returns to MS-DOS

  • Request header includes command code and other information



Interrupt Routine

  • Called after the strategy routine

  • Implements the device driver proper

  • Performs the actual I/O operations

  • Collection of subroutines to implement various functions (read, write, …)

  • Centralized entry routine saves registers and sets up driver ops

  • Centralized exit routine restores registers and sets status and error codes



Sample Command Codes



Yüklə 458 b.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə