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.

158 lines
3.8 KiB

  1. include isvbop.inc
  2. .286
  3. .model medium,pascal
  4. _DATA segment word public 'DATA'
  5. Old2fHandler dd ?
  6. Old73Handler dd ?
  7. VddHandle dw -1
  8. DllName db "VWIPXSPX.DLL",0
  9. InitFunc db "VwInitialize",0
  10. DispFunc db "VwDispatcher",0
  11. _DATA ends
  12. INIT_TEXT segment byte public 'CODE'
  13. assume cs:INIT_TEXT
  14. GrabInterrupts proc far
  15. pusha
  16. push ds
  17. push es
  18. push _DATA
  19. pop ds
  20. assume ds:_DATA
  21. push ds
  22. pop es
  23. mov si,offset DllName ; ds:si = library name
  24. mov di,offset InitFunc ; es:di = init function name
  25. mov bx,offset DispFunc ; ds:bx = dispatcher function name
  26. RegisterModule ; returns carry if problem
  27. jc @f
  28. mov VddHandle,ax
  29. mov ax,352fh
  30. int 21h
  31. mov word ptr Old2fHandler,bx
  32. mov word ptr Old2fHandler+2,es
  33. ifdef NEC_98
  34. mov ax,3513h
  35. else ; NEC_98
  36. mov ax,3573h
  37. endif ; NEC_98
  38. int 21h
  39. mov word ptr Old73Handler,bx
  40. mov word ptr Old73Handler+2,es
  41. push seg PmIpx2fHandler
  42. pop ds
  43. assume ds:nothing
  44. mov dx,offset PmIpx2fHandler
  45. mov ax,252fh
  46. int 21h
  47. mov dx,offset PmIpx73Handler
  48. ifdef NEC_98
  49. mov ax,2513h
  50. else ; NEC_98
  51. mov ax,2573h
  52. endif ; NEC_98
  53. int 21h
  54. @@: pop es
  55. pop ds
  56. popa
  57. ret
  58. GrabInterrupts endp
  59. INIT_TEXT ends
  60. _TEXT segment byte public 'CODE'
  61. assume cs:_TEXT
  62. public PmIpx2fHandler
  63. PmIpx2fHandler proc
  64. cmp ax,1684h
  65. jne @f
  66. cmp bx,200h
  67. jne @f
  68. push cs
  69. pop es
  70. mov di,offset PmIpxEntryPoint
  71. iret
  72. @@: push bp
  73. mov bp,sp
  74. push ax
  75. push ds
  76. mov ax,_DATA
  77. mov ds,ax
  78. assume ds:_DATA
  79. push word ptr Old2fHandler+2
  80. push word ptr Old2fHandler
  81. mov ds,[bp-4]
  82. mov ax,[bp-2]
  83. mov bp,[bp]
  84. retf 6
  85. PmIpx2fHandler endp
  86. public PmIpx73Handler
  87. PmIpx73Handler proc
  88. push ds
  89. push es
  90. pusha
  91. mov bx,_DATA
  92. mov ds,bx
  93. assume ds:_DATA
  94. mov ax,VddHandle
  95. mov bx,-2
  96. DispatchCall ; get ECB
  97. jc @f
  98. call dword ptr es:[si][4] ; branch to the ESR
  99. mov al,20h
  100. ifdef NEC_98
  101. out 08h,al ; clear slave pic
  102. out 00h,al ; " master "
  103. else ; NEC_98
  104. out 0a0h,al ; clear slave pic
  105. out 20h,al ; " master "
  106. endif ; NEC_98
  107. popa
  108. pop es
  109. pop ds
  110. assume ds:nothing
  111. iret
  112. @@: popa
  113. pop es
  114. push bp
  115. mov bp,sp
  116. push _DATA
  117. pop ds
  118. assume ds:_DATA
  119. push word ptr Old73Handler+2
  120. push word ptr Old73Handler
  121. mov ds,[bp+2]
  122. assume ds:nothing
  123. mov bp,[bp]
  124. retf 4
  125. PmIpx73Handler endp
  126. public PmIpxEntryPoint
  127. PmIpxEntryPoint proc
  128. push bp
  129. push ds
  130. push _DATA
  131. pop ds
  132. assume ds:_DATA
  133. mov bp,ax
  134. mov ax,VddHandle
  135. pop ds
  136. assume ds:nothing
  137. DispatchCall
  138. pop bp
  139. ret
  140. PmIpxEntryPoint endp
  141. _TEXT ends
  142. end