C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
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.
_int86, _int86x, _intdos, _intdosx
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _int86 and _int86x functions execute the 8086-processor-family
     interrupt specified by <intnum>. The _intdos and _intdosx
     functions execute DOS system calls. The _intdos and _intdosx
     functions are equivalent to using _int86 or _int86x with interrupt
     0x21 specified as <intnum>.
 
     The input values for the system call are specified by register
     values defined in <inregs>. The results of the system call are
     returned in <outregs>.
 
     Use _intdos or _int86 for system calls that do not modify segment
     registers. Since _intdosx and _int86x accept segment-register
     values in <segregs>, you can use them in calls that modify
     segments. This enables passing of large-model data segments or
     far pointers.
 
     The <inregs> and <outregs> arguments are unions of type _REGS. The
     <segregs> argument is a structure of type _SREGS. These types are
     defined in the include file DOS.H.
     See: _REGS, _SREGS
 
     Before executing the specified interrupt, the functions copy the
     contents of <inregs> to the corresponding registers. For _int86x
     and _intdosx, only the DS and ES values in <segregs> are copied to
     the corresponding segment registers.
 
     After the interrupt returns, the functions copy the current
     register values to <outregs>. The _int86x and _intdosx functions
     copy the current ES and DS values to <segregs>, and restore DS.
     All versions copy the status of the system carry flag to the
     cflag field in <outregs>.
 
     Segment values for the <segregs> argument can be obtained by
     using either the _segread function or the _FP_SEG macro.
 
     For DOS calls that do not modify any registers other than AL
     and DX and do not set the carry flag to indicate errors, the _bdos
     function can be used instead of _intdos. Another alternative is
     to use inline assembler (using __asm) to make interrupt calls.
 
     Return Value
 
     The interrupt functions return the value of the AX register after
     the system call is completed. For DOS calls, if the cflag field
     in <outregs> is nonzero, an error has occurred. In such cases,
     _doserrno is also set to the corresponding error code.
                                    -♦-