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.

216 lines
4.8 KiB

  1. title "EISA bus Support Assembley Code"
  2. ;++
  3. ;
  4. ; Copyright (c) 1989 Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; eisaa.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This module implements the assembley code necessary to get configuration
  13. ; information on EISA machines.
  14. ;
  15. ; Author:
  16. ;
  17. ; Shie-Lin Tzong (shielint) 7-June-1991
  18. ;
  19. ; Environment:
  20. ;
  21. ; Real Mode 16-bit code.
  22. ;
  23. ; Revision History:
  24. ;
  25. ;
  26. ;--
  27. .386p
  28. .xlist
  29. include eisa.inc
  30. .list
  31. _DATA SEGMENT PARA USE16 PUBLIC 'DATA'
  32. public _FunctionInformation
  33. _FunctionInformation db 0
  34. db EISA_INFORMATION_BLOCK_LENGTH dup (0)
  35. _DATA ends
  36. _TEXT SEGMENT PARA USE16 PUBLIC 'CODE'
  37. ASSUME CS: _TEXT
  38. ;++
  39. ;
  40. ; VOID
  41. ; BtGetEisaSlotInformation (
  42. ; PBTEISA_SLOT_INFORMATION SlotInformation,
  43. ; UCHAR Slot
  44. ; )
  45. ;
  46. ; Routine Description:
  47. ;
  48. ; This function retrieves the slot information for the specified slot.
  49. ;
  50. ; Arguments:
  51. ;
  52. ; SlotInformation - Supplies a pointer to the structure which will
  53. ; receive the slot information.
  54. ;
  55. ; Slot - Specifies the slot to retrieve the information.
  56. ;
  57. ; Return Value:
  58. ;
  59. ; None.
  60. ;
  61. ;--
  62. BgesSlotInformation equ [bp + 4]
  63. BgesSlot equ [bp + 6]
  64. public _BtGetEisaSlotInformation
  65. _BtGetEisaSlotInformation proc
  66. push bp ; The following INT 15H destroies
  67. mov bp, sp ; ALL the general registers.
  68. push si
  69. push di
  70. push bx
  71. mov cl, BgesSlot
  72. mov ax, GET_EISA_SLOT_INFORMATION
  73. int 15h
  74. push bx ; Save revision level
  75. mov bx, BgesSlotInformation
  76. ;
  77. ; fill values into eisa slot info structure.
  78. ;
  79. mov [bx].SlotReturn, ah
  80. mov [bx].SlotFlags, al
  81. pop ax ; [ax] = revision level
  82. mov [bx].SlotMajorRevision, ah
  83. mov [bx].SlotMinorRevision, al
  84. mov [bx].SlotChecksum, cx
  85. mov [bx].SlotNumberFunctions, dh
  86. mov [bx].SlotFunctionInformation, dl
  87. mov word ptr [bx].SlotCompressedId, di
  88. mov word ptr [bx+2].SlotCompressedId, si
  89. pop bx
  90. pop di
  91. pop si
  92. pop bp
  93. ret
  94. _BtGetEisaSlotInformation endp
  95. ;++
  96. ;
  97. ; UCHAR
  98. ; BtGetEisaFunctionInformation (
  99. ; PBTEISA_FUNCTION_INFORMATION FunctionInformation,
  100. ; UCHAR Slot,
  101. ; UCHAR Function
  102. ; )
  103. ;
  104. ; Routine Description:
  105. ;
  106. ; This function retrieves function information for the specified slot
  107. ; and function.
  108. ;
  109. ; Arguments:
  110. ;
  111. ; FunctionInformation - Supplies a pointer to the structure which will
  112. ; receive the slot information.
  113. ;
  114. ; Slot - Specifies the slot to retrieve the information.
  115. ;
  116. ; Function - Supplies the function number of the desired slot.
  117. ;
  118. ; Return Value:
  119. ;
  120. ; Return code of the EISA function call.
  121. ;
  122. ;--
  123. BgefFunctionInformation equ [bp + 4]
  124. BgefSlot equ [bp + 6]
  125. BgefFunction equ [bp + 8]
  126. public _BtGetEisaFunctionInformation
  127. _BtGetEisaFunctionInformation proc
  128. push bp
  129. mov bp, sp
  130. push si
  131. mov ax, GET_EISA_FUNCTION_INFORMATION
  132. mov cl, BgefSlot ; [cl] = slot, [ch]=function
  133. mov ch, BgefFunction
  134. mov si, BgefFunctionInformation
  135. ; (ds:si)->Function information
  136. int 15h
  137. mov al, ah ; move the return code to AL
  138. pop si
  139. pop bp
  140. ret
  141. _BtGetEisaFunctionInformation endp
  142. ;++
  143. ;
  144. ; BOOLEAN
  145. ; BtIsEisaSystem (
  146. ; VOID
  147. ; )
  148. ;
  149. ; Routine Description:
  150. ;
  151. ; This function determines if the target machines is EISA based machines.
  152. ;
  153. ; Arguments:
  154. ;
  155. ; None.
  156. ;
  157. ; Return Value:
  158. ;
  159. ; TRUE - if this is EISA machine. Otherwise, a value of FALSE is returned.
  160. ;--
  161. public _BtIsEisaSystem
  162. _BtIsEisaSystem proc
  163. push es
  164. push bx
  165. ;
  166. ; Check for an EISA system. If "EISA" is at F000:FFD9h then it
  167. ; is an EISA system.
  168. ;
  169. mov ax,0f000h ; segment
  170. mov es,ax
  171. mov bx,0ffd9h ; offset in the ROM
  172. mov eax, "ASIE"
  173. cmp eax, es:[bx]
  174. jne short bies00 ; if ne, Not EISA system, go bies00
  175. mov ax, 1 ; set return value to TRUE
  176. jmp short bies10
  177. bies00:
  178. mov ax, 0
  179. bies10:
  180. pop bx
  181. pop es
  182. ret
  183. _BtIsEisaSystem endp
  184. _TEXT ends
  185. end