Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
intdos
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The intdos function invokes the DOS system call specified by
register values defined in <inregs>. It then returns the effect of
the system call in <outregs>. The <inregs> and <outregs> arguments
are unions of type REGS (defined in DOS.H).
To invoke a system call, intdos executes an INT 21H instruction.
Before executing the instruction, the function copies the contents
of <inregs> to the corresponding registers. After the INT
instruction returns, intdos copies the current register values to
<outregs>. It also copies the status of the system carry flag to
the cflag field in <outregs>. A nonzero cflag field indicates the
flag was set by the system call and also indicates an error
condition.
The intdos function is used to invoke DOS system calls that take
arguments for input or output in registers other than DX (DH/DL)
or AL. The intdos function is also used to invoke system calls
that indicate errors by setting the carry flag. Under any other
conditions, the function bdos can be used.
Do not use the intdos function to call interrupts that modify the
DS register. Instead, use the intdosx or int86x function.
Return Value
The intdos function returns the value of the AX register after the
system call is completed. If the cflag field in <outregs> is
nonzero, an error has occurred and _doserrno is also set to the
corresponding error code.
-♦-