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.

122 lines
4.3 KiB

  1. ;***************************************************************************
  2. ; *
  3. ; Copyright (C) 1983-1994 by Microsoft Inc. *
  4. ; *
  5. ;***************************************************************************
  6. ; Macros for disabling and restoring hardware interrupt enable flag
  7. ;
  8. ; The LeaveCrit macro has been updated for the mask problem on
  9. ; the 80286 processor.
  10. EnterCrit MACRO
  11. pushf
  12. cli
  13. ENDM
  14. LeaveCrit macro reg ;;this macro will restore the state of
  15. ifnb <reg> ;;the interrupt flag to what is was
  16. pop reg&x ;;before EnterCrit. All other flags
  17. test reg&h, 2 ;;are discarded.
  18. jz @f
  19. sti
  20. @@:
  21. else
  22. push bp
  23. mov bp, sp
  24. test byte ptr [bp+3], 2
  25. jz @f
  26. sti
  27. @@:
  28. pop bp
  29. popf
  30. endif
  31. endm
  32. if 0
  33. POPFF equ <LeaveCrit>
  34. LeaveCrit MACRO
  35. POPFF
  36. ENDM
  37. endif
  38. POPFF MACRO ;;this macro will restore ALL flags,
  39. local a ;;EXCEPT the interrupt flag, to
  40. jmp $+3 ;;their previous state
  41. a label near
  42. iret
  43. push cs
  44. call a
  45. ENDM
  46. ;***************************************************************************
  47. ; *
  48. ; Inquire data structures for Timer, Keyboard, Mouse and Cursor modules *
  49. ; *
  50. ;***************************************************************************
  51. TIMERINFO STRUC
  52. tiResolution DD 0 ; #microseconds each timer tick
  53. TIMERINFO ENDS
  54. KBINFO STRUC
  55. kbRanges DB 4 dup (0) ; Far East ranges for KANJI
  56. kbStateSize DW 0 ; #bytes of state info maintained by TOASCII
  57. KBINFO ENDS
  58. MOUSEINFO STRUC
  59. msExists DB 0 ; true => mouse exists
  60. msRelative DB 0 ; true => relative coordinate
  61. msNumButtons DW 0 ; number of buttons on the mouse
  62. msRate DW 0 ; maximum rate of mouse input events
  63. msXThresh DW 0 ; threshold before acceleration
  64. msYThresh DW 0 ;
  65. msXRes DW 0 ; x resolution
  66. msYRes DW 0 ; y resolution
  67. MOUSEINFO ENDS
  68. CURSORINFO STRUC
  69. dpXRate DW 0 ; horizontal mickey/pixel ratio
  70. dpYRate DW 0 ; vertical mickey/pixel ratio
  71. CURSORINFO ENDS
  72. ;***************************************************************************
  73. ; *
  74. ; Cursor data structure passed to OEM routines. Defines a graphics display*
  75. ; cursor in terms of a hotspot, an AND mask and an XOR mask. The hot *
  76. ; spot defines the pixel within the cursor that is the cursor is "pointing"*
  77. ; to. So when displaying a cursor at location X,Y the pixel that *
  78. ; is the hot spot should be painted at that X,Y coordinate. The "shape" *
  79. ; of the cursor is defined by two pixel masks. The first mask is ANDed *
  80. ; with the bits in the display bitmap and the second mask is XORed with *
  81. ; the result to determine the bits that will be placed in the display *
  82. ; bitmap. The bits for the masks are in the byte array that begins *
  83. ; at the csBits field, with the AND mask bits first, followed by the *
  84. ; XOR mask bits. The csWidthBytes field is the width of ONE mask, in *
  85. ; bytes. Currently, MS-WIN will only generate cursors whose width and *
  86. ; height are both 16. *
  87. ; *
  88. ;***************************************************************************
  89. cursorShape STRUC
  90. csHotX DW 0
  91. csHotY DW 0
  92. csWidth DW 0
  93. csHeight DW 0
  94. csWidthBytes DW 0
  95. csColor DW 0
  96. ; Beginning of an array of bytes that contain the bits for the AND and
  97. ; XOR masks. The first csHeight * csWidthBytes bytes contain the bits
  98. ; for the AND mask and the next csHeight * csWidthBytes bytes contain
  99. ; the bits for the XOR mask.
  100. ;csBits DB 2*2*16 DUP (?)
  101. cursorShape ENDS