HOME

TheInfoList



OR:

The DOS API is an API which originated with
86-DOS 86-DOS (known internally as QDOS, for Quick and Dirty Operating System) is a discontinued operating system developed and marketed by Seattle Computer Products (SCP) for its Intel 8086-based computer kit. 86-DOS shared a few of its commands wit ...
and is used in MS-DOS/ PC DOS and other DOS-compatible operating systems. Most calls to the DOS API are invoked using software interrupt 21h ( INT 21h). By calling INT 21h with a subfunction number in the AH
processor register A processor register is a quickly accessible location available to a computer's processor. Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only. ...
and other parameters in other registers, various DOS services can be invoked. These include handling keyboard input, video output, disk file access, program execution, memory allocation, and various other activities. In the late 1980s, DOS extenders along with the DOS Protected Mode Interface (DPMI) allow the programs to run in either 16-bit or 32-bit protected mode and still have access to the DOS API.


History of the DOS API

The original DOS API in 86-DOS and MS-DOS 1.0 was designed to be functionally compatible with
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
. Files were accessed using file control blocks (FCBs). The DOS API was greatly extended in MS-DOS 2.0 with several Unix concepts, including file access using
file handles In Unix and Unix-like computer operating systems, a file descriptor (FD, less frequently fildes) is a process-unique identifier (handle) for a file or other input/output resource, such as a pipe or network socket. File descriptors typically have ...
, hierarchical directories and device I/O control. In DOS 3.1,
network redirector In DOS and Windows, a network redirector, or redirector, is an operating system driver that sends data to and receives data from a remote device. A network redirector provides mechanisms to locate, open, read, write, and delete files and submit p ...
support was added. In MS-DOS 3.31, the INT 25h/26h functions were enhanced to support hard disks greater than 32 MB. MS-DOS 5 added support for using
upper memory blocks In DOS memory management, the upper memory area (UMA) refers to memory between the addresses of 640  KB and 1024 KB ( 0xA0000–0xFFFFF) in an IBM PC or compatible. IBM reserved the uppermost 384 KB of the 8088 CPU's 1024 KB ...
(UMBs). After MS-DOS 5, the DOS API was unchanged for the successive standalone releases of DOS.


The DOS API and Windows

