Relay code for Win16 register functions converts arguments.

New 'interrupt' keyword added (for Win16 interrupt handlers).
Adapted .spec files and implementations of register routines.
This commit is contained in:
Ulrich Weigand 1999-07-25 11:27:36 +00:00 committed by Alexandre Julliard
parent 815615025e
commit b5151d003d
6 changed files with 326 additions and 292 deletions

View File

@ -55,8 +55,8 @@ file krnl386.exe
52 pascal16 FreeProcInstance(segptr) FreeProcInstance16 52 pascal16 FreeProcInstance(segptr) FreeProcInstance16
53 stub CallProcInstance 53 stub CallProcInstance
54 pascal16 GetInstanceData(word word word) GetInstanceData16 54 pascal16 GetInstanceData(word word word) GetInstanceData16
55 register Catch(segptr) Catch16 55 register Catch(ptr) Catch16
56 register Throw(segptr word) Throw16 56 register Throw(ptr word) Throw16
57 pascal16 GetProfileInt(str str s_word) GetProfileInt16 57 pascal16 GetProfileInt(str str s_word) GetProfileInt16
58 pascal16 GetProfileString(str str str ptr word) GetProfileString16 58 pascal16 GetProfileString(str str str ptr word) GetProfileString16
59 pascal16 WriteProfileString(str str str) WriteProfileString16 59 pascal16 WriteProfileString(str str str) WriteProfileString16

View File

