qc.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.
intdosx
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The intdosx function invokes the DOS system call specified by
     register values defined in <inregs>, and returns the results of the
     system call in <outregs>. The <inregs> and <outregs> arguments are
     unions of type REGS.
 
     Unlike the intdos function, intdosx accepts segment-register
     values in <segregs>. This lets programs that use large-model data
     segments or far pointers specify which segment or pointer should
     be used during the system call.
 
     The <segregs> argument is a structure of type SREGS. These types
     are defined in the include file DOS.H.
 
     To invoke a system call, intdosx executes an INT 21H instruction.
     Before executing the instruction, the function copies the contents
     of <inregs> and <segregs> to the corresponding registers. Only the
     DS and ES register values in <segregs> are used.
 
     After the INT instruction returns, intdosx copies the current
     register values to <outregs> and restores DS. It also copies the
     status of the system carry flag to the cflag field in <outregs>.
     If this field is nonzero, the flag was set by the system call and
     indicates an error condition.
 
     The intdosx function is used to invoke DOS system calls that take
     an argument in the ES register or that take a DS register value
     different from the default data segment.
 
     Segment values for the <segregs> argument can be obtained by using
     either the segread function or the FP_SEG macro.
 
     Return Value
 
     The intdosx 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. In such cases, _doserrno is also
     set to the corresponding error code.
                                    -♦-