Content deleted Content added
complere rewrite, old version had numerous inaccuracies (cmd.exe is NOT MS-DOS, etc.), will add more later |
m add function table |
||
Line 2:
The '''MS-DOS API''' is an [[API]] used in [[MS-DOS]], [[PC-DOS]] and other compatible operating systems. The DOS API is based on software interrupt 21h (int 21h). By calling int 21h with the subfunction in ah and the other parameters in other registers, one invokes various DOS services. DOS services include keyboard input, video output, disk file access, executing programs, memory allocation, and various other things. There are various implementations of the DOS API, including MS-DOS, PC-DOS, DR-DOS, FreeDOS, PTS-DOS, and others.
[[Microsoft Windows]] versions 1.0 through 3.1 were graphical shells that ran on MS-DOS and relied on the MS-DOS API. [[Windows 9x]] was also DOS based, but used a custom version of MS-DOS mainly as a bootloader and did not use the MS-DOS API much after booting. [[Windows NT]] is not based on MS-DOS, but features a DOS emulator called [[NTVDM]]. NTVDM works by running a DOS program in [[virtual 8086 mode]] (an emulation of [[real mode]] available on [[80386]] and higher processors). [[DOSEMU]] for [[linux]] uses a similar approach.
==Common DOS services==
{|class="wikitable"
!Subfunction
!Parameters
!Returns
!Service
|-
|AH=0h
|
|never
|TERMINATE PROGRAM
|-
|AH=1h
|
|AL=character read
|READ CHARACTER FROM STDIN
|-
|AH=2h
|al=character
|
|WRITE CHARACTER TO STDOUT
|-
|AH=0Ah
|ds:dx=pointer to '$' terminated string
|
|WRITE STRING
|-
|AH=4Ch
|al=return value
|never
|TERMINATE PROGRAM
|}
==Operating systems with support for the MS-DOS API==
|