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.

181 lines
5.3 KiB

  1. PAGE ,132
  2. TITLE DXOEM.ASM -- Dos Extender OEM Interface
  3. ; Copyright (c) Microsoft Corporation 1988-1991. All Rights Reserved.
  4. ;***********************************************************************
  5. ;
  6. ; DXOEM.ASM - DOS Extender OEM Interface
  7. ;
  8. ;-----------------------------------------------------------------------
  9. ;
  10. ; This module contains the routines that may need to be modified by OEMs
  11. ; when adding new device/interface support to the Microsoft 286 DOS
  12. ; Extender portion of Windows/286. There are four routines contained
  13. ; in this module:
  14. ;
  15. ; InitializeOEM - called during DOSX initialization
  16. ;
  17. ; SuspendOEM - called when the protected mode app is about
  18. ; to be suspended (currently when running a
  19. ; standard DOS 'old' app from Windows).
  20. ;
  21. ; ResumeOEM - called when the protected mode app is about
  22. ; to be resumed (currently when returning from
  23. ; a standard DOS 'old' app to Windows).
  24. ;
  25. ; TerminateOEM - called during DOSX termination
  26. ;
  27. ; Note: when this module refers to the 'OEM layer,' it is refering to
  28. ; the 286 DOS Extender device drivers, API mappers, etc., not the
  29. ; Windows OEM layer.
  30. ;
  31. ;-----------------------------------------------------------------------
  32. ;
  33. ; 06/28/89 jimmat Original version.
  34. ; 11/29/90 amitc Removed SuspendOEM/ResumeOEM - not required for 3.1
  35. ; 11/29/90 amitc Moved call to 'InitLowHeap' from here to DXNETBIO.ASM
  36. ;
  37. ;***********************************************************************
  38. .286p
  39. ; -------------------------------------------------------
  40. ; INCLUDE FILE DEFINITIONS
  41. ; -------------------------------------------------------
  42. .xlist
  43. .sall
  44. include segdefs.inc
  45. include gendefs.inc
  46. include pmdefs.inc
  47. .list
  48. ; -------------------------------------------------------
  49. ; GENERAL SYMBOL DEFINITIONS
  50. ; -------------------------------------------------------
  51. ; -------------------------------------------------------
  52. ; EXTERNAL SYMBOL DEFINITIONS
  53. ; -------------------------------------------------------
  54. extrn InitNetMapper:NEAR
  55. extrn TermNetMapper:NEAR
  56. ; -------------------------------------------------------
  57. ; DATA SEGMENT DEFINITIONS
  58. ; -------------------------------------------------------
  59. DXDATA segment
  60. extrn NetHeapSize:WORD
  61. DXDATA ends
  62. ; -------------------------------------------------------
  63. ; CODE SEGMENT VARIABLES
  64. ; -------------------------------------------------------
  65. DXCODE segment
  66. DXCODE ends
  67. DXPMCODE segment
  68. DXPMCODE ends
  69. ; -------------------------------------------------------
  70. subttl OEM Initialization Routine
  71. page
  72. ; -------------------------------------------------------
  73. ; OEM INITIALIZATION ROUTINE
  74. ; -------------------------------------------------------
  75. DXPMCODE segment
  76. assume cs:DXPMCODE
  77. ;--------------------------------------------------------
  78. ; InitializeOEM -- This routine is called during DOSX initialization
  79. ; in order to initialize the OEM layer (device drivers, API
  80. ; mappers, etc.). It expectes to be called late enough in the
  81. ; initialization process that other interrupt mapping functions
  82. ; (like Int 21h) are available.
  83. ;
  84. ; This routine is called in protected mode, and can enable/disable
  85. ; interrupts if it so requires.
  86. ;
  87. ; Input: none
  88. ; Output: none
  89. ; Errors: none
  90. ; Uses: ax, all others preserved
  91. assume ds:DGROUP,es:NOTHING,ss:NOTHING
  92. public InitializeOEM
  93. InitializeOEM proc near
  94. ; Initialize the NetBios mapper.
  95. ; ;;bugbug NetHeapSize isn't actually being used, other
  96. ; ;; than possibly to turn off the NETBIOS mapper
  97. mov ax,NetHeapSize ;don't initialize if net heap
  98. or ax,ax ; size set to zero
  99. jz @f
  100. call InitNetMapper ;initialize the NetBIOS mapper--CY set
  101. ; if NetBIOS not installed
  102. @@:
  103. ret
  104. InitializeOEM endp
  105. ; -------------------------------------------------------
  106. DXPMCODE ends
  107. ; -------------------------------------------------------
  108. subttl OEM Termination Routine
  109. page
  110. ; -------------------------------------------------------
  111. ; OEM TERMINATION ROUTINE
  112. ; -------------------------------------------------------
  113. DXCODE segment
  114. assume cs:DXCODE
  115. ; -------------------------------------------------------
  116. ; TerminateOEM -- This routine is called during DOSX termination
  117. ; to disable the OEM layer.
  118. ;
  119. ; Note: This routine must is called in REAL MODE! If some termination
  120. ; code must run in protected mode, the routine must switch to
  121. ; protected mode itself, and switch back to real mode before
  122. ; returning.
  123. ;
  124. ; Input: none
  125. ; Output: none
  126. ; Errors: none
  127. ; Uses: ax,bx,cx,dx,si,di,es
  128. ;
  129. assume ds:DGROUP,es:NOTHING,ss:NOTHING
  130. public TerminateOEM
  131. TerminateOEM proc near
  132. call TermNetMapper ;terminate the NetBIOS mapper
  133. ret
  134. TerminateOEM endp
  135. ; -------------------------------------------------------
  136. DXCODE ends
  137. ;****************************************************************
  138. end