Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ int86(DOS) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bdos(DOS)

intdos(DOS)

intdosx(DOS)

int86x(DOS)

INT86(DOS)



     INT86(DOS)               XENIX System V                INT86(DOS)



     Name
          int86 - Executes an interrupt.

     Syntax
          #include <dos.h>

          int int86(intno, inregs, outregs);
          int intno;
          union REGS *inregs;
          union REGS *outregs;

     Description
          The int86 function executes the 8086 software interrupt
          specified by the interrupt number intno.  Before executing
          the interrupt, int86 copies the contents of inregs to the
          corresponding registers.  After the interrupt returns, the
          function copies the current register values to outregs.  It
          also copies the status of the system carry flag to the cflag
          field in outregs.  The inregs and outregs arguments are
          unions of type REGS.  The union type is defined in the
          include file dos.h.

          Int86 is intended to be used to invoke DOS interrupts
          directly.

     Return Value
          The return value is the value in the AX register after the
          interrupt returns.  If the flag field in outregs is nonzero,
          an error has occurred and the doserrno variable is also set
          to the corresponding error code.

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






















     Page 1                                           (printed 8/7/87)





     INT86(DOS)               XENIX System V                INT86(DOS)



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

          /*
           * Use int86 routine to generate a CONTROL-C interrupt
           * (interrupt number 0x23) which would be caught by the
           * interrupt handling routine inthandler.  Note that the
           * values in the regs struct do not matter for this
           * interrupt.
           */

          #define CNTRLC 0x23 int inthandler (int); union REGS regs;
               .       .       .

          signal (SIGINT, inthandler);      .       .       .
          int86(CNTRLC, &regs, &regs);

     Notes
          Segment registers are not included in inregs or outregs.

          This call must be compiled with the -dos flag.

































     Page 2                                           (printed 8/7/87)



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