home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / Int.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  1.3 KB  |  61 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __INT_H
  7. #define __INT_H 1
  8. #if  !defined(__NT__) 
  9.  
  10. #if __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. #include    <dos.h>
  15.  
  16. #pragma pack(1)
  17. struct INT_DATA
  18. {
  19. #if __INTSIZE == 4
  20.     char        align;
  21. #endif
  22.     unsigned        prevvec_off;
  23.     unsigned short    prevvec_seg;
  24. #if __INTSIZE == 4
  25.     unsigned short    prevvecr_off;
  26.     unsigned short    prevvecr_seg;
  27. #endif
  28.     unsigned        stacksize;
  29.     unsigned        newstack_off;
  30.     unsigned short    newstack_seg;
  31.     unsigned        oldstack_off;
  32.     unsigned short    oldstack_seg;
  33. #if __COMPACT__ || __LARGE__
  34.     unsigned short    staticseg;
  35. #endif
  36.     int        (__cdecl *funcptr)();
  37.     union REGS regs;
  38.     struct SREGS sregs;
  39. };
  40.  
  41. #pragma pack()
  42.  
  43. void __cdecl int_getvector(unsigned,unsigned *,unsigned *);
  44. void __cdecl int_setvector(unsigned,unsigned,unsigned);
  45. int __cdecl int_intercept(unsigned,int (__cdecl *funcptr)(struct INT_DATA *),unsigned);
  46. void __cdecl int_restore(unsigned);
  47. void __cdecl int_off(void);
  48. void __cdecl int_on(void);
  49. long __cdecl int_prev(struct INT_DATA *);
  50.  
  51. #define int_on()    __emit__(0xFB)
  52. #define int_off()    __emit__(0xFA)
  53. #define int_gen(i)    __emit__(0xCD,i)
  54.  
  55. #if __cplusplus
  56. }
  57. #endif
  58. #endif /* ifndef __NT__ */
  59.  
  60. #endif
  61.