Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2783 | clevermous | 1 | ;****************************************************************************** |
2 | ; |
||
3 | ; (C) Copyright MICROSOFT Corp., 1988-1990 |
||
4 | ; |
||
5 | ; Title: V86MMGR.Inc - Public services for V86MMGR |
||
6 | ; |
||
7 | ; Version: 2.00 |
||
8 | ; |
||
9 | ; Date: 29-Nov-88 |
||
10 | ; |
||
11 | ; Author: ARR |
||
12 | ; |
||
13 | ;------------------------------------------------------------------------------ |
||
14 | ; |
||
15 | ; Change log: |
||
16 | ; |
||
17 | ; DATE REV DESCRIPTION |
||
18 | ; ----------- --- ----------------------------------------------------------- |
||
19 | ; 29-Nov-1988 ARR Original |
||
20 | ; 26-Apr-1989 RAL New mapper services |
||
21 | ; |
||
22 | ;============================================================================== |
||
23 | |||
24 | Begin_Service_Table V86MMGR |
||
25 | |||
26 | V86MMGR_Service V86MMGR_Get_Version, LOCAL |
||
27 | V86MMGR_Service V86MMGR_Allocate_V86_Pages, LOCAL |
||
28 | V86MMGR_Service V86MMGR_Set_EMS_XMS_Limits, LOCAL |
||
29 | V86MMGR_Service V86MMGR_Get_EMS_XMS_Limits, LOCAL |
||
30 | ; |
||
31 | ; Services used for API mapping. |
||
32 | ; |
||
33 | V86MMGR_Service V86MMGR_Set_Mapping_Info, VxD_ICODE |
||
34 | V86MMGR_Service V86MMGR_Get_Mapping_Info |
||
35 | V86MMGR_Service V86MMGR_Xlat_API |
||
36 | V86MMGR_Service V86MMGR_Load_Client_Ptr |
||
37 | V86MMGR_Service V86MMGR_Allocate_Buffer |
||
38 | V86MMGR_Service V86MMGR_Free_Buffer |
||
39 | V86MMGR_Service V86MMGR_Get_Xlat_Buff_State |
||
40 | V86MMGR_Service V86MMGR_Set_Xlat_Buff_State |
||
41 | V86MMGR_Service V86MMGR_Get_VM_Flat_Sel |
||
42 | V86MMGR_Service V86MMGR_Map_Pages |
||
43 | V86MMGR_Service V86MMGR_Free_Page_Map_Region |
||
44 | ;*********************************************************** |
||
45 | ; END OF 3.00 level services |
||
46 | ; |
||
47 | V86MMGR_Service V86MMGR_LocalGlobalReg |
||
48 | V86MMGR_Service V86MMGR_GetPgStatus, LOCAL |
||
49 | V86MMGR_Service V86MMGR_SetLocalA20, VxD_ICODE |
||
50 | V86MMGR_Service V86MMGR_ResetBasePages, LOCAL |
||
51 | V86MMGR_Service V86MMGR_SetAvailMapPgs, VxD_ICODE |
||
52 | V86MMGR_Service V86MMGR_NoUMBInitCalls, VxD_ICODE |
||
53 | |||
54 | IFNDEF WIN31COMPAT |
||
55 | |||
56 | ; Services added post Win 3.1 |
||
57 | V86MMGR_Service V86MMGR_Get_EMS_XMS_Avail, LOCAL |
||
58 | V86MMGR_Service V86MMGR_Toggle_HMA |
||
59 | V86MMGR_Service V86MMGR_Dev_Init, LOCAL |
||
60 | V86MMGR_Service V86MMGR_Alloc_UM_Page, LOCAL |
||
61 | |||
62 | ENDIF ; WIN31COMPAT |
||
63 | |||
64 | ifdef NEC_98 |
||
65 | ;;V86MMGR_Service V86MMGR_EMM_B0Bank_CHK |
||
66 | V86MMGR_Service V86MMGR_Check_NHSupport, LOCAL |
||
67 | endif |
||
68 | |||
69 | End_Service_Table V86MMGR |
||
70 | |||
71 | ; |
||
72 | ; BITS of returned EAX flags for V86MMGR_GetPgStatus |
||
73 | ; |
||
74 | V86PS_ROM equ 0000000000000001b ; Page contains global ROM |
||
75 | V86PS_RAM equ 0000000000000010b ; Page contains global RAM |
||
76 | V86PS_EMM equ 0000000010000000b ; Page belongs to EMM driver |
||
77 | V86PS_XMS equ 0000000100000000b ; Page belongs to XMS driver |
||
78 | V86PS_MAP equ 0000001000000000b ; Page belongs to mapper |
||
79 | V86PS_UMB equ 0001000000000000b ; Page contains imported UMB |
||
80 | ; (Note that V86PS_XMS is not |
||
81 | ; necessarily set) |
||
82 | |||
83 | ; |
||
84 | ; BITS of ECX flags for V86MMGR_Allocate_V86_Pages |
||
85 | ; |
||
86 | AV86PLocked EQU 00000000000000000000000000000001B |
||
87 | AV86PLockedBit EQU 0 ; VM memory is to be |
||
88 | ; ALWAYS LOCKED regardless of |
||
89 | ; pager type or whether VM |
||
90 | ; is suspended. |
||
91 | ; |
||
92 | ; BITS of ECX flags for V86MMGR_Set_EMS_XMS_Limits |
||
93 | ; |
||
94 | ; NOTE: If neither Limit_DisableHMA or Limit_EnableHMA is set, the HMA |
||
95 | ; state is not altered. |
||
96 | ; |
||
97 | EMS_XMS_Limit_DisableHMA EQU 00000000000000000000000000000001B |
||
98 | EMS_XMS_Limit_DisableHMABit EQU 0 |
||
99 | EMS_XMS_Limit_EnableHMA EQU 00000000000000000000000000000010B |
||
100 | EMS_XMS_Limit_EnableHMABit EQU 1 |
||
101 | EMS_XMS_Limit_XMS_Is_Locked EQU 00000000000000000000000000000100B |
||
102 | EMS_XMS_Limit_XMS_Is_LockedBit EQU 2 |
||
103 | EMS_XMS_Limit_EMS_Is_Locked EQU 00000000000000000000000000001000B |
||
104 | EMS_XMS_Limit_EMS_Is_LockedBit EQU 3 |
||
105 | |||
106 | |||
107 | |||
108 | ; |
||
109 | ; API mapper equates and macros |
||
110 | ; |
||
111 | |||
112 | Xlat_Exec_Int EQU 000h |
||
113 | Xlat_Fixed_Len EQU 001h |
||
114 | Xlat_Var_Len EQU 002h |
||
115 | Xlat_Calc_Len EQU 003h |
||
116 | Xlat_ASCIIZ EQU 004h |
||
117 | Xlat_Jmp_To_Proc EQU 005h |
||
118 | Xlat_Return_Ptr EQU 006h |
||
119 | Xlat_Return_Seg EQU 007h |
||
120 | Xlat_ASCIIZ_InOut EQU 008h |
||
121 | |||
122 | |||
123 | Xlat_API_Exec_Int MACRO Int_Number |
||
124 | db Xlat_Exec_Int |
||
125 | db Int_Number |
||
126 | ENDM |
||
127 | |||
128 | Xlat_API_Fixed_Len MACRO Ptr_Seg, Ptr_Off, Length |
||
129 | db Xlat_Fixed_Len |
||
130 | dw Length |
||
131 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
132 | ENDM |
||
133 | |||
134 | Xlat_API_Var_Len MACRO Ptr_Seg, Ptr_Off, Len_Reg |
||
135 | db Xlat_Var_Len |
||
136 | db Client_&Len_Reg |
||
137 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
138 | ENDM |
||
139 | |||
140 | Xlat_API_Calc_Len MACRO Ptr_Seg, Ptr_Off, Calc_Proc_Addr |
||
141 | db Xlat_Calc_Len |
||
142 | dd OFFSET32 Calc_Proc_Addr |
||
143 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
144 | ENDM |
||
145 | |||
146 | Xlat_API_ASCIIZ MACRO Ptr_Seg, Ptr_Off |
||
147 | db Xlat_ASCIIZ |
||
148 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
149 | ENDM |
||
150 | |||
151 | Xlat_API_ASCIIZ_InOut MACRO Ptr_Seg, Ptr_Off |
||
152 | db Xlat_ASCIIZ_InOut |
||
153 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
154 | ENDM |
||
155 | |||
156 | Xlat_API_Jmp_To_Proc MACRO Proc_Name |
||
157 | db Xlat_Jmp_To_Proc |
||
158 | dd OFFSET32 Proc_Name |
||
159 | ENDM |
||
160 | |||
161 | |||
162 | Xlat_API_Return_Ptr MACRO Ptr_Seg, Ptr_Off |
||
163 | db Xlat_Return_Ptr |
||
164 | dw (Client_&Ptr_Seg*100h)+Client_&Ptr_Off |
||
165 | ENDM |
||
166 | |||
167 | Xlat_API_Return_Seg MACRO Ptr_Seg |
||
168 | db Xlat_Return_Seg |
||
169 | db Client_&Ptr_Seg |
||
170 | ENDM |
||
171 | |||
172 | ; |
||
173 | ; The V86MMGR does W386_Device_Broadcast call outs. The 'subfunction' number |
||
174 | ; for these call outs is contained in the CX register. These are the equates |
||
175 | ; for the subfunction numbers. |
||
176 | ; |
||
177 | V86CallOut_LclA20forGlblHMA equ 0 ; Should A20 state be local |
||
178 | ; even if HMA is GLOBAL? |