Microsoft KB Archive/103891

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview: Operating System Application Programmer Interface PSS ID Number: Q103891 Article last modified on 11-15-1993 PSS database name: PSS

MS-DOS | OS/2 | WINDOWS

OPERATING SYSTEM API

Applications request operating system services, such as I/O, by calling some sort of application programmer interface (API) that is “exposed”–or made available and accessible–by the operating system.

MS-DOS exposes its I/O API by means of interrupt routines, primarily interrupt number x21.

  • From an assembly language program, a few key CPU registers are loaded with parameter information, and the interrupt instruction (INT) is used to pass the request to MS-DOS.
  • When a function (such as “Read”) for a high level language (such as C or Pascal) is compiled, linked, and executed, it causes events to occur that are equivalent to those invoked by the assembly language program: registers are loaded with parameters and an interrupt is generated, again passing control to MS-DOS.
  • When you issue a command from the MS-DOS command line, the resident command interpreter (Command.com) causes the same events to occur again: parameters are loaded in registers, an interrupt is generated, control is passed to MS-DOS.

OS/2 operates much the same way, except it does not expose an interface directly through interrupts: you must issue a high-level API call such as “DosRead,” with the appropriate parameters.

KBCategory: KBSubCategory: msna

Copyright Microsoft Corporation 1993.