@ -85,7 +85,8 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
usecdecl = ( *args == 'c' ); usecdecl = ( *args == 'c' );
args += 2; args += 2;
reg_func = ( memcmp( args, "regs_", 5 ) == 0 ); reg_func = ( memcmp( args, "regs_", 5 ) == 0
|| memcmp( args, "intr_", 5 ) == 0 );
args += 5; args += 5;
if (usecdecl) if (usecdecl)
@ -219,7 +220,8 @@ void RELAY_DebugCallFrom16Ret( CONTEXT86 *context, int ret_val )
DPRINTF( "retval=0x%04x ret=%04x:%04x ds=%04x\n", DPRINTF( "retval=0x%04x ret=%04x:%04x ds=%04x\n",
ret_val & 0xffff, frame->cs, frame->ip, frame->ds ); ret_val & 0xffff, frame->cs, frame->ip, frame->ds );
} }
else if ( memcmp( args+2, "regs_", 5 ) == 0 ) else if ( memcmp( args+2, "regs_", 5 ) == 0
|| memcmp( args+2, "intr_", 5 ) == 0 )
{ {
DPRINTF("retval=none ret=%04x:%04x ds=%04x\n", DPRINTF("retval=none ret=%04x:%04x ds=%04x\n",
(WORD)CS_reg(context), IP_reg(context), (WORD)DS_reg(context)); (WORD)CS_reg(context), IP_reg(context), (WORD)DS_reg(context));
@ -324,17 +326,8 @@ void RELAY_DebugCallTo16Ret( int ret_val )
* Real prototype is: * Real prototype is:
* INT16 WINAPI Catch( LPCATCHBUF lpbuf ); * INT16 WINAPI Catch( LPCATCHBUF lpbuf );
*/ */
void WINAPI Catch16( CONTEXT86 *context ) void WINAPI Catch16( LPCATCHBUF lpbuf, CONTEXT86 *context )
{ {
VA_LIST16 valist;
SEGPTR buf;
LPCATCHBUF lpbuf;
VA_START16( valist );
buf = VA_ARG16( valist, SEGPTR );
lpbuf = (LPCATCHBUF)PTR_SEG_TO_LIN( buf );
VA_END16( valist );
/* Note: we don't save the current ss, as the catch buffer is */ /* Note: we don't save the current ss, as the catch buffer is */
/* only 9 words long. Hopefully no one will have the silly */ /* only 9 words long. Hopefully no one will have the silly */
/* idea to change the current stack before calling Throw()... */ /* idea to change the current stack before calling Throw()... */
@ -371,20 +364,13 @@ void WINAPI Catch16( CONTEXT86 *context )
* Real prototype is: * Real prototype is:
* INT16 WINAPI Throw( LPCATCHBUF lpbuf, INT16 retval ); * INT16 WINAPI Throw( LPCATCHBUF lpbuf, INT16 retval );
*/ */
void WINAPI Throw16( CONTEXT86 *context ) void WINAPI Throw16( LPCATCHBUF lpbuf, INT16 retval, CONTEXT86 *context )
{ {
VA_LIST16 valist;
SEGPTR buf;
LPCATCHBUF lpbuf;
STACK16FRAME *pFrame; STACK16FRAME *pFrame;
STACK32FRAME *frame32; STACK32FRAME *frame32;
TEB *teb = NtCurrentTeb(); TEB *teb = NtCurrentTeb();
VA_START16( valist ); AX_reg(context) = retval;
AX_reg(context) = VA_ARG16( valist, WORD ); /* retval */
buf = VA_ARG16( valist, SEGPTR );
lpbuf = (LPCATCHBUF)PTR_SEG_TO_LIN( buf );
VA_END16( valist );
/* Find the frame32 corresponding to the frame16 we are jumping to */ /* Find the frame32 corresponding to the frame16 we are jumping to */
pFrame = THREAD_STACK16(teb); pFrame = THREAD_STACK16(teb);

View File

@ -6,264 +6,264 @@ type win16
28 pascal MyAlloc(word word word) NE_AllocateSegment 28 pascal MyAlloc(word word word) NE_AllocateSegment
# Interrupt vectors 0-255 are ordinals 100-355 # Interrupt vectors 0-255 are ordinals 100-355
# The 'word' parameter are the flags pushed on the stack by the interrupt # The 'interrupt' keyword takes care of the flags pushed on the stack by the interrupt
100 register INT_Int00Handler(word) BUILTIN_DefaultIntHandler 100 interrupt INT_Int00Handler() BUILTIN_DefaultIntHandler
101 register INT_Int01Handler(word) BUILTIN_DefaultIntHandler 101 interrupt INT_Int01Handler() BUILTIN_DefaultIntHandler
102 register INT_Int02Handler(word) BUILTIN_DefaultIntHandler 102 interrupt INT_Int02Handler() BUILTIN_DefaultIntHandler
103 register INT_Int03Handler(word) BUILTIN_DefaultIntHandler 103 interrupt INT_Int03Handler() BUILTIN_DefaultIntHandler
104 register INT_Int04Handler(word) BUILTIN_DefaultIntHandler 104 interrupt INT_Int04Handler() BUILTIN_DefaultIntHandler
105 register INT_Int05Handler(word) BUILTIN_DefaultIntHandler 105 interrupt INT_Int05Handler() BUILTIN_DefaultIntHandler
106 register INT_Int06Handler(word) BUILTIN_DefaultIntHandler 106 interrupt INT_Int06Handler() BUILTIN_DefaultIntHandler
107 register INT_Int07Handler(word) BUILTIN_DefaultIntHandler 107 interrupt INT_Int07Handler() BUILTIN_DefaultIntHandler
108 register INT_Int08Handler(word) BUILTIN_DefaultIntHandler 108 interrupt INT_Int08Handler() BUILTIN_DefaultIntHandler
109 register INT_Int09Handler(word) BUILTIN_DefaultIntHandler 109 interrupt INT_Int09Handler() BUILTIN_DefaultIntHandler
110 register INT_Int0aHandler(word) BUILTIN_DefaultIntHandler 110 interrupt INT_Int0aHandler() BUILTIN_DefaultIntHandler
111 register INT_Int0bHandler(word) BUILTIN_DefaultIntHandler 111 interrupt INT_Int0bHandler() BUILTIN_DefaultIntHandler
112 register INT_Int0cHandler(word) BUILTIN_DefaultIntHandler 112 interrupt INT_Int0cHandler() BUILTIN_DefaultIntHandler
113 register INT_Int0dHandler(word) BUILTIN_DefaultIntHandler 113 interrupt INT_Int0dHandler() BUILTIN_DefaultIntHandler
114 register INT_Int0eHandler(word) BUILTIN_DefaultIntHandler 114 interrupt INT_Int0eHandler() BUILTIN_DefaultIntHandler
115 register INT_Int0fHandler(word) BUILTIN_DefaultIntHandler 115 interrupt INT_Int0fHandler() BUILTIN_DefaultIntHandler
116 register INT_Int10Handler(word) INT_Int10Handler 116 interrupt INT_Int10Handler() INT_Int10Handler
117 register INT_Int11Handler(word) INT_Int11Handler 117 interrupt INT_Int11Handler() INT_Int11Handler
118 register INT_Int12Handler(word) INT_Int12Handler 118 interrupt INT_Int12Handler() INT_Int12Handler
119 register INT_Int13Handler(word) INT_Int13Handler 119 interrupt INT_Int13Handler() INT_Int13Handler
120 register INT_Int14Handler(word) BUILTIN_DefaultIntHandler 120 interrupt INT_Int14Handler() BUILTIN_DefaultIntHandler
121 register INT_Int15Handler(word) INT_Int15Handler 121 interrupt INT_Int15Handler() INT_Int15Handler
122 register INT_Int16Handler(word) BUILTIN_DefaultIntHandler 122 interrupt INT_Int16Handler() BUILTIN_DefaultIntHandler
123 register INT_Int17Handler(word) BUILTIN_DefaultIntHandler 123 interrupt INT_Int17Handler() BUILTIN_DefaultIntHandler
124 register INT_Int18Handler(word) BUILTIN_DefaultIntHandler 124 interrupt INT_Int18Handler() BUILTIN_DefaultIntHandler
125 register INT_Int19Handler(word) BUILTIN_DefaultIntHandler 125 interrupt INT_Int19Handler() BUILTIN_DefaultIntHandler
126 register INT_Int1aHandler(word) INT_Int1aHandler 126 interrupt INT_Int1aHandler() INT_Int1aHandler
127 register INT_Int1bHandler(word) BUILTIN_DefaultIntHandler 127 interrupt INT_Int1bHandler() BUILTIN_DefaultIntHandler
128 register INT_Int1cHandler(word) BUILTIN_DefaultIntHandler 128 interrupt INT_Int1cHandler() BUILTIN_DefaultIntHandler
129 register INT_Int1dHandler(word) BUILTIN_DefaultIntHandler 129 interrupt INT_Int1dHandler() BUILTIN_DefaultIntHandler
130 register INT_Int1eHandler(word) BUILTIN_DefaultIntHandler 130 interrupt INT_Int1eHandler() BUILTIN_DefaultIntHandler
131 register INT_Int1fHandler(word) BUILTIN_DefaultIntHandler 131 interrupt INT_Int1fHandler() BUILTIN_DefaultIntHandler
132 register INT_Int20Handler(word) INT_Int20Handler 132 interrupt INT_Int20Handler() INT_Int20Handler
133 register INT_Int21Handler(word) DOS3Call 133 interrupt INT_Int21Handler() DOS3Call
134 register INT_Int22Handler(word) BUILTIN_DefaultIntHandler 134 interrupt INT_Int22Handler() BUILTIN_DefaultIntHandler
135 register INT_Int23Handler(word) BUILTIN_DefaultIntHandler 135 interrupt INT_Int23Handler() BUILTIN_DefaultIntHandler
136 register INT_Int24Handler(word) BUILTIN_DefaultIntHandler 136 interrupt INT_Int24Handler() BUILTIN_DefaultIntHandler
# Note: int 25 and 26 don't pop the flags from the stack # Note: int 25 and 26 don't pop the flags from the stack
137 register INT_Int25Handler() INT_Int25Handler 137 register INT_Int25Handler() INT_Int25Handler
138 register INT_Int26Handler() INT_Int26Handler 138 register INT_Int26Handler() INT_Int26Handler
139 register INT_Int27Handler(word) BUILTIN_DefaultIntHandler 139 interrupt INT_Int27Handler() BUILTIN_DefaultIntHandler
140 register INT_Int28Handler(word) BUILTIN_DefaultIntHandler 140 interrupt INT_Int28Handler() BUILTIN_DefaultIntHandler
141 register INT_Int29Handler(word) BUILTIN_DefaultIntHandler 141 interrupt INT_Int29Handler() BUILTIN_DefaultIntHandler
142 register INT_Int2aHandler(word) INT_Int2aHandler 142 interrupt INT_Int2aHandler() INT_Int2aHandler
143 register INT_Int2bHandler(word) BUILTIN_DefaultIntHandler 143 interrupt INT_Int2bHandler() BUILTIN_DefaultIntHandler
144 register INT_Int2cHandler(word) BUILTIN_DefaultIntHandler 144 interrupt INT_Int2cHandler() BUILTIN_DefaultIntHandler
145 register INT_Int2dHandler(word) BUILTIN_DefaultIntHandler 145 interrupt INT_Int2dHandler() BUILTIN_DefaultIntHandler
146 register INT_Int2eHandler(word) BUILTIN_DefaultIntHandler 146 interrupt INT_Int2eHandler() BUILTIN_DefaultIntHandler
147 register INT_Int2fHandler(word) INT_Int2fHandler 147 interrupt INT_Int2fHandler() INT_Int2fHandler
148 register INT_Int30Handler(word) BUILTIN_DefaultIntHandler 148 interrupt INT_Int30Handler() BUILTIN_DefaultIntHandler
149 register INT_Int31Handler(word) INT_Int31Handler 149 interrupt INT_Int31Handler() INT_Int31Handler
150 register INT_Int32Handler(word) BUILTIN_DefaultIntHandler 150 interrupt INT_Int32Handler() BUILTIN_DefaultIntHandler
151 register INT_Int33Handler(word) BUILTIN_DefaultIntHandler 151 interrupt INT_Int33Handler() BUILTIN_DefaultIntHandler
152 register INT_Int34Handler(word) BUILTIN_DefaultIntHandler 152 interrupt INT_Int34Handler() BUILTIN_DefaultIntHandler
153 register INT_Int35Handler(word) BUILTIN_DefaultIntHandler 153 interrupt INT_Int35Handler() BUILTIN_DefaultIntHandler
154 register INT_Int36Handler(word) BUILTIN_DefaultIntHandler 154 interrupt INT_Int36Handler() BUILTIN_DefaultIntHandler
155 register INT_Int37Handler(word) BUILTIN_DefaultIntHandler 155 interrupt INT_Int37Handler() BUILTIN_DefaultIntHandler
156 register INT_Int38Handler(word) BUILTIN_DefaultIntHandler 156 interrupt INT_Int38Handler() BUILTIN_DefaultIntHandler
157 register INT_Int39Handler(word) BUILTIN_DefaultIntHandler 157 interrupt INT_Int39Handler() BUILTIN_DefaultIntHandler
158 register INT_Int3aHandler(word) BUILTIN_DefaultIntHandler 158 interrupt INT_Int3aHandler() BUILTIN_DefaultIntHandler
159 register INT_Int3bHandler(word) BUILTIN_DefaultIntHandler 159 interrupt INT_Int3bHandler() BUILTIN_DefaultIntHandler
160 register INT_Int3cHandler(word) BUILTIN_DefaultIntHandler 160 interrupt INT_Int3cHandler() BUILTIN_DefaultIntHandler
161 register INT_Int3dHandler(word) INT_Int3dHandler 161 interrupt INT_Int3dHandler() INT_Int3dHandler
162 register INT_Int3eHandler(word) BUILTIN_DefaultIntHandler 162 interrupt INT_Int3eHandler() BUILTIN_DefaultIntHandler
163 register INT_Int3fHandler(word) BUILTIN_DefaultIntHandler 163 interrupt INT_Int3fHandler() BUILTIN_DefaultIntHandler
164 register INT_Int40Handler(word) BUILTIN_DefaultIntHandler 164 interrupt INT_Int40Handler() BUILTIN_DefaultIntHandler
165 register INT_Int41Handler(word) INT_Int41Handler 165 interrupt INT_Int41Handler() INT_Int41Handler
166 register INT_Int42Handler(word) BUILTIN_DefaultIntHandler 166 interrupt INT_Int42Handler() BUILTIN_DefaultIntHandler
167 register INT_Int43Handler(word) BUILTIN_DefaultIntHandler 167 interrupt INT_Int43Handler() BUILTIN_DefaultIntHandler
168 register INT_Int44Handler(word) BUILTIN_DefaultIntHandler 168 interrupt INT_Int44Handler() BUILTIN_DefaultIntHandler
169 register INT_Int45Handler(word) BUILTIN_DefaultIntHandler 169 interrupt INT_Int45Handler() BUILTIN_DefaultIntHandler
170 register INT_Int46Handler(word) BUILTIN_DefaultIntHandler 170 interrupt INT_Int46Handler() BUILTIN_DefaultIntHandler
171 register INT_Int47Handler(word) BUILTIN_DefaultIntHandler 171 interrupt INT_Int47Handler() BUILTIN_DefaultIntHandler
172 register INT_Int48Handler(word) BUILTIN_DefaultIntHandler 172 interrupt INT_Int48Handler() BUILTIN_DefaultIntHandler
173 register INT_Int49Handler(word) BUILTIN_DefaultIntHandler 173 interrupt INT_Int49Handler() BUILTIN_DefaultIntHandler
174 register INT_Int4aHandler(word) BUILTIN_DefaultIntHandler 174 interrupt INT_Int4aHandler() BUILTIN_DefaultIntHandler
175 register INT_Int4bHandler(word) INT_Int4bHandler 175 interrupt INT_Int4bHandler() INT_Int4bHandler
176 register INT_Int4cHandler(word) BUILTIN_DefaultIntHandler 176 interrupt INT_Int4cHandler() BUILTIN_DefaultIntHandler
177 register INT_Int4dHandler(word) BUILTIN_DefaultIntHandler 177 interrupt INT_Int4dHandler() BUILTIN_DefaultIntHandler
178 register INT_Int4eHandler(word) BUILTIN_DefaultIntHandler 178 interrupt INT_Int4eHandler() BUILTIN_DefaultIntHandler
179 register INT_Int4fHandler(word) BUILTIN_DefaultIntHandler 179 interrupt INT_Int4fHandler() BUILTIN_DefaultIntHandler
180 register INT_Int50Handler(word) BUILTIN_DefaultIntHandler 180 interrupt INT_Int50Handler() BUILTIN_DefaultIntHandler
181 register INT_Int51Handler(word) BUILTIN_DefaultIntHandler 181 interrupt INT_Int51Handler() BUILTIN_DefaultIntHandler
182 register INT_Int52Handler(word) BUILTIN_DefaultIntHandler 182 interrupt INT_Int52Handler() BUILTIN_DefaultIntHandler
183 register INT_Int53Handler(word) BUILTIN_DefaultIntHandler 183 interrupt INT_Int53Handler() BUILTIN_DefaultIntHandler
184 register INT_Int54Handler(word) BUILTIN_DefaultIntHandler 184 interrupt INT_Int54Handler() BUILTIN_DefaultIntHandler
185 register INT_Int55Handler(word) BUILTIN_DefaultIntHandler 185 interrupt INT_Int55Handler() BUILTIN_DefaultIntHandler
186 register INT_Int56Handler(word) BUILTIN_DefaultIntHandler 186 interrupt INT_Int56Handler() BUILTIN_DefaultIntHandler
187 register INT_Int57Handler(word) BUILTIN_DefaultIntHandler 187 interrupt INT_Int57Handler() BUILTIN_DefaultIntHandler
188 register INT_Int58Handler(word) BUILTIN_DefaultIntHandler 188 interrupt INT_Int58Handler() BUILTIN_DefaultIntHandler
189 register INT_Int59Handler(word) BUILTIN_DefaultIntHandler 189 interrupt INT_Int59Handler() BUILTIN_DefaultIntHandler
190 register INT_Int5aHandler(word) BUILTIN_DefaultIntHandler 190 interrupt INT_Int5aHandler() BUILTIN_DefaultIntHandler
191 register INT_Int5bHandler(word) BUILTIN_DefaultIntHandler 191 interrupt INT_Int5bHandler() BUILTIN_DefaultIntHandler
192 register INT_Int5cHandler(word) NetBIOSCall16 192 interrupt INT_Int5cHandler() NetBIOSCall16
193 register INT_Int5dHandler(word) BUILTIN_DefaultIntHandler 193 interrupt INT_Int5dHandler() BUILTIN_DefaultIntHandler
194 register INT_Int5eHandler(word) BUILTIN_DefaultIntHandler 194 interrupt INT_Int5eHandler() BUILTIN_DefaultIntHandler
195 register INT_Int5fHandler(word) BUILTIN_DefaultIntHandler 195 interrupt INT_Int5fHandler() BUILTIN_DefaultIntHandler
196 register INT_Int60Handler(word) BUILTIN_DefaultIntHandler 196 interrupt INT_Int60Handler() BUILTIN_DefaultIntHandler
197 register INT_Int61Handler(word) BUILTIN_DefaultIntHandler 197 interrupt INT_Int61Handler() BUILTIN_DefaultIntHandler
198 register INT_Int62Handler(word) BUILTIN_DefaultIntHandler 198 interrupt INT_Int62Handler() BUILTIN_DefaultIntHandler
199 register INT_Int63Handler(word) BUILTIN_DefaultIntHandler 199 interrupt INT_Int63Handler() BUILTIN_DefaultIntHandler
200 register INT_Int64Handler(word) BUILTIN_DefaultIntHandler 200 interrupt INT_Int64Handler() BUILTIN_DefaultIntHandler
201 register INT_Int65Handler(word) BUILTIN_DefaultIntHandler 201 interrupt INT_Int65Handler() BUILTIN_DefaultIntHandler
202 register INT_Int66Handler(word) BUILTIN_DefaultIntHandler 202 interrupt INT_Int66Handler() BUILTIN_DefaultIntHandler
203 register INT_Int67Handler(word) BUILTIN_DefaultIntHandler 203 interrupt INT_Int67Handler() BUILTIN_DefaultIntHandler
204 register INT_Int68Handler(word) BUILTIN_DefaultIntHandler 204 interrupt INT_Int68Handler() BUILTIN_DefaultIntHandler
205 register INT_Int69Handler(word) BUILTIN_DefaultIntHandler 205 interrupt INT_Int69Handler() BUILTIN_DefaultIntHandler
206 register INT_Int6aHandler(word) BUILTIN_DefaultIntHandler 206 interrupt INT_Int6aHandler() BUILTIN_DefaultIntHandler
207 register INT_Int6bHandler(word) BUILTIN_DefaultIntHandler 207 interrupt INT_Int6bHandler() BUILTIN_DefaultIntHandler
208 register INT_Int6cHandler(word) BUILTIN_DefaultIntHandler 208 interrupt INT_Int6cHandler() BUILTIN_DefaultIntHandler
209 register INT_Int6dHandler(word) BUILTIN_DefaultIntHandler 209 interrupt INT_Int6dHandler() BUILTIN_DefaultIntHandler
210 register INT_Int6eHandler(word) BUILTIN_DefaultIntHandler 210 interrupt INT_Int6eHandler() BUILTIN_DefaultIntHandler
211 register INT_Int6fHandler(word) BUILTIN_DefaultIntHandler 211 interrupt INT_Int6fHandler() BUILTIN_DefaultIntHandler
212 register INT_Int70Handler(word) BUILTIN_DefaultIntHandler 212 interrupt INT_Int70Handler() BUILTIN_DefaultIntHandler
213 register INT_Int71Handler(word) BUILTIN_DefaultIntHandler 213 interrupt INT_Int71Handler() BUILTIN_DefaultIntHandler
214 register INT_Int72Handler(word) BUILTIN_DefaultIntHandler 214 interrupt INT_Int72Handler() BUILTIN_DefaultIntHandler
215 register INT_Int73Handler(word) BUILTIN_DefaultIntHandler 215 interrupt INT_Int73Handler() BUILTIN_DefaultIntHandler
216 register INT_Int74Handler(word) BUILTIN_DefaultIntHandler 216 interrupt INT_Int74Handler() BUILTIN_DefaultIntHandler
217 register INT_Int75Handler(word) BUILTIN_DefaultIntHandler 217 interrupt INT_Int75Handler() BUILTIN_DefaultIntHandler
218 register INT_Int76Handler(word) BUILTIN_DefaultIntHandler 218 interrupt INT_Int76Handler() BUILTIN_DefaultIntHandler
219 register INT_Int77Handler(word) BUILTIN_DefaultIntHandler 219 interrupt INT_Int77Handler() BUILTIN_DefaultIntHandler
220 register INT_Int78Handler(word) BUILTIN_DefaultIntHandler 220 interrupt INT_Int78Handler() BUILTIN_DefaultIntHandler
221 register INT_Int79Handler(word) BUILTIN_DefaultIntHandler 221 interrupt INT_Int79Handler() BUILTIN_DefaultIntHandler
222 register INT_Int7aHandler(word) BUILTIN_DefaultIntHandler 222 interrupt INT_Int7aHandler() BUILTIN_DefaultIntHandler
223 register INT_Int7bHandler(word) BUILTIN_DefaultIntHandler 223 interrupt INT_Int7bHandler() BUILTIN_DefaultIntHandler
224 register INT_Int7cHandler(word) BUILTIN_DefaultIntHandler 224 interrupt INT_Int7cHandler() BUILTIN_DefaultIntHandler
225 register INT_Int7dHandler(word) BUILTIN_DefaultIntHandler 225 interrupt INT_Int7dHandler() BUILTIN_DefaultIntHandler
226 register INT_Int7eHandler(word) BUILTIN_DefaultIntHandler 226 interrupt INT_Int7eHandler() BUILTIN_DefaultIntHandler
227 register INT_Int7fHandler(word) BUILTIN_DefaultIntHandler 227 interrupt INT_Int7fHandler() BUILTIN_DefaultIntHandler
228 register INT_Int80Handler(word) BUILTIN_DefaultIntHandler 228 interrupt INT_Int80Handler() BUILTIN_DefaultIntHandler
229 register INT_Int81Handler(word) BUILTIN_DefaultIntHandler 229 interrupt INT_Int81Handler() BUILTIN_DefaultIntHandler
230 register INT_Int82Handler(word) BUILTIN_DefaultIntHandler 230 interrupt INT_Int82Handler() BUILTIN_DefaultIntHandler
231 register INT_Int83Handler(word) BUILTIN_DefaultIntHandler 231 interrupt INT_Int83Handler() BUILTIN_DefaultIntHandler
232 register INT_Int84Handler(word) BUILTIN_DefaultIntHandler 232 interrupt INT_Int84Handler() BUILTIN_DefaultIntHandler
233 register INT_Int85Handler(word) BUILTIN_DefaultIntHandler 233 interrupt INT_Int85Handler() BUILTIN_DefaultIntHandler
234 register INT_Int86Handler(word) BUILTIN_DefaultIntHandler 234 interrupt INT_Int86Handler() BUILTIN_DefaultIntHandler
235 register INT_Int87Handler(word) BUILTIN_DefaultIntHandler 235 interrupt INT_Int87Handler() BUILTIN_DefaultIntHandler
236 register INT_Int88Handler(word) BUILTIN_DefaultIntHandler 236 interrupt INT_Int88Handler() BUILTIN_DefaultIntHandler
237 register INT_Int89Handler(word) BUILTIN_DefaultIntHandler 237 interrupt INT_Int89Handler() BUILTIN_DefaultIntHandler
238 register INT_Int8aHandler(word) BUILTIN_DefaultIntHandler 238 interrupt INT_Int8aHandler() BUILTIN_DefaultIntHandler
239 register INT_Int8bHandler(word) BUILTIN_DefaultIntHandler 239 interrupt INT_Int8bHandler() BUILTIN_DefaultIntHandler
240 register INT_Int8cHandler(word) BUILTIN_DefaultIntHandler 240 interrupt INT_Int8cHandler() BUILTIN_DefaultIntHandler
241 register INT_Int8dHandler(word) BUILTIN_DefaultIntHandler 241 interrupt INT_Int8dHandler() BUILTIN_DefaultIntHandler
242 register INT_Int8eHandler(word) BUILTIN_DefaultIntHandler 242 interrupt INT_Int8eHandler() BUILTIN_DefaultIntHandler
243 register INT_Int8fHandler(word) BUILTIN_DefaultIntHandler 243 interrupt INT_Int8fHandler() BUILTIN_DefaultIntHandler
244 register INT_Int90Handler(word) BUILTIN_DefaultIntHandler 244 interrupt INT_Int90Handler() BUILTIN_DefaultIntHandler
245 register INT_Int91Handler(word) BUILTIN_DefaultIntHandler 245 interrupt INT_Int91Handler() BUILTIN_DefaultIntHandler
246 register INT_Int92Handler(word) BUILTIN_DefaultIntHandler 246 interrupt INT_Int92Handler() BUILTIN_DefaultIntHandler
247 register INT_Int93Handler(word) BUILTIN_DefaultIntHandler 247 interrupt INT_Int93Handler() BUILTIN_DefaultIntHandler
248 register INT_Int94Handler(word) BUILTIN_DefaultIntHandler 248 interrupt INT_Int94Handler() BUILTIN_DefaultIntHandler
249 register INT_Int95Handler(word) BUILTIN_DefaultIntHandler 249 interrupt INT_Int95Handler() BUILTIN_DefaultIntHandler
250 register INT_Int96Handler(word) BUILTIN_DefaultIntHandler 250 interrupt INT_Int96Handler() BUILTIN_DefaultIntHandler
251 register INT_Int97Handler(word) BUILTIN_DefaultIntHandler 251 interrupt INT_Int97Handler() BUILTIN_DefaultIntHandler
252 register INT_Int98Handler(word) BUILTIN_DefaultIntHandler 252 interrupt INT_Int98Handler() BUILTIN_DefaultIntHandler
253 register INT_Int99Handler(word) BUILTIN_DefaultIntHandler 253 interrupt INT_Int99Handler() BUILTIN_DefaultIntHandler
254 register INT_Int9aHandler(word) BUILTIN_DefaultIntHandler 254 interrupt INT_Int9aHandler() BUILTIN_DefaultIntHandler
255 register INT_Int9bHandler(word) BUILTIN_DefaultIntHandler 255 interrupt INT_Int9bHandler() BUILTIN_DefaultIntHandler
256 register INT_Int9cHandler(word) BUILTIN_DefaultIntHandler 256 interrupt INT_Int9cHandler() BUILTIN_DefaultIntHandler
257 register INT_Int9dHandler(word) BUILTIN_DefaultIntHandler 257 interrupt INT_Int9dHandler() BUILTIN_DefaultIntHandler
258 register INT_Int9eHandler(word) BUILTIN_DefaultIntHandler 258 interrupt INT_Int9eHandler() BUILTIN_DefaultIntHandler
259 register INT_Int9fHandler(word) BUILTIN_DefaultIntHandler 259 interrupt INT_Int9fHandler() BUILTIN_DefaultIntHandler
260 register INT_Inta0Handler(word) BUILTIN_DefaultIntHandler 260 interrupt INT_Inta0Handler() BUILTIN_DefaultIntHandler
261 register INT_Inta1Handler(word) BUILTIN_DefaultIntHandler 261 interrupt INT_Inta1Handler() BUILTIN_DefaultIntHandler
262 register INT_Inta2Handler(word) BUILTIN_DefaultIntHandler 262 interrupt INT_Inta2Handler() BUILTIN_DefaultIntHandler
263 register INT_Inta3Handler(word) BUILTIN_DefaultIntHandler 263 interrupt INT_Inta3Handler() BUILTIN_DefaultIntHandler
264 register INT_Inta4Handler(word) BUILTIN_DefaultIntHandler 264 interrupt INT_Inta4Handler() BUILTIN_DefaultIntHandler
265 register INT_Inta5Handler(word) BUILTIN_DefaultIntHandler 265 interrupt INT_Inta5Handler() BUILTIN_DefaultIntHandler
266 register INT_Inta6Handler(word) BUILTIN_DefaultIntHandler 266 interrupt INT_Inta6Handler() BUILTIN_DefaultIntHandler
267 register INT_Inta7Handler(word) BUILTIN_DefaultIntHandler 267 interrupt INT_Inta7Handler() BUILTIN_DefaultIntHandler
268 register INT_Inta8Handler(word) BUILTIN_DefaultIntHandler 268 interrupt INT_Inta8Handler() BUILTIN_DefaultIntHandler
269 register INT_Inta9Handler(word) BUILTIN_DefaultIntHandler 269 interrupt INT_Inta9Handler() BUILTIN_DefaultIntHandler
270 register INT_IntaaHandler(word) BUILTIN_DefaultIntHandler 270 interrupt INT_IntaaHandler() BUILTIN_DefaultIntHandler
271 register INT_IntabHandler(word) BUILTIN_DefaultIntHandler 271 interrupt INT_IntabHandler() BUILTIN_DefaultIntHandler
272 register INT_IntacHandler(word) BUILTIN_DefaultIntHandler 272 interrupt INT_IntacHandler() BUILTIN_DefaultIntHandler
273 register INT_IntadHandler(word) BUILTIN_DefaultIntHandler 273 interrupt INT_IntadHandler() BUILTIN_DefaultIntHandler
274 register INT_IntaeHandler(word) BUILTIN_DefaultIntHandler 274 interrupt INT_IntaeHandler() BUILTIN_DefaultIntHandler
275 register INT_IntafHandler(word) BUILTIN_DefaultIntHandler 275 interrupt INT_IntafHandler() BUILTIN_DefaultIntHandler
276 register INT_Intb0Handler(word) BUILTIN_DefaultIntHandler 276 interrupt INT_Intb0Handler() BUILTIN_DefaultIntHandler
277 register INT_Intb1Handler(word) BUILTIN_DefaultIntHandler 277 interrupt INT_Intb1Handler() BUILTIN_DefaultIntHandler
278 register INT_Intb2Handler(word) BUILTIN_DefaultIntHandler 278 interrupt INT_Intb2Handler() BUILTIN_DefaultIntHandler
279 register INT_Intb3Handler(word) BUILTIN_DefaultIntHandler 279 interrupt INT_Intb3Handler() BUILTIN_DefaultIntHandler
280 register INT_Intb4Handler(word) BUILTIN_DefaultIntHandler 280 interrupt INT_Intb4Handler() BUILTIN_DefaultIntHandler
281 register INT_Intb5Handler(word) BUILTIN_DefaultIntHandler 281 interrupt INT_Intb5Handler() BUILTIN_DefaultIntHandler
282 register INT_Intb6Handler(word) BUILTIN_DefaultIntHandler 282 interrupt INT_Intb6Handler() BUILTIN_DefaultIntHandler
283 register INT_Intb7Handler(word) BUILTIN_DefaultIntHandler 283 interrupt INT_Intb7Handler() BUILTIN_DefaultIntHandler
284 register INT_Intb8Handler(word) BUILTIN_DefaultIntHandler 284 interrupt INT_Intb8Handler() BUILTIN_DefaultIntHandler
285 register INT_Intb9Handler(word) BUILTIN_DefaultIntHandler 285 interrupt INT_Intb9Handler() BUILTIN_DefaultIntHandler
286 register INT_IntbaHandler(word) BUILTIN_DefaultIntHandler 286 interrupt INT_IntbaHandler() BUILTIN_DefaultIntHandler
287 register INT_IntbbHandler(word) BUILTIN_DefaultIntHandler 287 interrupt INT_IntbbHandler() BUILTIN_DefaultIntHandler
288 register INT_IntbcHandler(word) BUILTIN_DefaultIntHandler 288 interrupt INT_IntbcHandler() BUILTIN_DefaultIntHandler
289 register INT_IntbdHandler(word) BUILTIN_DefaultIntHandler 289 interrupt INT_IntbdHandler() BUILTIN_DefaultIntHandler
290 register INT_IntbeHandler(word) BUILTIN_DefaultIntHandler 290 interrupt INT_IntbeHandler() BUILTIN_DefaultIntHandler
291 register INT_IntbfHandler(word) BUILTIN_DefaultIntHandler 291 interrupt INT_IntbfHandler() BUILTIN_DefaultIntHandler
292 register INT_Intc0Handler(word) BUILTIN_DefaultIntHandler 292 interrupt INT_Intc0Handler() BUILTIN_DefaultIntHandler
293 register INT_Intc1Handler(word) BUILTIN_DefaultIntHandler 293 interrupt INT_Intc1Handler() BUILTIN_DefaultIntHandler
294 register INT_Intc2Handler(word) BUILTIN_DefaultIntHandler 294 interrupt INT_Intc2Handler() BUILTIN_DefaultIntHandler
295 register INT_Intc3Handler(word) BUILTIN_DefaultIntHandler 295 interrupt INT_Intc3Handler() BUILTIN_DefaultIntHandler
296 register INT_Intc4Handler(word) BUILTIN_DefaultIntHandler 296 interrupt INT_Intc4Handler() BUILTIN_DefaultIntHandler
297 register INT_Intc5Handler(word) BUILTIN_DefaultIntHandler 297 interrupt INT_Intc5Handler() BUILTIN_DefaultIntHandler
298 register INT_Intc6Handler(word) BUILTIN_DefaultIntHandler 298 interrupt INT_Intc6Handler() BUILTIN_DefaultIntHandler
299 register INT_Intc7Handler(word) BUILTIN_DefaultIntHandler 299 interrupt INT_Intc7Handler() BUILTIN_DefaultIntHandler
300 register INT_Intc8Handler(word) BUILTIN_DefaultIntHandler 300 interrupt INT_Intc8Handler() BUILTIN_DefaultIntHandler
301 register INT_Intc9Handler(word) BUILTIN_DefaultIntHandler 301 interrupt INT_Intc9Handler() BUILTIN_DefaultIntHandler
302 register INT_IntcaHandler(word) BUILTIN_DefaultIntHandler 302 interrupt INT_IntcaHandler() BUILTIN_DefaultIntHandler
303 register INT_IntcbHandler(word) BUILTIN_DefaultIntHandler 303 interrupt INT_IntcbHandler() BUILTIN_DefaultIntHandler
304 register INT_IntccHandler(word) BUILTIN_DefaultIntHandler 304 interrupt INT_IntccHandler() BUILTIN_DefaultIntHandler
305 register INT_IntcdHandler(word) BUILTIN_DefaultIntHandler 305 interrupt INT_IntcdHandler() BUILTIN_DefaultIntHandler
306 register INT_IntceHandler(word) BUILTIN_DefaultIntHandler 306 interrupt INT_IntceHandler() BUILTIN_DefaultIntHandler
307 register INT_IntcfHandler(word) BUILTIN_DefaultIntHandler 307 interrupt INT_IntcfHandler() BUILTIN_DefaultIntHandler
308 register INT_Intd0Handler(word) BUILTIN_DefaultIntHandler 308 interrupt INT_Intd0Handler() BUILTIN_DefaultIntHandler
309 register INT_Intd1Handler(word) BUILTIN_DefaultIntHandler 309 interrupt INT_Intd1Handler() BUILTIN_DefaultIntHandler
310 register INT_Intd2Handler(word) BUILTIN_DefaultIntHandler 310 interrupt INT_Intd2Handler() BUILTIN_DefaultIntHandler
311 register INT_Intd3Handler(word) BUILTIN_DefaultIntHandler 311 interrupt INT_Intd3Handler() BUILTIN_DefaultIntHandler
312 register INT_Intd4Handler(word) BUILTIN_DefaultIntHandler 312 interrupt INT_Intd4Handler() BUILTIN_DefaultIntHandler
313 register INT_Intd5Handler(word) BUILTIN_DefaultIntHandler 313 interrupt INT_Intd5Handler() BUILTIN_DefaultIntHandler
314 register INT_Intd6Handler(word) BUILTIN_DefaultIntHandler 314 interrupt INT_Intd6Handler() BUILTIN_DefaultIntHandler
315 register INT_Intd7Handler(word) BUILTIN_DefaultIntHandler 315 interrupt INT_Intd7Handler() BUILTIN_DefaultIntHandler
316 register INT_Intd8Handler(word) BUILTIN_DefaultIntHandler 316 interrupt INT_Intd8Handler() BUILTIN_DefaultIntHandler
317 register INT_Intd9Handler(word) BUILTIN_DefaultIntHandler 317 interrupt INT_Intd9Handler() BUILTIN_DefaultIntHandler
318 register INT_IntdaHandler(word) BUILTIN_DefaultIntHandler 318 interrupt INT_IntdaHandler() BUILTIN_DefaultIntHandler
319 register INT_IntdbHandler(word) BUILTIN_DefaultIntHandler 319 interrupt INT_IntdbHandler() BUILTIN_DefaultIntHandler
320 register INT_IntdcHandler(word) BUILTIN_DefaultIntHandler 320 interrupt INT_IntdcHandler() BUILTIN_DefaultIntHandler
321 register INT_IntddHandler(word) BUILTIN_DefaultIntHandler 321 interrupt INT_IntddHandler() BUILTIN_DefaultIntHandler
322 register INT_IntdeHandler(word) BUILTIN_DefaultIntHandler 322 interrupt INT_IntdeHandler() BUILTIN_DefaultIntHandler
323 register INT_IntdfHandler(word) BUILTIN_DefaultIntHandler 323 interrupt INT_IntdfHandler() BUILTIN_DefaultIntHandler
324 register INT_Inte0Handler(word) BUILTIN_DefaultIntHandler 324 interrupt INT_Inte0Handler() BUILTIN_DefaultIntHandler
325 register INT_Inte1Handler(word) BUILTIN_DefaultIntHandler 325 interrupt INT_Inte1Handler() BUILTIN_DefaultIntHandler
326 register INT_Inte2Handler(word) BUILTIN_DefaultIntHandler 326 interrupt INT_Inte2Handler() BUILTIN_DefaultIntHandler
327 register INT_Inte3Handler(word) BUILTIN_DefaultIntHandler 327 interrupt INT_Inte3Handler() BUILTIN_DefaultIntHandler
328 register INT_Inte4Handler(word) BUILTIN_DefaultIntHandler 328 interrupt INT_Inte4Handler() BUILTIN_DefaultIntHandler
329 register INT_Inte5Handler(word) BUILTIN_DefaultIntHandler 329 interrupt INT_Inte5Handler() BUILTIN_DefaultIntHandler
330 register INT_Inte6Handler(word) BUILTIN_DefaultIntHandler 330 interrupt INT_Inte6Handler() BUILTIN_DefaultIntHandler
331 register INT_Inte7Handler(word) BUILTIN_DefaultIntHandler 331 interrupt INT_Inte7Handler() BUILTIN_DefaultIntHandler
332 register INT_Inte8Handler(word) BUILTIN_DefaultIntHandler 332 interrupt INT_Inte8Handler() BUILTIN_DefaultIntHandler
333 register INT_Inte9Handler(word) BUILTIN_DefaultIntHandler 333 interrupt INT_Inte9Handler() BUILTIN_DefaultIntHandler
334 register INT_InteaHandler(word) BUILTIN_DefaultIntHandler 334 interrupt INT_InteaHandler() BUILTIN_DefaultIntHandler
335 register INT_IntebHandler(word) BUILTIN_DefaultIntHandler 335 interrupt INT_IntebHandler() BUILTIN_DefaultIntHandler
336 register INT_IntecHandler(word) BUILTIN_DefaultIntHandler 336 interrupt INT_IntecHandler() BUILTIN_DefaultIntHandler
337 register INT_IntedHandler(word) BUILTIN_DefaultIntHandler 337 interrupt INT_IntedHandler() BUILTIN_DefaultIntHandler
338 register INT_InteeHandler(word) BUILTIN_DefaultIntHandler 338 interrupt INT_InteeHandler() BUILTIN_DefaultIntHandler
339 register INT_IntefHandler(word) BUILTIN_DefaultIntHandler 339 interrupt INT_IntefHandler() BUILTIN_DefaultIntHandler
340 register INT_Intf0Handler(word) BUILTIN_DefaultIntHandler 340 interrupt INT_Intf0Handler() BUILTIN_DefaultIntHandler
341 register INT_Intf1Handler(word) BUILTIN_DefaultIntHandler 341 interrupt INT_Intf1Handler() BUILTIN_DefaultIntHandler
342 register INT_Intf2Handler(word) BUILTIN_DefaultIntHandler 342 interrupt INT_Intf2Handler() BUILTIN_DefaultIntHandler
343 register INT_Intf3Handler(word) BUILTIN_DefaultIntHandler 343 interrupt INT_Intf3Handler() BUILTIN_DefaultIntHandler
344 register INT_Intf4Handler(word) BUILTIN_DefaultIntHandler 344 interrupt INT_Intf4Handler() BUILTIN_DefaultIntHandler
345 register INT_Intf5Handler(word) BUILTIN_DefaultIntHandler 345 interrupt INT_Intf5Handler() BUILTIN_DefaultIntHandler
346 register INT_Intf6Handler(word) BUILTIN_DefaultIntHandler 346 interrupt INT_Intf6Handler() BUILTIN_DefaultIntHandler
347 register INT_Intf7Handler(word) BUILTIN_DefaultIntHandler 347 interrupt INT_Intf7Handler() BUILTIN_DefaultIntHandler
348 register INT_Intf8Handler(word) BUILTIN_DefaultIntHandler 348 interrupt INT_Intf8Handler() BUILTIN_DefaultIntHandler
349 register INT_Intf9Handler(word) BUILTIN_DefaultIntHandler 349 interrupt INT_Intf9Handler() BUILTIN_DefaultIntHandler
350 register INT_IntfaHandler(word) BUILTIN_DefaultIntHandler 350 interrupt INT_IntfaHandler() BUILTIN_DefaultIntHandler
351 register INT_IntfbHandler(word) BUILTIN_DefaultIntHandler 351 interrupt INT_IntfbHandler() BUILTIN_DefaultIntHandler
352 register INT_IntfcHandler(word) BUILTIN_DefaultIntHandler 352 interrupt INT_IntfcHandler() BUILTIN_DefaultIntHandler
353 register INT_IntfdHandler(word) BUILTIN_DefaultIntHandler 353 interrupt INT_IntfdHandler() BUILTIN_DefaultIntHandler
354 register INT_IntfeHandler(word) BUILTIN_DefaultIntHandler 354 interrupt INT_IntfeHandler() BUILTIN_DefaultIntHandler
355 register INT_IntffHandler(word) BUILTIN_DefaultIntHandler 355 interrupt INT_IntffHandler() BUILTIN_DefaultIntHandler
# VxDs. The first Vxd is at 400 # VxDs. The first Vxd is at 400
# #

View File

@ -456,12 +456,9 @@ BOOL16 WINAPI GlobalUnlock16(
* *all* registers, even AX/DX ! * *all* registers, even AX/DX !
* *
*/ */
void WINAPI GlobalChangeLockCount16( CONTEXT86 *context ) void WINAPI GlobalChangeLockCount16( HGLOBAL16 handle, INT16 delta,
CONTEXT86 *context )
{ {
LPWORD args = PTR_SEG_OFF_TO_LIN( SS_reg( context ), SP_reg( context ) );
HGLOBAL16 handle = (HGLOBAL16)args[3];
INT16 delta = (INT16) args[2];
if ( delta == 1 ) if ( delta == 1 )
GlobalLock16( handle ); GlobalLock16( handle );
else if ( delta == -1 ) else if ( delta == -1 )

View File

@ -69,6 +69,7 @@ by the ordinal number corresponding to the function.
- "pascal16" for a Win16 function returning a 16-bit value - "pascal16" for a Win16 function returning a 16-bit value
- "pascal" for a Win16 function returning a 32-bit value - "pascal" for a Win16 function returning a 32-bit value
- "register" for a function using CPU register to pass arguments - "register" for a function using CPU register to pass arguments
- "interrupt" for a Win16 interrupt handler routine
- "stdcall" for a normal Win32 function - "stdcall" for a normal Win32 function
- "cdecl" for a Win32 function using the C calling convention - "cdecl" for a Win32 function using the C calling convention
- "varargs" for a Win32 function taking a variable number of arguments - "varargs" for a Win32 function taking a variable number of arguments

View File

@ -50,6 +50,7 @@ typedef enum
TYPE_PASCAL, /* pascal function with 32-bit return (Win16) */ TYPE_PASCAL, /* pascal function with 32-bit return (Win16) */
TYPE_ABS, /* absolute value (Win16) */ TYPE_ABS, /* absolute value (Win16) */
TYPE_REGISTER, /* register function */ TYPE_REGISTER, /* register function */
TYPE_INTERRUPT, /* interrupt handler function (Win16) */
TYPE_STUB, /* unimplemented stub */ TYPE_STUB, /* unimplemented stub */
TYPE_STDCALL, /* stdcall function (Win32) */ TYPE_STDCALL, /* stdcall function (Win32) */
TYPE_CDECL, /* cdecl function (Win32) */ TYPE_CDECL, /* cdecl function (Win32) */
@ -69,6 +70,7 @@ static const char * const TypeNames[TYPE_NBTYPES] =
"pascal", /* TYPE_PASCAL */ "pascal", /* TYPE_PASCAL */
"equate", /* TYPE_ABS */ "equate", /* TYPE_ABS */
"register", /* TYPE_REGISTER */ "register", /* TYPE_REGISTER */
"interrupt", /* TYPE_INTERRUPT */
"stub", /* TYPE_STUB */ "stub", /* TYPE_STUB */
"stdcall", /* TYPE_STDCALL */ "stdcall", /* TYPE_STDCALL */
"cdecl", /* TYPE_CDECL */ "cdecl", /* TYPE_CDECL */
@ -549,6 +551,42 @@ static int ParseVarargs( ORDDEF *odp )
return 0; return 0;
} }
/*******************************************************************
* ParseInterrupt
*
* Parse an 'interrupt' definition.
*/
static int ParseInterrupt( ORDDEF *odp )
{
char *token;
if (SpecType == SPEC_WIN32)
{
fprintf( stderr, "%s:%d: 'interrupt' not supported for Win32\n",
SpecName, Line );
return -1;
}
token = GetToken();
if (*token != '(')
{
fprintf(stderr, "%s:%d: Expected '(' got '%s'\n",
SpecName, Line, token);
return -1;
}
token = GetToken();
if (*token != ')')
{
fprintf(stderr, "%s:%d: Expected ')' got '%s'\n",
SpecName, Line, token);
return -1;
}
odp->u.func.arg_types[0] = '\0';
strcpy( odp->u.func.link_name, GetToken() );
return 0;
}
/******************************************************************* /*******************************************************************
* ParseExtern * ParseExtern
@ -643,6 +681,8 @@ static int ParseOrdinal(int ordinal)
case TYPE_STDCALL: case TYPE_STDCALL:
case TYPE_CDECL: case TYPE_CDECL:
return ParseExportFunction( odp ); return ParseExportFunction( odp );
case TYPE_INTERRUPT:
return ParseInterrupt( odp );
case TYPE_ABS: case TYPE_ABS:
return ParseEquate( odp ); return ParseEquate( odp );
case TYPE_STUB: case TYPE_STUB:
@ -944,6 +984,7 @@ static int BuildModule16( FILE *outfile, int max_code_offset,
case TYPE_PASCAL: case TYPE_PASCAL:
case TYPE_PASCAL_16: case TYPE_PASCAL_16:
case TYPE_REGISTER: case TYPE_REGISTER:
case TYPE_INTERRUPT:
case TYPE_STUB: case TYPE_STUB:
selector = 1; /* Code selector */ selector = 1; /* Code selector */
break; break;
@ -1238,10 +1279,12 @@ static int Spec16TypeCompare( const void *e1, const void *e2 )
int type1 = (odp1->type == TYPE_CDECL) ? 0 int type1 = (odp1->type == TYPE_CDECL) ? 0
: (odp1->type == TYPE_REGISTER) ? 3 : (odp1->type == TYPE_REGISTER) ? 3
: (odp1->type == TYPE_INTERRUPT) ? 4
: (odp1->type == TYPE_PASCAL_16) ? 1 : 2; : (odp1->type == TYPE_PASCAL_16) ? 1 : 2;
int type2 = (odp2->type == TYPE_CDECL) ? 0 int type2 = (odp2->type == TYPE_CDECL) ? 0
: (odp2->type == TYPE_REGISTER) ? 3 : (odp2->type == TYPE_REGISTER) ? 3
: (odp2->type == TYPE_INTERRUPT) ? 4
: (odp2->type == TYPE_PASCAL_16) ? 1 : 2; : (odp2->type == TYPE_PASCAL_16) ? 1 : 2;
int retval = type1 - type2; int retval = type1 - type2;
@ -1285,6 +1328,7 @@ static int BuildSpec16File( char * specfile, FILE *outfile )
switch (odp->type) switch (odp->type)
{ {
case TYPE_REGISTER: case TYPE_REGISTER:
case TYPE_INTERRUPT:
case TYPE_CDECL: case TYPE_CDECL:
case TYPE_PASCAL: case TYPE_PASCAL:
case TYPE_PASCAL_16: case TYPE_PASCAL_16:
@ -1315,6 +1359,7 @@ static int BuildSpec16File( char * specfile, FILE *outfile )
DLLName, DLLName,
(typelist[i]->type == TYPE_CDECL) ? "c" : "p", (typelist[i]->type == TYPE_CDECL) ? "c" : "p",
(typelist[i]->type == TYPE_REGISTER) ? "regs" : (typelist[i]->type == TYPE_REGISTER) ? "regs" :
(typelist[i]->type == TYPE_INTERRUPT) ? "intr" :
(typelist[i]->type == TYPE_PASCAL_16) ? "word" : "long", (typelist[i]->type == TYPE_PASCAL_16) ? "word" : "long",
typelist[i]->u.func.arg_types ); typelist[i]->u.func.arg_types );
@ -1328,6 +1373,7 @@ static int BuildSpec16File( char * specfile, FILE *outfile )
switch(odp->type) switch(odp->type)
{ {
case TYPE_REGISTER: case TYPE_REGISTER:
case TYPE_INTERRUPT:
case TYPE_CDECL: case TYPE_CDECL:
case TYPE_PASCAL: case TYPE_PASCAL:
case TYPE_PASCAL_16: case TYPE_PASCAL_16:
@ -1372,6 +1418,7 @@ static int BuildSpec16File( char * specfile, FILE *outfile )
break; break;
case TYPE_REGISTER: case TYPE_REGISTER:
case TYPE_INTERRUPT:
case TYPE_CDECL: case TYPE_CDECL:
case TYPE_PASCAL: case TYPE_PASCAL:
case TYPE_PASCAL_16: case TYPE_PASCAL_16:
@ -1382,6 +1429,7 @@ static int BuildSpec16File( char * specfile, FILE *outfile )
DLLName, DLLName,
(odp->type == TYPE_CDECL) ? "c" : "p", (odp->type == TYPE_CDECL) ? "c" : "p",
(odp->type == TYPE_REGISTER) ? "regs" : (odp->type == TYPE_REGISTER) ? "regs" :
(odp->type == TYPE_INTERRUPT) ? "intr" :
(odp->type == TYPE_PASCAL_16) ? "word" : "long", (odp->type == TYPE_PASCAL_16) ? "word" : "long",
odp->u.func.arg_types ); odp->u.func.arg_types );
@ -1461,12 +1509,16 @@ static int BuildSpecFile( FILE *outfile, char *specname )
* *
* Build a 16-bit-to-Wine callback glue function. The syntax of the function * Build a 16-bit-to-Wine callback glue function. The syntax of the function
* profile is: call_type_xxxxx, where 'call' is the letter 'c' or 'p' for C or * profile is: call_type_xxxxx, where 'call' is the letter 'c' or 'p' for C or
* Pascal calling convention, 'type' is one of 'regs', 'word' or * Pascal calling convention, 'type' is one of 'regs', 'intr', 'word' or
* 'long' and each 'x' is an argument ('w'=word, 's'=signed word, * 'long' and each 'x' is an argument ('w'=word, 's'=signed word,
* 'l'=long, 'p'=linear pointer, 't'=linear pointer to null-terminated string, * 'l'=long, 'p'=linear pointer, 't'=linear pointer to null-terminated string,
* 'T'=segmented pointer to null-terminated string). * 'T'=segmented pointer to null-terminated string).
* For register functions, the arguments are ignored, but they are still * For register functions, the arguments (if present) are converted just
* removed from the stack upon return. !! FIXME !! * the same as for normal functions, but in addition a CONTEXT pointer
* filled with the current register values is passed to the 32-bit routine.
* A 'intr' interrupt handler routine is treated like a register routine
* without arguments, except that upon return, the flags word pushed onto
* the stack by the interrupt is removed.
* *
* This glue function contains only that part of the 16->32 thunk that is * This glue function contains only that part of the 16->32 thunk that is
* variable (depending on the type and number of arguments); the glue routine * variable (depending on the type and number of arguments); the glue routine
@ -1526,6 +1578,7 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile, char *prefix )
if (!strncmp( "word_", profile + 2, 5 )) short_ret = 1; if (!strncmp( "word_", profile + 2, 5 )) short_ret = 1;
else if (!strncmp( "regs_", profile + 2, 5 )) reg_func = 1; else if (!strncmp( "regs_", profile + 2, 5 )) reg_func = 1;
else if (!strncmp( "intr_", profile + 2, 5 )) reg_func = 2;
else if (strncmp( "long_", profile + 2, 5 )) else if (strncmp( "long_", profile + 2, 5 ))
{ {
fprintf( stderr, "Invalid function name '%s', ignored\n", profile ); fprintf( stderr, "Invalid function name '%s', ignored\n", profile );
@ -1590,8 +1643,6 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile, char *prefix )
prefix, profile, prefix, profile, prefix, profile, prefix, profile,
STACK16OFFSET(relay)); STACK16OFFSET(relay));
if ( !reg_func ) /* FIXME */
{
/* Copy the arguments */ /* Copy the arguments */
pos = (usecdecl? argsize : 0) + sizeof( STACK16FRAME ); pos = (usecdecl? argsize : 0) + sizeof( STACK16FRAME );
args = profile + 7; args = profile + 7;
@ -1636,13 +1687,12 @@ if ( !reg_func ) /* FIXME */
default: default:
fprintf( stderr, "Unknown arg type '%c'\n", args[i] ); fprintf( stderr, "Unknown arg type '%c'\n", args[i] );
} }
}
/* Call entry point */ /* Call entry point */
fprintf( outfile, "\tcall *%d(%%edx)\n", STACK16OFFSET(entry_point) ); fprintf( outfile, "\tcall *%d(%%edx)\n", STACK16OFFSET(entry_point) );
if ( reg_func ) if ( reg_func )
fprintf( outfile, "\tmovl $%d, %%eax\n", argsize ); fprintf( outfile, "\tmovl $%d, %%eax\n", reg_func == 2 ? 2 : argsize );
fprintf( outfile, "\tret\n" ); fprintf( outfile, "\tret\n" );