home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0000 - 0009 / ibm0000-0009 / ibm0003.tar / ibm0003 / C_DISK2.ZIP / INT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-21  |  1.2 KB  |  39 lines

  1. /*_ int.h   Thu Feb 25 1988   Modified by: Walter Bright */
  2. /* Copyright (C) 1985-1988 by Northwest Software    */
  3. /* All rights reserved                    */
  4. /* Written by Walter Bright                */
  5.  
  6. /* Header for int package    */
  7.  
  8. #ifndef INT_H
  9. #define INT_H    1
  10.  
  11. #ifndef DOS_H
  12. #include    <dos.h>
  13. #endif
  14.  
  15. /* Structure passed to interrupt service routine (see int_xxx())    */
  16. struct INT_DATA
  17. {
  18.     unsigned    prevvec_off,prevvec_seg;    /* previous interrupt vector */
  19.     unsigned    stacksize;            /* size of ISR stack    */
  20.     unsigned    newstack_off,newstack_seg;    /* ptr to ISR stack    */
  21.     unsigned    oldstack_off,oldstack_seg;    /* ptr to interrupted stack */
  22. #if LPTR
  23.     unsigned    staticseg;            /* value for DS        */
  24. #endif
  25.     int        (*funcptr)();
  26.     union REGS regs;    /* passed/returned register and flag values    */
  27.             /* (the _cflag member is garbage and is ignored) */
  28.     struct SREGS sregs;    /* passed/returned segment register values    */
  29. };
  30.  
  31. void int_getvector(unsigned,unsigned *,unsigned *);
  32. void int_setvector(unsigned,unsigned,unsigned);
  33. int int_intercept(unsigned,int (*funcptr)(struct INT_DATA *),unsigned);
  34. int int_restore(unsigned);
  35. void int_off(void);
  36. void int_on(void);
  37.  
  38. #endif /* INT_H */
  39.