[HAL]
[reactos.git] / reactos / hal / halx86 / generic / trap.S
1 /*
2 * FILE: ntoskrnl/ke/i386/trap.S
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: System Traps, Entrypoints and Exitpoints
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 * NOTE: See asmmacro.S for the shared entry/exit code.
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include <reactos/asm.h>
12 #include <ndk/i386/asm.h>
13 #include <internal/i386/asmmacro.S>
14
15 .code32
16 .text
17
18 TRAP_ENTRY HalpTrap0D, 0
19 TRAP_ENTRY HalpApcInterrupt, KI_SOFTWARE_TRAP
20 TRAP_ENTRY HalpClockInterrupt, KI_PUSH_FAKE_ERROR_CODE
21 TRAP_ENTRY HalpProfileInterrupt, KI_PUSH_FAKE_ERROR_CODE
22
23 PUBLIC @HalpExitToV86@4
24 @HalpExitToV86@4:
25 /* Point esp to the iret frame and return */
26 lea esp, [ecx + KTRAP_FRAME_EIP]
27 iret
28
29 /* Here starts the real mode code */
30 .code16
31 PUBLIC _HalpRealModeStart
32 _HalpRealModeStart:
33 /* INT 0x10: AH = 0 (Set video Mode), AL = 0x12 (Mode 12) */
34 mov eax, HEX(12)
35 int HEX(10)
36
37 /* BOP */
38 .byte HEX(C4), HEX(C4)
39
40 /* The real mode stack */
41 .align 4
42 .space 2048
43 _HalpRealModeEnd:
44 PUBLIC _HalpRealModeEnd
45