Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intdos(DOS) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bdos(DOS)

int86(DOS)

int86x(DOS)

intdosx(DOS)

INTDOS(DOS)



     INTDOS(DOS)              XENIX System V               INTDOS(DOS)



     Name
          intdos - Invokes a DOS system call.

     Syntax
          #include <dos.h>

          int intdos (inregs, outregs);
          union REGS *inregs;
          union REGS *outregs;

     Description
          The intdos function invokes the DOS system call specified by
          register values defined in inregs and returns the effect of
          the system call in outregs.  The inregs and outregs
          arguments are unions of type REGS.  The union type is
          defined in the include file 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.  If this field is nonzero, the flag was set by the
          system call and indicates an error condition.

          intdos is intended to be used to invoke DOS system calls
          that take arguments in registers other than DX (DH/DL) and
          AL, or to invoke system calls that indicate errors by
          setting the carry flag.

     Return Value
          intdos returns the value of the AX register after the system
          call has completed.  If the flag field in outregs is
          nonzero, an error has occurred and doserrno is also set to
          the corresponding error code.

     See Also
          bdos(DOS), int86(DOS), int86x(DOS), intdosx(DOS)
















     Page 1                                           (printed 8/7/87)





     INTDOS(DOS)              XENIX System V               INTDOS(DOS)



     Example
          #include <dos.h> #include <stdio.h>

          union REGS inregs, outregs;      .       .       .

          /* The following statements get the current date using **
          dos function call 2a hex.  */

          inregs.h.ah = 0x2a; intdos (&inregs,&outregs); printf ("date
          is %d/%d/%d\n",outregs.h.dh,outregs.h.dl,
               outregs.x.cx);

     Notes
          This call must be compiled with the -dos flag.









































     Page 2                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026