3 * Copyright (C) 2000 David Welch <welch@cwcom.net>
5 * Moved to MSVC-compatible inline assembler by Mike Nordell, 2003-12-26
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * FILE: ntoskrnl/ke/i386/vm86_sup.S
23 * PURPOSE: V86 mode support
24 * PROGRAMMER: David Welch (welch@cwcom.net)
29 /* INCLUDES ******************************************************************/
33 #include <ddk/ntddk.h>
34 #include <ddk/status.h>
35 #include <internal/i386/segment.h>
36 #include <internal/i386/fpu.h>
37 #include <internal/ps.h>
38 #include <ddk/defines.h>
39 #include <internal/v86m.h>
41 #include <internal/trap.h>
42 #include <internal/ps.h>
45 #include <internal/ntoskrnl.h>
46 #include <internal/i386/segment.h>
48 // no arg-list, but asm doesn't care anyway
49 void KiInterruptDispatch();
52 #define DEFINE_INT_HANDLER(N) \
54 void irq_handler_##N() \
60 __asm mov eax, 0xceafbeef \
62 __asm mov ax, KERNEL_DS \
65 __asm mov ax, PCR_SELECTOR \
69 __asm call KiInterruptDispatch \
78 // NOTE: The inline assembler can't deal with having the final brace,
79 // ending the function, on the same line as an __asm, why there is
80 // none here and it MUST be added when using the macro!
100 DEFINE_INT_HANDLER(9)
102 DEFINE_INT_HANDLER(10)
104 DEFINE_INT_HANDLER(11)
106 DEFINE_INT_HANDLER(12)
108 DEFINE_INT_HANDLER(13)
110 DEFINE_INT_HANDLER(14)
112 DEFINE_INT_HANDLER(15)