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.

116 lines
3.2 KiB

  1. //extern CONTEXT IntelRegisters;
  2. //extern ULONG IntelMSW;
  3. // Flag Register constants
  4. #define FLG_CARRY 0x00000001
  5. #define FLG_CARRY_BIT 0x00000000
  6. #define FLG_PARITY 0x00000004
  7. #define FLG_PARITY_BIT 0x00000003
  8. #define FLG_AUXILIARY 0x00000010
  9. #define FLG_AUXILIARY_BIT 0x00000005
  10. #define FLG_ZERO 0x00000040
  11. #define FLG_ZERO_BIT 0x00000006
  12. #define FLG_SIGN 0x00000080
  13. #define FLG_SIGN_BIT 0x00000007
  14. #define FLG_TRAP 0x00000100
  15. #define FLG_INTERRUPT 0x00000200
  16. #define FLG_INTERRUPT_BIT 0x00000009
  17. #define FLG_DIRECTION 0x00000400
  18. #define FLG_DIRECTION_BIT 0x0000000A
  19. #define FLG_OVERFLOW 0x00000800
  20. #define FLG_OVERFLOW_BIT 0x0000000B
  21. extern ULONG getEAX(VOID);
  22. extern USHORT getAX(VOID);
  23. extern UCHAR getAL(VOID);
  24. extern UCHAR getAH(VOID);
  25. extern ULONG getEBX(VOID);
  26. extern USHORT getBX(VOID);
  27. extern UCHAR getBL(VOID);
  28. extern UCHAR getBH(VOID);
  29. extern ULONG getECX(VOID);
  30. extern USHORT getCX(VOID);
  31. extern UCHAR getCL(VOID);
  32. extern UCHAR getCH(VOID);
  33. extern ULONG getEDX(VOID);
  34. extern USHORT getDX(VOID);
  35. extern UCHAR getDL(VOID);
  36. extern UCHAR getDH(VOID);
  37. extern ULONG getESP(VOID);
  38. extern USHORT getSP(VOID);
  39. extern ULONG getEBP(VOID);
  40. extern USHORT getBP(VOID);
  41. extern ULONG getESI(VOID);
  42. extern USHORT getSI(VOID);
  43. extern ULONG getEDI(VOID);
  44. extern USHORT getDI(VOID);
  45. extern ULONG getEIP(VOID);
  46. extern USHORT getIP(VOID);
  47. extern USHORT getCS(VOID);
  48. extern USHORT getSS(VOID);
  49. extern USHORT getDS(VOID);
  50. extern USHORT getES(VOID);
  51. extern USHORT getFS(VOID);
  52. extern USHORT getGS(VOID);
  53. extern ULONG getCF(VOID);
  54. extern ULONG getPF(VOID);
  55. extern ULONG getAF(VOID);
  56. extern ULONG getZF(VOID);
  57. extern ULONG getSF(VOID);
  58. extern ULONG getTF(VOID);
  59. extern ULONG getIF(VOID);
  60. extern ULONG getDF(VOID);
  61. extern ULONG getOF(VOID);
  62. extern USHORT getMSW(VOID);
  63. extern VOID setEAX(ULONG);
  64. extern VOID setAX(USHORT);
  65. extern VOID setAH(UCHAR);
  66. extern VOID setAL(UCHAR);
  67. extern VOID setEBX(ULONG);
  68. extern VOID setBX(USHORT);
  69. extern VOID setBH(UCHAR);
  70. extern VOID setBL(UCHAR);
  71. extern VOID setECX(ULONG);
  72. extern VOID setCX(USHORT);
  73. extern VOID setCH(UCHAR);
  74. extern VOID setCL(UCHAR);
  75. extern VOID setEDX(ULONG);
  76. extern VOID setDX(USHORT);
  77. extern VOID setDH(UCHAR);
  78. extern VOID setDL(UCHAR);
  79. extern VOID setESP(ULONG);
  80. extern VOID setSP(USHORT);
  81. extern VOID setEBP(ULONG);
  82. extern VOID setBP(USHORT);
  83. extern VOID setESI(ULONG);
  84. extern VOID setSI(USHORT);
  85. extern VOID setEDI(ULONG);
  86. extern VOID setDI(USHORT);
  87. extern VOID setEIP(ULONG);
  88. extern VOID setIP(USHORT);
  89. extern VOID setCS(USHORT);
  90. extern VOID setSS(USHORT);
  91. extern VOID setDS(USHORT);
  92. extern VOID setES(USHORT);
  93. extern VOID setFS(USHORT);
  94. extern VOID setGS(USHORT);
  95. extern VOID setCF(ULONG);
  96. extern VOID setPF(ULONG);
  97. extern VOID setAF(ULONG);
  98. extern VOID setZF(ULONG);
  99. extern VOID setSF(ULONG);
  100. extern VOID setIF(ULONG);
  101. extern VOID setDF(ULONG);
  102. extern VOID setOF(ULONG);
  103. extern VOID setMSW(USHORT);
  104. extern ULONG getPE(VOID);
  105. // from v86\monitor\i386
  106. VOID cpu_simulate(VOID);
  107. VOID cpu_interrupt(int Type, int Number);
  108. VOID cpu_init(VOID);
  109. VOID cpu_terminate(VOID);
  110. VOID host_unsimulate(VOID);
  111. VOID host_simulate(VOID);
  112. VOID cpu_exitthread(VOID);