
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <i86.h>
void intr( int inter_no, union REGPACK *regs );
Description:
The intr function causes the computer's central processor (CPU) to be
interrupted with an interrupt whose number is given by inter_no. Before
the interrupt, the CPU registers are loaded from the structure located
by regs. All of the segment registers must contain valid values.
Failure to do so will cause a segment violation when running in protect
mode. If you don't care about a particular segment register, then it
can be set to 0 which will not cause a segment violation. Following the
interrupt, the structure located by regs is filled with the contents of
the CPU registers.
This function is similar to the int86x function, except that only one
structure is used for the register values and that the BP (EBP in 386
library) register is included in the set of registers that are passed
and saved.
You should consult the technical documentation for the computer that you
are using to determine the expected register contents before and after
the interrupt in question.
Returns:
The intr function does not return a value.
Example:
#include <stdio.h>
#include <string.h>
#include <i86.h>
void main() /* Print location of Break Key Vector */
{
union REGPACK regs;
memset( ®s, 0, sizeof(union REGPACK) );
regs.w.ax = 0x3523;
intr( 0x21, ®s );
printf( "Break Key vector is "
#if defined(__386__)
"%x:%lx\n", regs.w.es, regs.x.ebx );
#else
"%x:%x\n", regs.w.es, regs.x.bx );
#endif
}
produces the following:
Break Key vector is eef:13c
Classification:
Intel
Systems:
DOS, Windows, Win386, QNX, DOS/PM, Netware
See Also:
bdos, int386, int386x, int86, int86x, intdos, intdosx, segread
See Also: bdos int386
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson