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.

131 lines
2.8 KiB

  1. ;++
  2. ;
  3. ; Copyright (c) 1989 Microsoft Corporation
  4. ;
  5. ; Module Name:
  6. ;
  7. ; sysstubs.asm
  8. ;
  9. ; Abstract:
  10. ;
  11. ; This module implements the system service dispatch stub procedures.
  12. ;
  13. ; Author:
  14. ;
  15. ; Shie-Lin Tzong (shielint) 6-Feb-1990
  16. ;
  17. ; Environment:
  18. ;
  19. ; User or kernel mode.
  20. ;
  21. ; Revision History:
  22. ;
  23. ;--
  24. include ks386.inc
  25. include callconv.inc
  26. .386
  27. STUBS_BEGIN1 macro t
  28. TITLE t
  29. endm
  30. STUBS_BEGIN2 macro t
  31. endm
  32. STUBS_BEGIN3 macro t
  33. _TEXT SEGMENT DWORD PUBLIC 'CODE'
  34. endm
  35. STUBS_BEGIN4 macro t
  36. endm
  37. STUBS_BEGIN5 macro t
  38. align 4
  39. endm
  40. STUBS_BEGIN6 macro t
  41. endm
  42. STUBS_BEGIN7 macro t
  43. endm
  44. STUBS_BEGIN8 macro t
  45. endm
  46. STUBS_END macro t
  47. _TEXT ENDS
  48. end
  49. endm
  50. SYSSTUBS_ENTRY1 macro ServiceNumber, Name, NumArgs
  51. cPublicProc _Zw&Name,NumArgs
  52. .FPO ( 0, NumArgs, 0, 0, 0, 0 )
  53. IFIDN <Name>, <SetHighWaitLowThread>
  54. int 2Bh
  55. ELSE
  56. IFIDN <Name>, <SetLowWaitHighThread>
  57. int 2Ch
  58. ELSE
  59. mov eax, ServiceNumber ; (eax) = service number
  60. lea edx, [esp]+4 ; (edx) -> arguments
  61. call dword ptr fs:[TeWow32Reserved]
  62. ENDIF
  63. ENDIF
  64. stdRET _Zw&Name
  65. stdENDP _Zw&Name
  66. endm
  67. SYSSTUBS_ENTRY2 macro ServiceNumber, Name, NumArgs
  68. endm
  69. SYSSTUBS_ENTRY3 macro ServiceNumber, Name, NumArgs
  70. endm
  71. SYSSTUBS_ENTRY4 macro ServiceNumber, Name, NumArgs
  72. endm
  73. SYSSTUBS_ENTRY5 macro ServiceNumber, Name, NumArgs
  74. endm
  75. SYSSTUBS_ENTRY6 macro ServiceNumber, Name, NumArgs
  76. endm
  77. SYSSTUBS_ENTRY7 macro ServiceNumber, Name, NumArgs
  78. endm
  79. SYSSTUBS_ENTRY8 macro ServiceNumber, Name, NumArgs
  80. endm
  81. USRSTUBS_ENTRY1 macro ServiceNumber, Name, NumArgs
  82. local c
  83. cPublicProc _Zw&Name, NumArgs
  84. PUBLICP _Nt&Name, NumArgs
  85. LABELP _Nt&Name, NumArgs
  86. .FPO ( 0, NumArgs, 0, 0, 0, 0 )
  87. IFIDN <Name>, <SetHighWaitLowThread>
  88. int 2Bh
  89. ELSE
  90. IFIDN <Name>, <SetLowWaitHighThread>
  91. int 2Ch
  92. ELSE
  93. mov eax, ServiceNumber ; (eax) = service number
  94. lea edx, [esp]+4 ; (edx) -> arguments
  95. call dword ptr [fs:TeWow32Reserved]
  96. ENDIF
  97. ENDIF
  98. stdRET _Zw&Name
  99. stdENDP _Zw&Name
  100. endm
  101. USRSTUBS_ENTRY2 macro ServiceNumber, Name, NumArgs
  102. endm
  103. USRSTUBS_ENTRY3 macro ServiceNumber, Name, NumArgs
  104. endm
  105. USRSTUBS_ENTRY4 macro ServiceNumber, Name, NumArgs
  106. endm
  107. USRSTUBS_ENTRY5 macro ServiceNumber, Name, NumArgs
  108. endm
  109. USRSTUBS_ENTRY6 macro ServiceNumber, Name, NumArgs
  110. endm
  111. USRSTUBS_ENTRY7 macro ServiceNumber, Name, NumArgs
  112. endm
  113. USRSTUBS_ENTRY8 macro ServiceNumber, Name, NumArgs
  114. endm
  115. STUBS_BEGIN1 <"System Service Stub Procedures">
  116. STUBS_BEGIN2 <"System Service Stub Procedures">
  117. STUBS_BEGIN3 <"System Service Stub Procedures">
  118. STUBS_BEGIN4 <"System Service Stub Procedures">
  119. STUBS_BEGIN5 <"System Service Stub Procedures">
  120. STUBS_BEGIN6 <"System Service Stub Procedures">
  121. STUBS_BEGIN7 <"System Service Stub Procedures">
  122. STUBS_BEGIN8 <"System Service Stub Procedures">