Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>intr() alternate 8086 software interrupt interface</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
intr()                   Alternate 8086 Software Interrupt Interface

 #include   <dos.h>

 void            intr(intr_num,preg);
 int             intr_num;               Interrupt number
 struct REGPACK  preg;                   Pointer to structure

    intr() generates an 8086 software interrupt specified by 'intr_num'.
    The register values from 'preg' are copied into the registers before
    the software interrupt is executed.  After the software interrupt
    completes, intr() copies the current register values into 'preg'.
    The flags are preserved.  The arguments passed to intr() are:

          intr_num  the interrupt number to be executed
          preg      the address of a structure containing
                         the input registers before the call, and
                         the value of the registers after the
                         interrupt call.

    The 'REGPACK' structure has the following form:

          struct REGPACK  {
               unsigned r_ax, r_bx, r_cx, r_dx;
               unsigned r_bp, r_si, r_di, r_es, r_flags;
          };

    Returns:    There is no return value.  'preg' contains the value of
                the registers after the interrupt call.

See Also: int86() intdos()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson