The DOS3Call function allows an application to call an MS-DOS Interrupt 21h function. DOS3Call can be called only from assembly-language routines. It is exported from KRNL286.EXE and KRNL386.EXE and is not defined in any Windows header or include files.
Registers must be set up as required by the desired Interrupt 21h function before the application calls the DOS3Call function.
The register contents are preserved as they are returned by the Interrupt 21h function.
Applications should use this function instead of a directly coded MS-DOS Interrupt 21h function. The DOS3Call function runs somewhat faster than the equivalent MS-DOS Interrupt 21h function running in Windows.
The following example shows how to prototype the DOS3Call function in C:
extern void FAR PASCAL DOS3Call(void);
To declare the DOS3Call function in an assembly-language routine, an application could use the following line:
extrn DOS3CALL: far
If the application includes CMACROS.INC, the function is declared as follows:
extrnFP DOS3Call
The following example is a typical use of the DOS3Call function:
extrn DOS3CALL: far
.
.
.
; set registers
mov ah, DOSFUNC ;DOSFUNC = Int 21h function number
cCall DOS3Call