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.

224 lines
4.2 KiB

  1. TITLE MOUSE.ASM
  2. PAGE ,132
  3. ;
  4. ; WOW v1.0
  5. ;
  6. ; Copyright (c) 1991, Microsoft Corporation
  7. ;
  8. ; MOUSE.ASM
  9. ; Thunks in 16-bit space to route Windows API calls to WOW32
  10. ;
  11. ; History:
  12. ; 30-Sept-1992 Chandan Chauhan (ChandanC)
  13. ; Created.
  14. ;
  15. ; Freehand and ??? need mouse driver.
  16. ;
  17. .286p
  18. .xlist
  19. include cmacros.inc
  20. .list
  21. __acrtused = 0
  22. public __acrtused ;satisfy external C ref.
  23. createSeg _TEXT,CODE,WORD,PUBLIC,CODE
  24. createSeg _DATA,DATA,WORD,PUBLIC,DATA,DGROUP
  25. defgrp DGROUP,DATA
  26. sBegin DATA
  27. Reserved db 16 dup (0) ;reserved for Windows //!!!!! what is this
  28. mouse_Identifier db 'mouse'
  29. sEnd DATA
  30. sBegin CODE
  31. assumes CS,CODE
  32. assumes DS,DATA
  33. assumes ES,NOTHING
  34. cProc MOUSE,<PUBLIC,FAR,PASCAL,NODATA,ATOMIC>
  35. cBegin <nogen>
  36. mov ax,1 ;always indicate success
  37. ret
  38. cEnd <nogen>
  39. ;--------------------------Exported-Routine-----------------------------;
  40. ; int Inquire(lp_mouse_info);
  41. ;
  42. ; Information regarding the mouse is returned to the caller.
  43. ;
  44. ; Entry:
  45. ; None
  46. ; Returns:
  47. ; AX = # bytes returned in lp_mouse_info
  48. ; Error Returns:
  49. ; None
  50. ; Registers Preserved:
  51. ; SI,DI,DS,BP
  52. ; Registers Destroyed:
  53. ; AX,BX,CX,DX,ES,FLAGS
  54. ;-----------------------------------------------------------------------;
  55. assumes cs,Code
  56. assumes ds,Data
  57. cProc Inquire,<FAR,PUBLIC,WIN,PASCAL>,<di>
  58. parmD lp_mouse_info
  59. cBegin
  60. xor ax, ax
  61. cEnd
  62. ;--------------------------Exported-Routine-----------------------------;
  63. ; void Enable(lp_event_proc);
  64. ;
  65. ; Enable hardware mouse interrupts, with the passed procedure address
  66. ; being the target of all mouse events.
  67. ;
  68. ; This routine may be called while already enabled. In this case the
  69. ; passed event procedure should be saved, and all other initialization
  70. ; skipped.
  71. ;
  72. ; Entry:
  73. ; None
  74. ; Returns:
  75. ; None
  76. ; Error Returns:
  77. ; None
  78. ; Registers Preserved:
  79. ; SI,DI,DS,BP
  80. ; Registers Destroyed:
  81. ; AX,BX,CX,DX,ES,FLAGS
  82. ;-----------------------------------------------------------------------;
  83. assumes cs,Code
  84. assumes ds,Data
  85. cProc Enable,<FAR,PUBLIC,WIN,PASCAL>,<si,di>
  86. parmD new_event_proc
  87. cBegin
  88. ; The new event procedure is always saved regardless of the
  89. ; mouse already being enabled. This allows the event proc
  90. ; to be changed as needed.
  91. xor ax, ax
  92. cEnd
  93. ;--------------------------Exported-Routine-----------------------------;
  94. ; void Disable();
  95. ;
  96. ; Disable hardware mouse interrupts, restoring the previous mouse
  97. ; interrupt handler and 8259 interrupt enable mask.
  98. ;
  99. ; This routine may be called while already disabled. In this case the
  100. ; disabling should be ignored.
  101. ;
  102. ; Entry:
  103. ; None
  104. ; Returns:
  105. ; None
  106. ; Error Returns:
  107. ; None
  108. ; Registers Preserved:
  109. ; SI,DI,DS,BP
  110. ; Registers Destroyed:
  111. ; AX,BX,CX,DX,ES,FLAGS
  112. ;-----------------------------------------------------------------------;
  113. assumes cs,Code
  114. assumes ds,Data
  115. cProc Disable,<FAR,PUBLIC,WIN,PASCAL>,<si,di>
  116. cBegin
  117. xor ax, ax
  118. cEnd
  119. ;--------------------------Exported-Routine-----------------------------;
  120. ; WORD WEP();
  121. ;
  122. ; Generic WEP.
  123. ;
  124. ; Entry:
  125. ; None
  126. ; Returns:
  127. ; AX = 1
  128. ; Error Returns:
  129. ; None
  130. ; Registers Preserved:
  131. ; all
  132. ; Registers Destroyed:
  133. ; none
  134. ;-----------------------------------------------------------------------;
  135. assumes cs,Code
  136. assumes ds,Data
  137. cProc WEP,<FAR,PUBLIC,WIN,PASCAL>
  138. ; parmW stuff
  139. cBegin nogen
  140. mov ax,1
  141. ret 2
  142. cEnd nogen
  143. ;--------------------------Exported-Routine-----------------------------;
  144. ; int MouseGetIntVect();
  145. ;
  146. ; The interrupt vector used by the mouse is returned to the caller.
  147. ; If no mouse is found, then -1 is returned.
  148. ;
  149. ; Entry:
  150. ; None
  151. ; Returns:
  152. ; AX = interrupt vector
  153. ; AX = -1 if no mouse was found
  154. ; Error Returns:
  155. ; None
  156. ; Registers Preserved:
  157. ; SI,DI,DS,BP
  158. ; Registers Destroyed:
  159. ; AX,BX,CX,DX,ES,FLAGS
  160. ;-----------------------------------------------------------------------;
  161. assumes cs,Code
  162. assumes ds,Data
  163. cProc MouseGetIntVect,<FAR,PUBLIC,WIN,PASCAL>
  164. cBegin
  165. mov al, -1
  166. cEnd
  167. assumes DS,DATA
  168. assumes DS,NOTHING
  169. sEnd CODE
  170. end MOUSE