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.

197 lines
5.4 KiB

  1. ;******************************************************************************
  2. ;
  3. ; (C) Copyright MICROSOFT Corp., 1993-1994
  4. ;
  5. ; Title: Virtual Flat Device Exported Services
  6. ;
  7. ; Version: 2.00
  8. ;
  9. ; Date: 8-Nov-1993
  10. ;
  11. ; Author: RAP
  12. ;
  13. ;------------------------------------------------------------------------------
  14. ;
  15. ; Change log:
  16. ;
  17. ; DATE REV DESCRIPTION
  18. ; ----------- --- -----------------------------------------------------------
  19. ; 08-Nov-1993 RAP Original
  20. ;
  21. ;==============================================================================
  22. IFDEF VMM_TRUE
  23. Begin_Service_Table VFLATD
  24. VFLATD_Service VFLATD_Get_Version, LOCAL
  25. VFLATD_Service VFLATD_Unmap_Flat_Selector, LOCAL
  26. End_Service_Table VFLATD
  27. ENDIF
  28. VflatD_Chicago_ID equ 011Fh ; OEM #8 Device #31
  29. VflatD_Windows_ID equ (0440h + 29d) ; MMSYS OEM# device 30
  30. ifdef WIN31
  31. VflatD_Device_ID equ VflatD_Windows_ID
  32. VflatD_Version equ 0160h ; 1.60
  33. else
  34. VflatD_Device_ID equ VflatD_Chicago_ID
  35. VflatD_Version equ 0201h ; 2.01
  36. endif
  37. ;
  38. ; PM API defines
  39. ;
  40. VFlatD_Query equ 0
  41. VFlatD_Get_Sel equ 1
  42. VFlatD_ResetBank equ 2
  43. VFlatD_Create_Virtual_Frame_Buffer equ 3
  44. VFlatD_Create_Physical_Frame_Buffer equ 4
  45. VFlatD_Begin_Linear_Access equ 5
  46. VFlatD_End_Linear_Access equ 6
  47. ;******************************************************************************
  48. ;
  49. ; VFLATD_PM_API_Query
  50. ;
  51. ; DESCRIPTION:
  52. ; Query VFlatD info
  53. ;
  54. ; ENTRY:
  55. ; Client_DX = 0
  56. ;
  57. ; EXIT:
  58. ; Client_EAX = VFlatD version (HIWORD flags)
  59. ; Client_EBX = GDT selector to the frame buffer
  60. ; Client_ECX = size of frame buffer
  61. ; Client_EDX = linear base of frame buffer. (if linear mode)
  62. ;
  63. ;==============================================================================
  64. ;******************************************************************************
  65. ;
  66. ; VFLATD_PM_API_Create_Virtual_Frame_Buffer
  67. ;
  68. ; DESCRIPTION:
  69. ; Return a GDT selector to the flat video buffer
  70. ;
  71. ; ENTRY:
  72. ; Client_DL = 3
  73. ; Client_DH = flags
  74. ; Client_EAX = size of frame buffer (in bytes) (ie 2MB)
  75. ; Client_EBX = size of a bank (in bytes) (ie 64k)
  76. ; Client_ESI = location of bank (ie A0000)
  77. ; Client_CX = size of bank switch code
  78. ; Client_ES:DI = ptr to bank switch code
  79. ;
  80. ; EXIT:
  81. ; Client_AX = Selector to flat video buffer
  82. ; Client_EDX = Linear base of flat video buffer
  83. ; Client carry flag clear
  84. ;
  85. ;==============================================================================
  86. ;******************************************************************************
  87. ;
  88. ; VFLATD_PM_API_Create_Physical_Frame_Buffer
  89. ;
  90. ; DESCRIPTION:
  91. ; Return a GDT selector to a flat video buffer
  92. ;
  93. ; ENTRY:
  94. ; Client_DL = 4
  95. ; Client_DH = flags
  96. ; Client_EAX = physical base of frame buffer
  97. ; Client_ECX = size of frame buffer (in bytes)
  98. ;
  99. ; EXIT:
  100. ; Client_AX = Selector to flat video buffer
  101. ; Client_EDX = Linear base of flat video buffer
  102. ; Client carry flag clear
  103. ;
  104. ;==============================================================================
  105. ;******************************************************************************
  106. ;
  107. ; VFLATD_PM_API_Get_Video_Base
  108. ;
  109. ; this function has been replaced with VflatD_Create_Virtual_Frame_Buffer
  110. ; it is still supported for old code.
  111. ;
  112. ; DESCRIPTION:
  113. ; Return a GDT selector to the flat video buffer
  114. ;
  115. ; ENTRY:
  116. ; Client_DX = 1
  117. ; Client_AX = # of pages of video memory
  118. ; Client_CX = size of bank switch code
  119. ; Client_ES:DI -> bank switch code
  120. ;
  121. ; EXIT:
  122. ; Client_AX = Selector to flat video buffer
  123. ; Client_EDX = Linear base of flat video buffer
  124. ; Client carry flag clear
  125. ;
  126. ;==============================================================================
  127. ;******************************************************************************
  128. ;
  129. ; VFLATD_PM_API_Reset
  130. ;
  131. ; DESCRIPTION:
  132. ; Called when Video HW has been changed by someone other
  133. ; than VFLATD.
  134. ;
  135. ; ENTRY:
  136. ; Client_DX = 2
  137. ;
  138. ; EXIT:
  139. ; Client carry flag clear
  140. ;
  141. ; USES:
  142. ; EAX, Flags, Client_AX, Client_Flags
  143. ;
  144. ;==============================================================================
  145. ;******************************************************************************
  146. ;
  147. ; VFLATD_PM_API_Begin_Linear_Access
  148. ;
  149. ; DESCRIPTION:
  150. ; Start linear access to the frame buffer
  151. ;
  152. ; the frame buffer can be accessed via its linear address
  153. ; (by default the frame buffer *must* be accessed with
  154. ; the default selector)
  155. ;
  156. ; the frame bufffer will remain in linear access mode, until
  157. ; VFLATD_PM_API_End_Linear_Access is called.
  158. ;
  159. ; this call can be nested.
  160. ;
  161. ; ENTRY:
  162. ; Client_DX = 5
  163. ;
  164. ; EXIT:
  165. ; Client_EAX = access count
  166. ;
  167. ;==============================================================================
  168. ;******************************************************************************
  169. ;
  170. ; VFLATD_PM_API_End_Linear_Access
  171. ;
  172. ; DESCRIPTION:
  173. ; Stop linear access to the frame buffer
  174. ;
  175. ; this must be called the same number of times as
  176. ; VFLATD_PM_API_Begin_Linear_Access to actualy leave linear mode.
  177. ;
  178. ; ENTRY:
  179. ; Client_DX = 6
  180. ;
  181. ; EXIT:
  182. ; Client_EAX = access count
  183. ;
  184. ;==============================================================================