BIOS Calls

If an application program that was originally written to run under a single-tasking OS needs to communicate with an IO device, it may do this in one of the following manners:

  • It can communicate with the device's registers directly by executing an IN (IO read) or an OUT (IO write) instruction.

  • It can communicate with the device's registers directly by executing a memory read or a memory write instruction (if the device's registers are mapped into memory rather than IO space).

  • It can issue a request to the device's BIOS routine. The BIOS routine, in turn, performs the necessary series of INs and OUTs to communicate the request to the IO device.

DOS programs call BIOS routines by executing software interrupt instructions. An example would be INT 13 to call the disk BIOS routine. In response, the processor indexes into entry 13h in the Interrupt Table in memory and jumps to the start address of the disk BIOS routine indicated in this entry. Since all, or most, accesses to IO devices should be routed through the multitasking OS, the processor should trap to the OS whenever an attempt is made by an application program to execute an INT instruction. The OS can then use the Interrupt Table entry number specified by the INT instruction to determine what BIOS routine the task is calling. The OS can then execute its own respective device driver to communicate the request to the target IO device.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.42.116