Leaked source code of windows server 2003
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.

97 lines
2.2 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_DEVICES 0x5C // Devices internal to host\src
  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 SVC_DEVICES_MSCDEXINIT 0x00
  31. #define SVC_DEVICES_MSCDEX 0x01
  32. #define SVC_DEVICES_LASTSVC 0x02
  33. #define BOP_SIZE 3 // # of bytes in a bop instruction
  34. //
  35. // Bop Macro
  36. //
  37. /* XLATOFF */
  38. #define BOP(BopNumber) _asm db 0xC4, 0xC4, BopNumber
  39. /* XLATON */
  40. /* ASM
  41. BOP macro BopNumber
  42. db 0C4h, 0C4h, BopNumber
  43. endm
  44. IFNDEF WOW_x86
  45. FBOP macro BopNumber,BopMinorNumber,FastBopEntry
  46. BOP BopNumber
  47. ifnb <BopMinorNumber>
  48. db BopMinorNumber
  49. endif
  50. endm
  51. ELSE
  52. FBOP macro BopNumber,BopMinorNumber,FastBopEntry
  53. local fb10,fb20
  54. test word ptr [FastBopEntry + 4],0FFFFh
  55. jz fb10
  56. .386p
  57. push ds
  58. push 40h
  59. pop ds
  60. test ds:[FIXED_NTVDMSTATE_REL40],RM_BIT_MASK
  61. pop ds
  62. jnz short fb10
  63. call fword ptr [FastBopEntry]
  64. db BopNumber ; indicates which bop
  65. ifnb <BopMinorNumber>
  66. db BopMinorNumber
  67. endif
  68. jmp short fb20
  69. .286p
  70. fb10: BOP BopNumber
  71. ifnb <BopMinorNumber>
  72. db BopMinorNumber
  73. endif
  74. fb20:
  75. endm
  76. endif
  77. */