[FLOPPY] Don't wait forever while trying to determine media type.
[reactos.git] / hal / halx86 / up / pic.S
1 /*
2 * FILE: hal/halx86/up/pic.S
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: HAL PIC Management and Control Code
5 * PROGRAMMER: Thomas Faber (thomas.faber@reactos.org)
6 */
7
8 /* INCLUDES ******************************************************************/
9
10 #include <asm.inc>
11
12 #include <ks386.inc>
13
14 EXTERN _HalpEndSoftwareInterrupt2@8:PROC
15
16 /* GLOBALS *******************************************************************/
17
18 .data
19 ASSUME CS:NOTHING, DS:NOTHING, ES:NOTHING, FS:NOTHING, GS:NOTHING
20
21 /* FUNCTIONS *****************************************************************/
22
23 .code
24 PUBLIC _HalpEndSoftwareInterrupt@8
25 .PROC _HalpEndSoftwareInterrupt@8
26 FPO 0, 2, 0, 0, 0, FRAME_FPO
27
28 /* Call the C function with the same arguments we got */
29 push [esp+8]
30 push [esp+8]
31 call _HalpEndSoftwareInterrupt2@8
32
33 /* Check if we got a pointer back */
34 test eax, eax
35 jnz CallIntHandler
36
37 /* No? Just return */
38 ret 8
39
40 CallIntHandler:
41 /* We got a pointer to call. Since it won't return, free up our stack
42 space, or we could end up with some nasty deep recursion */
43 mov ecx, [esp+8]
44 add esp, 12
45 jmp eax
46 .ENDP
47
48 END