In Windows 9x, DOS loaded the protected-mode system and graphical shell. DOS was usually accessed from a virtual DOS machine (VDM) but it was also possible to boot directly to real mode
MS-DOS 7.0 MS-DOS 7 is a real mode operating system for IBM PC compatibles. Unlike earlier versions of MS-DOS it was not released separately by Microsoft, but included in the Windows 9x family of operating systems. Windows 95 RTM reports to be MS-DOS 7.0, w ...
without loading Windows. The DOS API was extended with enhanced internationalization support and
long filename Long filename (LFN) support is Microsoft's backward-compatible extension of the 8.3 filename (short filename) naming scheme used in DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, .html, a ...
support, though the long filename support was only available in a VDM. With Windows 95 OSR2, DOS was updated to 7.1, which added FAT32 support, and functions were added to the DOS API to support this. Windows 98 and Windows ME also implement the MS-DOS 7.1 API, though Windows ME reports itself as MS-DOS 8.0. Windows NT and the systems based on it (e.g. Windows XP and Windows Vista) are not based on MS-DOS, but use a virtual machine, NTVDM, to handle the DOS API. NTVDM works by running a DOS program in virtual 8086 mode (an emulation of
real mode Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. The mode gets its name from the fact that addresses in real mode always correspond to real locations in memory. Real mode is characterized by a 20-bit seg ...
within
protected mode In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units (CPUs). It allows system software to use features such as virtual memory, paging and safe multi-tasking d ...
available on
80386 The Intel 386, originally released as 80386 and later renamed i386, is a 32-bit microprocessor introduced in 1985. The first versions had 275,000 transistorsDOSEMU for Linux uses a similar approach.


Interrupt vectors used by DOS

The following is the list of interrupt vectors used by programs to invoke the DOS API functions.


DOS INT 21h services

The following is the list of functions provided via the DOS API primary software interrupt vector.


Operating systems with native support

* MS-DOS – most widespread implementation * PC DOS – IBM OEM version of MS-DOS * OS/2 1.x – Microsoft/IBM successor to MS-DOS and PC DOS * SISNE plus
Clone Clone or Clones or Cloning or Cloned or The Clone may refer to: Places * Clones, County Fermanagh * Clones, County Monaghan, a town in Ireland Biology * Clone (B-cell), a lymphocyte clone, the massive presence of which may indicate a pathologi ...
created by Itautec and
Scopus Tecnologia Scopus is Elsevier's abstract and citation database launched in 2004. Scopus covers nearly 36,377 titles (22,794 active titles and 13,583 inactive titles) from approximately 11,678 publishers, of which 34,346 are peer-reviewed journals in top-le ...
in Brazil *
DR-DOS DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
– Digital Research DOS family, including Novell DOS, PalmDOS, OpenDOS, etc. * PTS-DOS – PhysTechSoft & Paragon DOS clone, including S/DOS * ROM-DOS – Datalight ROM DOS version *
Embedded DOS General Software was a Washington, USA based creator and supplier of system software headquartered in Bellevue, Washington. It was founded in 1989 by Steve Jones and later incorporated in 1990 as General Software, Inc. In 2008, the company was ...
General Software General Software was a Washington, USA based creator and supplier of system software headquartered in Bellevue, Washington. It was founded in 1989 by Steve Jones and later incorporated in 1990 as General Software, Inc. In 2008, the company was ...
version * FreeDOS – Free, open source DOS clone *
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
( IA-32 and x86-64 versions) * Windows 95 – contains MS-DOS 7.0 * Windows 98 – contains MS-DOS 7.1 * Windows 98 SE – contains MS-DOS 7.1 * Windows ME – contains MS-DOS 8.0


Operating systems with DOS emulation layer

* Concurrent CP/M-86 (3.1 only) with PCMODE – Digital Research CP/M-86-based OS with optional PC DOS emulator *
Concurrent DOS Multiuser DOS is a Real-time operating system, real-time multi-user multi-tasking operating system for IBM Personal Computer, IBM PC-compatible microcomputers. An evolution of the older Concurrent CP/M-86, Concurrent DOS and Concurrent DOS 386 ...
– Digital Research CDOS family with built-in PC DOS emulator * DOS Plus – a stripped-down single-user variant of Concurrent PC DOS 4.1–5.0 * Multiuser DOS – Digital Research/Novell MDOS family including Datapac System Manager, IMS REAL/32, etc. * OS/2 (2.x and later) – IBM operating system using a fully-licensed MS-DOS 5.0 in a virtual machine * Windows NT (all versions except 64-bit editions)


Other emulators

* NTVDM for Windows NT * DOSEMU for Linux * DOSBox *
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...


See also

* BIOS interrupt call * Ralf Brown's Interrupt List (RBIL) * Comparison of DOS operating systems * DOS Protected Mode Interface (DPMI) * DOS extender *
DOS MZ executable The DOS MZ executable format is the executable file format used for .EXE files in DOS. The file can be identified by the ASCII string "MZ" ( hexadecimal: 4D 5A) at the beginning of the file (the " magic number"). "MZ" are the initials of Ma ...
* COMMAND.COM


References


Further reading

* (xvii+1053 pages; 29 cm) (NB. This original edition contains flowcharts of the internal workings of the system. It was withdrawn by Microsoft before mass-distribution in 1986 because it contained many factual errors as well as some classified information which should not have been published. Few printed copies survived. It was replaced by a completely reworked edition in 1988

* (xix+1570 pages; 26 cm) (NB. This edition was published in 1988 after extensive rework of the withdrawn 1986 first edition by a different team of authors

* ''The New Peter Norton Programmer's Guide to the IBM PC & PS/2'' by Peter Norton and Richard Wilton, Microsoft Press, 1987 . * * ''The Programmer's PC Sourcebook'' by Thom Hogan, Microsoft Press, 1991 * ''Microsoft MS-DOS Programmer's Reference - The Official Technical Reference to MS-DOS'', Microsoft Press, 1993
IBM PC DOS 7 Technical Update
* (Printed in the UK.)


External links



(a.k.a. RBIL, Ralf Brown's Interrupt List)
ctyme.com - INT Calls by function
!-- http://www.delorie.com/djgpp/doc/rbinter/ -->

{{Disk operating systems DOS technology Operating system APIs X86 architecture Interrupts