3 * Copyright (C) 2000 David Welch <welch@cwcom.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 * FILE: ntoskrnl/include/internal/v86m.h
21 * PURPOSE: V86 mode support
22 * PROGRAMMER: David Welch (welch@cwcom.net)
27 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_V86M_H
28 #define __NTOSKRNL_INCLUDE_INTERNAL_V86M_H
32 /* Emulate cli/sti instructions */
33 #define KV86M_EMULATE_CLI_STI (0x1)
34 /* Allow the v86 mode code to access i/o ports */
35 #define KV86M_ALLOW_IO_PORT_ACCESS (0x2)
37 typedef struct _KV86M_REGISTERS
40 * General purpose registers
67 ULONG RecoveryAddress
;
68 UCHAR RecoveryInstruction
[4];
72 } KV86M_REGISTERS
, *PKV86M_REGISTERS
;
75 Ke386CallBios(UCHAR Int
, PKV86M_REGISTERS Regs
);
80 * Definitions for the offsets of members in the KV86M_REGISTERS
82 #define KV86M_REGISTERS_EBP (0x0)
83 #define KV86M_REGISTERS_EDI (0x4)
84 #define KV86M_REGISTERS_ESI (0x8)
85 #define KV86M_REGISTERS_EDX (0xC)
86 #define KV86M_REGISTERS_ECX (0x10)
87 #define KV86M_REGISTERS_EBX (0x14)
88 #define KV86M_REGISTERS_EAX (0x18)
89 #define KV86M_REGISTERS_DS (0x1C)
90 #define KV86M_REGISTERS_ES (0x20)
91 #define KV86M_REGISTERS_FS (0x24)
92 #define KV86M_REGISTERS_GS (0x28)
93 #define KV86M_REGISTERS_EIP (0x2C)
94 #define KV86M_REGISTERS_CS (0x30)
95 #define KV86M_REGISTERS_EFLAGS (0x34)
96 #define KV86M_REGISTERS_ESP (0x38)
97 #define KV86M_REGISTERS_SS (0x3C)
99 #endif /* ASSEMBLER */
101 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_V86M_H */