home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / reg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  1.8 KB  |  89 lines

  1. /*
  2.  *    @(#) reg.h 2.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * offsets of user registers on kernel stack 
  13.  *
  14.  *    The values here depend largely on the hardware, and on 
  15.  *    the code for system call, trap, and interrupt entry.
  16.  */
  17.  
  18.  
  19. #ifdef M_I386
  20. #define RSS    18
  21. #define RESP    17
  22. #define REFL    16
  23. #define RCS    15
  24. #define REIP    14
  25. #define RCODE    13
  26. #define RTYPE    12
  27. #define REAX    11
  28. #define RECX    10
  29. #define REDX    9
  30. #define REBX    8
  31. #define KESP    7    /* kernel stack pointer, not user's! */
  32. #define REBP    6
  33. #define RESI    5
  34. #define REDI    4
  35. #define RDS    3
  36. #define RES    2
  37. #define RFS    1
  38. #define RGS    0
  39. #endif
  40.  
  41. /*
  42.  * users regs on kernel stack i80286 kernel.
  43.  */
  44.  
  45. #ifdef M_I286
  46. #define    RSS    7        /* user ss */
  47. #define    RSP    6        /* user sp */
  48. #define USP    6
  49. #define    RFL    5
  50. #define    RCS    4
  51. #define    RIP    3
  52. #define    Rviol    2
  53. #define    RES    1
  54. #define    RAX    0
  55. #define    RCX    -1
  56. #define    RDX    -2
  57. #define    RBX    -3
  58. #define    RKSP    -4        /* NOT sp to user's stack */
  59. #define    RBP    -5
  60. #define    RSI    -6
  61. #define    RDI    -7
  62. #define    RDS    -8
  63. #endif
  64.  
  65.  
  66. /* These values are for the i8086 kernel */
  67.  
  68. #ifdef M_I8086
  69. #define URFLAG  12      /* these guys are in the user data space,       */
  70. #define URCS    10      /* and are read by fuword(u.u_aAX[RSP] + URxx)  */
  71. #define URIP     8
  72. #define URVEC    6
  73. #define URBP     4
  74. #define URES     2
  75. #define URDX     0
  76.  
  77. #define RSP86     8    /* these guys are on system stack */
  78. #define USP86     8
  79. #define RSS86     7
  80. #define RDS86     5
  81. #define RDI86     4
  82. #define RSI86     3
  83. #define RCX86     2
  84. #define RBX86     1
  85. #define RAX86     0
  86. #define Rstate  -1              /* user/system mode, trap # */
  87. #define Rilev   -2              /* interrupted procedure level */
  88. #endif
  89.