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.

93 lines
2.0 KiB

  1. /*++ BUILD Version: 0001
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. BOP.H
  5. Abstract:
  6. This module contains macro support for use of Bops in C code.
  7. Author:
  8. Dave Hastings (daveh) 25-Apr-1991
  9. Revision History:
  10. --*/
  11. //
  12. // Assigned Bop Numbers
  13. //
  14. #define BOP_DOS 0x50
  15. #define BOP_WOW 0x51
  16. #define BOP_XMS 0x52
  17. #define BOP_DPMI 0x53
  18. #define BOP_CMD 0x54
  19. #define BOP_DEBUGGER 0x56
  20. #define BOP_REDIR 0x57 // used to be 55, now goes to MS_bop_7()
  21. #define BOP_NOSUPPORT 0x59 // host warning dialog box
  22. #define BOP_WAITIFIDLE 0x5A // idle bop
  23. #define BOP_DBGBREAKPOINT 0x5B // does a 32 bit DbgBreakPoint
  24. #define BOP_KBD 0x5C // BUGBUG temporary
  25. #define BOP_VIDEO 0x5D // BUGBUG temporary
  26. #define BOP_NOTIFICATION 0x5E // 16bits to 32 bits notification
  27. #define BOP_UNIMPINT 0x5F // BUGBUG temporary
  28. #define BOP_SWITCHTOREALMODE 0xFD
  29. #define BOP_UNSIMULATE 0xFE // end execution of code in a vdm
  30. #define BOP_SIZE 3 // # of bytes in a bop instruction
  31. //
  32. // Bop Macro
  33. //
  34. /* XLATOFF */
  35. #define BOP(BopNumber) _asm db 0xC4, 0xC4, BopNumber
  36. /* XLATON */
  37. /* ASM
  38. BOP macro BopNumber
  39. db 0C4h, 0C4h, BopNumber
  40. endm
  41. IFNDEF WOW_x86
  42. FBOP macro BopNumber,BopMinorNumber,FastBopEntry
  43. BOP BopNumber
  44. ifnb <BopMinorNumber>
  45. db BopMinorNumber
  46. endif
  47. endm
  48. ELSE
  49. FBOP macro BopNumber,BopMinorNumber,FastBopEntry
  50. local fb10,fb20
  51. test word ptr [FastBopEntry + 4],0FFFFh
  52. jz fb10
  53. .386p
  54. push ds
  55. push 40h
  56. pop ds
  57. test ds:[FIXED_NTVDMSTATE_REL40],RM_BIT_MASK
  58. pop ds
  59. jnz short fb10
  60. call fword ptr [FastBopEntry]
  61. db BopNumber ; indicates which bop
  62. ifnb <BopMinorNumber>
  63. db BopMinorNumber
  64. endif
  65. jmp short fb20
  66. .286p
  67. fb10: BOP BopNumber
  68. ifnb <BopMinorNumber>
  69. db BopMinorNumber
  70. endif
  71. fb20:
  72. endm
  73. endif
  74. */