Rev 129 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
384 | mikedld | 1 | |
2 | init_events: |
||
3 | stdcall kernel_alloc, 512*EVENT_SIZE |
||
4 | mov [events], eax |
||
5 | xor eax, eax |
||
6 | mov [event_uid], eax |
||
7 | not eax |
||
8 | mov edi, event_map |
||
9 | mov [event_start], edi |
||
10 | mov ecx, 64/4 |
||
11 | cld |
||
12 | rep stosd |
||
13 | mov [event_end], edi |
||
14 | ret |
||
15 | |||
16 | |||
17 | proc alloc_event |
||
18 | |||
19 | |||
20 | cli |
||
21 | mov ebx, [event_start] |
||
22 | mov ecx, [event_end] |
||
23 | .l1: |
||
24 | bsf eax,[ebx] |
||
25 | jnz .found |
||
26 | add ebx,4 |
||
27 | cmp ebx, ecx |
||
28 | jb .l1 |
||
29 | popfd |
||
30 | xor eax,eax |
||
31 | ret |
||
32 | .found: |
||
33 | btr [ebx], eax |
||
34 | mov [event_start],ebx |
||
35 | inc [event_uid] |
||
36 | |||
37 | |||
38 | lea eax,[eax+ebx*8] |
||
39 | |||
40 | |||
41 | shl eax,5 |
||
42 | lea eax,[eax+ebx*4] ;eax*=52 (EVENT_SIZE) |
||
43 | add eax, [events] |
||
44 | mov ebx, [event_uid] |
||
45 | popfd |
||
46 | ret |
||
47 | endp |
||
48 | |||
49 | |||
50 | free_event: |
||
51 | sub eax, [events] |
||
52 | mov ecx, EVENT_SIZE |
||
53 | mov ebx, event_map |
||
54 | cdq |
||
55 | div ecx |
||
56 | |||
57 | |||
58 | cli |
||
59 | bts [ebx], eax |
||
60 | shr eax, 3 |
||
61 | and eax, not 3 |
||
62 | add eax, ebx |
||
63 | cmp [event_start], eax |
||
64 | ja @f |
||
65 | popfd |
||
66 | ret |
||
67 | @@: |
||
68 | mov [event_start], eax |
||
69 | popfd |
||
70 | ret |
||
71 | |||
72 | |||
73 | EVENT_SIGNALED equ 0x20000000 |
||
74 | MANUAL_RESET equ 0x40000000 |
||
75 | MANUAL_DESTROY equ 0x80000000 |
||
76 | |||
77 | |||
78 | |||
79 | ; eax= event data |
||
80 | ; ebx= flags |
||
81 | ; |
||
82 | ; retval |
||
83 | ; eax= event |
||
84 | ; edx= id |
||
85 | |||
86 | |||
87 | .flags equ esp+4 |
||
88 | .data equ esp |
||
89 | |||
90 | |||
91 | push eax |
||
92 | |||
93 | |||
94 | test eax, eax |
||
95 | jz .fail |
||
96 | |||
97 | |||
98 | mov [eax+APPOBJ.destroy], destroy_event.internal |
||
99 | mov [eax+EVENT.id], ebx |
||
100 | |||
101 | |||
102 | shl ebx, 5 |
||
103 | mov ebx, [CURRENT_TASK+ebx+4] |
||
104 | mov [eax+APPOBJ.pid], ebx |
||
105 | mov edx, [.flags] |
||
106 | mov [eax+EVENT.state], edx |
||
107 | |||
108 | |||
109 | test esi, esi |
||
110 | jz @F |
||
111 | lea edi, [eax+EVENT.code] |
||
112 | mov ecx, 6 |
||
113 | cld |
||
114 | rep movsd |
||
115 | @@: |
||
116 | mov ecx, [CURRENT_TASK] |
||
117 | shl ecx,8 |
||
118 | add ecx, SLOT_BASE+APP_OBJ_OFFSET |
||
119 | |||
120 | |||
121 | cli |
||
122 | mov edx, [ecx+APPOBJ.fd] |
||
123 | mov [eax+APPOBJ.fd], edx |
||
124 | mov [eax+APPOBJ.bk], ecx |
||
125 | mov [ecx+APPOBJ.fd], eax |
||
126 | mov [edx+APPOBJ.bk], eax |
||
127 | popfd |
||
128 | mov edx, [eax+EVENT.id] |
||
129 | .fail: |
||
130 | add esp, 8 |
||
131 | ret |
||
132 | |||
133 | |||
134 | restore .data |
||
135 | |||
136 | |||
137 | ; eax= event |
||
138 | ; ebx= id |
||
139 | |||
140 | |||
141 | |||
142 | |||
143 | jne .fail |
||
144 | cmp [eax+EVENT.id], ebx |
||
145 | jne .fail |
||
146 | .internal: |
||
147 | mov ebx, [eax+APPOBJ.fd] |
||
148 | mov ecx, [eax+APPOBJ.bk] |
||
149 | mov [ebx+APPOBJ.bk], ecx |
||
150 | mov [ecx+APPOBJ.fd], ebx |
||
151 | .force: |
||
152 | xor edx, edx ;clear common header |
||
153 | mov [eax], edx |
||
154 | mov [eax+4], edx |
||
155 | mov [eax+8], edx |
||
156 | mov [eax+12], edx |
||
157 | mov [eax+16], edx |
||
158 | |||
159 | |||
160 | .fail: |
||
161 | ret |
||
162 | |||
163 | |||
164 | proc send_event stdcall pid:dword, event:dword |
||
165 | locals |
||
166 | slot dd ? |
||
167 | endl |
||
168 | |||
169 | |||
170 | call pid_to_slot |
||
171 | test eax, eax |
||
172 | jz .fail |
||
173 | |||
174 | |||
175 | cmp [SLOT_BASE+eax+APPDATA.ev_count], 32 |
||
176 | ja .fail |
||
177 | |||
178 | |||
179 | |||
180 | |||
181 | test eax, eax |
||
182 | jz .fail |
||
183 | |||
184 | |||
185 | mov ecx, 6 |
||
186 | mov esi, [event] |
||
187 | cld |
||
188 | rep movsd |
||
189 | |||
190 | |||
191 | add ecx, SLOT_BASE+APP_EV_OFFSET |
||
192 | |||
193 | |||
194 | mov [eax+APPOBJ.destroy], destroy_event |
||
195 | mov ebx, [pid] |
||
196 | mov [eax+APPOBJ.pid], ebx |
||
197 | mov [eax+EVENT.state], EVENT_SIGNALED |
||
198 | |||
199 | |||
200 | cli ;insert event into |
||
201 | mov edx, [ecx+APPOBJ.fd] ;events list |
||
202 | mov [eax+APPOBJ.fd], edx ;and set events flag |
||
203 | mov [eax+APPOBJ.bk], ecx |
||
204 | mov [ecx+APPOBJ.fd], eax |
||
205 | mov [edx+APPOBJ.bk], eax |
||
206 | inc [ecx+APPDATA.ev_count-APP_EV_OFFSET] |
||
207 | or [ecx+APPDATA.event_mask-APP_EV_OFFSET], EVENT_EXTENDED |
||
208 | popfd |
||
209 | .fail: |
||
210 | ret |
||
211 | endp |
||
212 | |||
213 | |||
214 | |||
215 | |||
216 | proc get_event_ex stdcall, p_ev:dword, timeout:dword |
||
217 | |||
218 | |||
219 | mov edx,[CURRENT_TASK] |
||
220 | shl edx,8 |
||
221 | ; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0 |
||
222 | ; je .switch |
||
223 | |||
224 | |||
225 | |||
226 | |||
227 | cmp eax, edx |
||
228 | je .switch |
||
229 | |||
230 | |||
231 | mov edi, [p_ev] ;copy event data |
||
232 | mov ecx, 6 |
||
233 | cld |
||
234 | rep movsd |
||
235 | |||
236 | |||
237 | ; |
||
238 | test [eax+EVENT.state], MANUAL_RESET |
||
239 | jnz .done |
||
240 | |||
241 | |||
242 | cli ;remove event from events |
||
243 | mov ebx, [eax+APPOBJ.fd] ;list (reset event) |
||
244 | mov ecx, [eax+APPOBJ.bk] ;and clear events flag |
||
245 | mov [ebx+APPOBJ.bk], ecx ;if no active events |
||
246 | mov [ecx+APPOBJ.fd], ebx |
||
247 | |||
248 | |||
249 | |||
250 | |||
251 | jnz @F |
||
252 | and [edx+APPDATA.event_mask-APP_EV_OFFSET], not EVENT_EXTENDED |
||
253 | @@: |
||
254 | popfd |
||
255 | |||
256 | |||
257 | jz .destroy |
||
258 | |||
259 | |||
260 | |||
261 | |||
262 | cli |
||
263 | mov ebx, [edx+APPOBJ.fd] ;insert event into |
||
264 | mov [eax+APPOBJ.fd], ebx ;objects list |
||
265 | mov [eax+APPOBJ.bk], edx |
||
266 | mov [edx+APPOBJ.fd], eax |
||
267 | mov [ebx+APPOBJ.bk], eax |
||
268 | popfd |
||
269 | .done: |
||
270 | ret |
||
271 | |||
272 | |||
273 | call destroy_event.force |
||
274 | ret |
||
275 | .switch: |
||
276 | mov eax, [TASK_BASE] |
||
277 | mov [eax+TASKDATA.state], byte 5 |
||
278 | call change_task |
||
279 | jmp .wait |
||
280 | endp |
||
281 | |||
282 | |||
283 | ; eax= event |
||
284 | ; ebx= id |
||
285 | |||
286 | |||
287 | wait_event: |
||
288 | .event equ esp |
||
289 | push eax |
||
290 | .wait: |
||
291 | cmp [eax+APPOBJ.magic], 'EVNT' |
||
292 | jne .done |
||
293 | cmp [eax+EVENT.id], ebx |
||
294 | jne .done |
||
295 | |||
296 | |||
297 | jz .switch |
||
298 | |||
299 | |||
300 | jnz .done |
||
301 | |||
302 | |||
303 | shl edx,8 |
||
304 | add edx, SLOT_BASE |
||
305 | |||
306 | |||
307 | cli ;remove event from events |
||
308 | mov ebx, [eax+APPOBJ.fd] ;list (reset event) |
||
309 | mov ecx, [eax+APPOBJ.bk] ;and clear events flag |
||
310 | mov [ebx+APPOBJ.bk], ecx ;if no active events |
||
311 | mov [ecx+APPOBJ.fd], ebx |
||
312 | dec [edx+APPDATA.ev_count] |
||
313 | jnz @F |
||
314 | and [edx+APPDATA.event_mask], not EVENT_EXTENDED |
||
315 | @@: |
||
316 | and [eax+EVENT.state], not (EVENT_SIGNALED+EVENT_WATCHED) |
||
317 | popfd |
||
318 | |||
319 | |||
320 | jz .destroy |
||
321 | |||
322 | |||
323 | |||
324 | |||
325 | cli |
||
326 | mov ecx, [edx+APPOBJ.fd] ;insert event into |
||
327 | mov [eax+APPOBJ.fd], ecx ;objects list |
||
328 | mov [eax+APPOBJ.bk], edx |
||
329 | mov [edx+APPOBJ.fd], eax |
||
330 | mov [ecx+APPOBJ.bk], eax |
||
331 | popfd |
||
332 | .done: |
||
333 | add esp, 4 |
||
334 | ret |
||
335 | .destroy: |
||
336 | call destroy_event.force |
||
337 | add esp, 4 |
||
338 | ret |
||
339 | .switch: |
||
340 | or [eax+EVENT.state], EVENT_WATCHED |
||
341 | mov eax, [TASK_BASE] |
||
342 | mov [eax+TASKDATA.state], byte 5 |
||
343 | call change_task |
||
344 | mov eax, [.event] |
||
345 | jmp .wait |
||
346 | restore .event |
||
347 | |||
348 | |||
349 | ; eax= event |
||
350 | ; ebx= id |
||
351 | ; ecx= flags |
||
352 | ; edx= event data |
||
353 | |||
354 | |||
355 | .event equ esp |
||
356 | push eax |
||
357 | |||
358 | |||
359 | jne .fail |
||
360 | cmp [eax+EVENT.id], ebx |
||
361 | jne .fail |
||
362 | |||
363 | |||
364 | call pid_to_slot |
||
365 | test eax, eax |
||
366 | jz .fail |
||
367 | |||
368 | |||
369 | test esi, esi |
||
370 | mov edx, [.event] |
||
371 | jz @F |
||
372 | |||
373 | |||
374 | lea edi, [edx+EVENT.code] |
||
375 | mov ecx, 6 |
||
376 | cld |
||
377 | rep movsd |
||
378 | pop ecx |
||
379 | @@: |
||
380 | test [edx+EVENT.state], EVENT_SIGNALED |
||
381 | jnz .done |
||
382 | |||
383 | |||
384 | jz @F |
||
385 | test [edx+EVENT.state], EVENT_WATCHED |
||
386 | jz .done |
||
387 | @@: |
||
388 | shl eax, 8 |
||
389 | add eax, SLOT_BASE+APP_EV_OFFSET |
||
390 | |||
391 | |||
392 | cli |
||
393 | mov ebx, [edx+APPOBJ.fd] |
||
394 | mov ecx, [edx+APPOBJ.bk] |
||
395 | mov [ebx+APPOBJ.bk], ecx |
||
396 | mov [ecx+APPOBJ.fd], ebx |
||
397 | |||
398 | |||
399 | mov [edx+APPOBJ.fd], ecx |
||
400 | mov [edx+APPOBJ.bk], eax |
||
401 | mov [eax+APPOBJ.fd], edx |
||
402 | mov [ecx+APPOBJ.bk], edx |
||
403 | or [edx+EVENT.state], EVENT_SIGNALED |
||
404 | |||
405 | |||
406 | or [eax+APPDATA.event_mask-APP_EV_OFFSET], EVENT_EXTENDED |
||
407 | popfd |
||
408 | .fail: |
||
409 | .done: |
||
410 | add esp, 4 |
||
411 | ret |
||
412 | restore .event |
||
413 | |||
414 | |||
415 | ; eax= event |
||
416 | ; ebx= id |
||
417 | align 4 |
||
418 | clear_event: |
||
419 | .event equ esp |
||
420 | push eax |
||
421 | |||
422 | |||
423 | jne .fail |
||
424 | cmp [eax+EVENT.id], ebx |
||
425 | jne .fail |
||
426 | |||
427 | |||
428 | call pid_to_slot |
||
429 | test eax, eax |
||
430 | jz .fail |
||
431 | |||
432 | |||
433 | add eax, SLOT_BASE+APP_EV_OFFSET |
||
434 | mov edx, [.event] |
||
435 | pushfd |
||
436 | cli ;remove event from events |
||
437 | mov ebx, [edx+APPOBJ.fd] ;list (reset event) |
||
438 | mov ecx, [edx+APPOBJ.bk] ;and clear events flag |
||
439 | mov [ebx+APPOBJ.bk], ecx ;if no active events |
||
440 | mov [ecx+APPOBJ.fd], ebx |
||
441 | |||
442 | |||
443 | |||
444 | |||
445 | jnz @F |
||
446 | and [eax+APPDATA.event_mask-APP_EV_OFFSET], not EVENT_EXTENDED |
||
447 | @@: |
||
448 | add eax, (APP_OBJ_OFFSET-APP_EV_OFFSET) |
||
449 | |||
450 | |||
451 | mov [edx+APPOBJ.fd], ecx ;objects list |
||
452 | mov [edx+APPOBJ.bk], eax |
||
453 | mov [eax+APPOBJ.fd], edx |
||
454 | mov [ecx+APPOBJ.bk], edx |
||
455 | popfd |
||
456 | .fail: |
||
457 | .done: |
||
458 | add esp, 4 |
||
459 | ret |
||
460 | restore .event |
||
461 | |||
462 | |||
129 | mikedld | 463 | |
464 | |||
465 | mov [esp+36],eax |
||
466 | ret |
||
467 | |||
468 | |||
469 | |||
470 | sys_wait_event_timeout: |
||
471 | |||
472 | |||
473 | add ebx,eax |
||
474 | cmp ebx,[timer_ticks] |
||
475 | jna .swfet2 |
||
476 | .swfet1: |
||
384 | mikedld | 477 | call get_event_for_app |
129 | mikedld | 478 | test eax,eax |
479 | jne .eventoccur_time |
||
480 | call change_task |
||
481 | cmp ebx,[timer_ticks] |
||
482 | jg .swfet1 |
||
483 | .swfet2: |
||
384 | mikedld | 484 | xor eax,eax |
129 | mikedld | 485 | .eventoccur_time: |
384 | mikedld | 486 | mov [esp+36],eax |
129 | mikedld | 487 | ret |
488 | |||
489 | |||
490 | |||
491 | |||
492 | |||
493 | |||
494 | |||
495 | test eax,eax |
||
496 | jne eventoccur |
||
497 | newwait: |
||
498 | |||
499 | |||
384 | mikedld | 500 | mov [eax+TASKDATA.state], byte 5 |
129 | mikedld | 501 | call change_task |
502 | |||
503 | |||
504 | |||
505 | |||
506 | mov [esp+36],eax |
||
507 | ret |
||
508 | |||
509 | |||
510 | |||
511 | |||
512 | |||
513 | |||
384 | mikedld | 514 | test [edi+TASKDATA.event_mask],dword 1 |
129 | mikedld | 515 | jz no_eventoccur1 |
516 | ;mov edi,[TASK_BASE] |
||
384 | mikedld | 517 | cmp [edi-twdw+WDATA.fl_redraw],byte 0 |
129 | mikedld | 518 | je no_eventoccur1 |
519 | popad |
||
520 | mov eax,1 |
||
521 | ret |
||
522 | no_eventoccur1: |
||
523 | |||
524 | |||
384 | mikedld | 525 | test [edi+TASKDATA.event_mask],dword 2 |
129 | mikedld | 526 | jz no_eventoccur2 |
527 | mov ecx, [CURRENT_TASK] |
||
384 | mikedld | 528 | movzx edx,word [WIN_STACK+ecx*2] |
529 | mov eax, [TASK_COUNT] |
||
530 | cmp eax,edx |
||
129 | mikedld | 531 | jne no_eventoccur2x |
532 | cmp [KEY_COUNT],byte 0 |
||
384 | mikedld | 533 | je no_eventoccur2x |
129 | mikedld | 534 | eventoccur2: |
535 | popad |
||
536 | mov eax,2 |
||
537 | ret |
||
538 | no_eventoccur2x: |
||
539 | mov eax, hotkey_buffer |
||
540 | @@: |
||
541 | cmp [eax], ecx |
||
542 | jz eventoccur2 |
||
543 | add eax, 8 |
||
544 | cmp eax, hotkey_buffer+120*8 |
||
545 | jb @b |
||
546 | no_eventoccur2: |
||
547 | |||
548 | |||
384 | mikedld | 549 | test [edi+TASKDATA.event_mask],dword 4 |
129 | mikedld | 550 | jz no_eventoccur3 |
551 | cmp [BTN_COUNT],byte 0 |
||
384 | mikedld | 552 | je no_eventoccur3 |
129 | mikedld | 553 | mov ecx, [CURRENT_TASK] |
384 | mikedld | 554 | movzx edx, word [WIN_STACK+ecx*2] |
555 | mov eax, [TASK_COUNT] |
||
556 | cmp eax,edx |
||
129 | mikedld | 557 | jnz no_eventoccur3 |
558 | popad |
||
559 | mov eax,[BTN_BUFF] |
||
384 | mikedld | 560 | cmp eax,65535 |
129 | mikedld | 561 | je no_event_1 |
562 | mov eax,3 |
||
563 | ret |
||
564 | |||
565 | |||
566 | mov [window_minimize],1 |
||
567 | mov [BTN_COUNT],byte 0 |
||
384 | mikedld | 568 | xor eax, eax |
129 | mikedld | 569 | ret |
570 | |||
571 | |||
572 | |||
384 | mikedld | 573 | |
574 | |||
575 | test [edi+TASKDATA.event_mask],dword 00100000b |
||
129 | mikedld | 576 | jz no_mouse_event |
577 | mov eax,[CURRENT_TASK] |
||
384 | mikedld | 578 | shl eax,8 |
129 | mikedld | 579 | test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b |
384 | mikedld | 580 | jz no_mouse_event |
129 | mikedld | 581 | and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b |
384 | mikedld | 582 | popad |
129 | mikedld | 583 | mov eax,6 |
584 | ret |
||
585 | no_mouse_event: |
||
586 | |||
587 | |||
384 | mikedld | 588 | |
589 | test [edi+TASKDATA.event_mask],dword 16 |
||
129 | mikedld | 590 | jz no_eventoccur5 |
591 | cmp [REDRAW_BACKGROUND],byte 2 |
||
384 | mikedld | 592 | jnz no_eventoccur5 |
129 | mikedld | 593 | popad |
594 | mov eax,5 |
||
595 | ret |
||
596 | no_eventoccur5: |
||
597 | |||
598 | |||
384 | mikedld | 599 | test [edi+TASKDATA.event_mask],dword 01000000b |
129 | mikedld | 600 | jz no_ipc |
601 | mov eax,[CURRENT_TASK] |
||
384 | mikedld | 602 | shl eax,8 |
129 | mikedld | 603 | test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b |
384 | mikedld | 604 | jz no_ipc |
129 | mikedld | 605 | and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b |
384 | mikedld | 606 | popad |
129 | mikedld | 607 | mov eax,7 |
608 | ret |
||
609 | no_ipc: |
||
610 | |||
611 | |||
612 | |||
384 | mikedld | 613 | test [edi+TASKDATA.event_mask],dword 10000000b |
129 | mikedld | 614 | jz no_stack_event |
615 | mov eax,[CURRENT_TASK] |
||
384 | mikedld | 616 | shl eax,8 |
129 | mikedld | 617 | test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b |
384 | mikedld | 618 | jz no_stack_event |
129 | mikedld | 619 | and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b |
384 | mikedld | 620 | popad |
129 | mikedld | 621 | mov eax,8 |
622 | ret |
||
623 | no_stack_event: |
||
624 | |||
625 | |||
626 | jz .test_IRQ |
||
384 | mikedld | 627 | mov eax, [CURRENT_TASK] |
628 | shl eax, 8 |
||
129 | mikedld | 629 | test byte [eax+SLOT_BASE+APPDATA.event_mask+1], byte 1 |
384 | mikedld | 630 | jz .test_IRQ |
631 | and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1 |
||
632 | popad |
||
129 | mikedld | 633 | mov eax, 9 |
634 | ret |
||
635 | |||
636 | |||
384 | mikedld | 637 | ; mov eax, [CURRENT_TASK] |
638 | ; shl eax, 8 |
||
639 | ; test dword [eax+SLOT_BASE+APPDATA.event_mask], EVENT_EXTENDED |
||
640 | ; jz .test_IRQ |
||
641 | ; popad |
||
642 | ; mov eax, 10 |
||
643 | ; ret |
||
644 | |||
645 | |||
646 | cmp dword [edi+TASKDATA.event_mask], 0xFFFF |
||
129 | mikedld | 647 | jbe no_events |
648 | |||
649 | |||
384 | mikedld | 650 | mov ebx,0x00010000 |
129 | mikedld | 651 | xor ecx, ecx |
652 | irq_event_test: |
||
653 | mov edi,[TASK_BASE] |
||
384 | mikedld | 654 | test [edi+TASKDATA.event_mask],ebx |
129 | mikedld | 655 | jz no_irq_event |
656 | mov edi,ecx |
||
657 | shl edi,2 |
||
658 | add edi,irq_owner |
||
659 | mov edx,[edi] |
||
660 | mov eax,[TASK_BASE] |
||
384 | mikedld | 661 | mov eax,[eax+TASKDATA.pid] |
129 | mikedld | 662 | cmp edx,eax |
663 | jne no_irq_event |
||
664 | cmp [esi],dword 0 |
||
665 | jz no_irq_event |
||
666 | mov eax,ecx |
||
667 | add eax,16 |
||
668 | mov [esp+28],eax |
||
669 | popad |
||
670 | ret |
||
671 | no_irq_event: |
||
672 | add esi,0x1000 |
||
673 | shl ebx,1 |
||
674 | inc ecx |
||
675 | cmp ecx,16 |
||
676 | jb irq_event_test |
||
677 | |||
678 | |||
679 | popad |
||
680 | xor eax, eax |
||
681 | ret |
||
682 |