Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
3.1 KiB

  1. /*++ BUILD Version: 0001
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. X86PC.H
  5. Abstract:
  6. This file contains macros, function prototypes, and externs for the
  7. x86 emulator NT version of SoftPC v3.0.
  8. Author:
  9. Dave Hastings (daveh) 4-11-91
  10. Revision History:
  11. Jeff Parsons (jeffpar) 14-May-1991
  12. Essentially copied this file from V86PC.H, except that I had to define
  13. X86CONTEXT as the x86-compatible version of CONTEXT.
  14. --*/
  15. //
  16. // Define the size of the 80387 save area, which is in the context frame.
  17. //
  18. #define SIZE_OF_80387_ENVIRONMENT 108
  19. #define SIZE_OF_80387_REGISTERS 80
  20. typedef struct _FLOATING_SAVE_AREA {
  21. ULONG ControlWord;
  22. ULONG StatusWord;
  23. ULONG TagWord;
  24. ULONG ErrorOffset;
  25. ULONG ErrorSelector;
  26. ULONG DataOffset;
  27. ULONG DataSelector;
  28. UCHAR RegisterArea[SIZE_OF_80387_REGISTERS];
  29. } FLOATING_SAVE_AREA;
  30. typedef FLOATING_SAVE_AREA *PFLOATING_SAVE_AREA;
  31. // x86 Context Frame (copied from nti386.h)
  32. //
  33. // The layout of the record conforms to a standard call frame.
  34. //
  35. typedef struct _X86CONTEXT {
  36. //
  37. // The flags values within this flag control the contents of
  38. // a CONTEXT record.
  39. //
  40. // If the context record is used as an input parameter, then
  41. // for each portion of the context record controlled by a flag
  42. // whose value is set, it is assumed that that portion of the
  43. // context record contains valid context. If the context record
  44. // is being used to modify a threads context, then only that
  45. // portion of the threads context will be modified.
  46. //
  47. // If the context record is used as an IN OUT parameter to capture
  48. // the context of a thread, then only those portions of the thread's
  49. // context corresponding to set flags will be returned.
  50. //
  51. // The context record is never used as an OUT only parameter.
  52. //
  53. ULONG ContextFlags;
  54. //
  55. // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
  56. // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
  57. // included in CONTEXT_FULL.
  58. //
  59. ULONG Dr0;
  60. ULONG Dr1;
  61. ULONG Dr2;
  62. ULONG Dr3;
  63. ULONG Dr6;
  64. ULONG Dr7;
  65. //
  66. // This section is specified/returned if the
  67. // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
  68. //
  69. FLOATING_SAVE_AREA FloatSave;
  70. //
  71. // This section is specified/returned if the
  72. // ContextFlags word contians the flag CONTEXT_SEGMENTS.
  73. //
  74. ULONG SegGs;
  75. ULONG SegFs;
  76. ULONG SegEs;
  77. ULONG SegDs;
  78. //
  79. // This section is specified/returned if the
  80. // ContextFlags word contians the flag CONTEXT_INTEGER.
  81. //
  82. ULONG Edi;
  83. ULONG Esi;
  84. ULONG Ebx;
  85. ULONG Edx;
  86. ULONG Ecx;
  87. ULONG Eax;
  88. //
  89. // This section is specified/returned if the
  90. // ContextFlags word contians the flag CONTEXT_CONTROL.
  91. //
  92. ULONG Ebp;
  93. ULONG Eip;
  94. ULONG SegCs; // MUST BE SANITIZED
  95. ULONG EFlags; // MUST BE SANITIZED
  96. ULONG Esp;
  97. ULONG SegSs;
  98. } X86CONTEXT, *PX86CONTEXT;