ReactOS 0.4.15-dev-8119-g4fb2fdb
cpu.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/cpu/cpu.h
5 * PURPOSE: Minimal x86 machine emulator for the VDM
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9#ifndef _CPU_H_
10#define _CPU_H_
11
12/* INCLUDES *******************************************************************/
13
14#include <fast486.h>
15
16/* DEFINES ********************************************************************/
17
18/* FLAGS */
19#define EMULATOR_FLAG_CF (1 << 0)
20#define EMULATOR_FLAG_PF (1 << 2)
21#define EMULATOR_FLAG_AF (1 << 4)
22#define EMULATOR_FLAG_ZF (1 << 6)
23#define EMULATOR_FLAG_SF (1 << 7)
24#define EMULATOR_FLAG_TF (1 << 8)
25#define EMULATOR_FLAG_IF (1 << 9)
26#define EMULATOR_FLAG_DF (1 << 10)
27#define EMULATOR_FLAG_OF (1 << 11)
28#define EMULATOR_FLAG_NT (1 << 14)
29#define EMULATOR_FLAG_RF (1 << 16)
30#define EMULATOR_FLAG_VM (1 << 17)
31#define EMULATOR_FLAG_AC (1 << 18)
32#define EMULATOR_FLAG_VIF (1 << 19)
33#define EMULATOR_FLAG_VIP (1 << 20)
34#define EMULATOR_FLAG_ID (1 << 21)
35
36#if 0
37enum
38{
54};
55#endif
56
57extern BOOLEAN CpuRunning;
58extern FAST486_STATE EmulatorContext;
59
60/* FUNCTIONS ******************************************************************/
61
62#if 0
63VOID EmulatorException(BYTE ExceptionNumber, LPWORD Stack);
64#endif
65
70#if 0
72#endif
73
76
77#endif // _CPU_H_
78
79/* EOF */
unsigned char BOOLEAN
VOID EmulatorTerminate(VOID)
Definition: emulator.c:503
VOID EmulatorException(BYTE ExceptionNumber, LPWORD Stack)
Definition: emulator.c:85
@ EMULATOR_EXCEPTION_PAGE_FAULT
Definition: emulator.h:101
@ EMULATOR_EXCEPTION_NO_SEGMENT
Definition: emulator.h:98
@ EMULATOR_EXCEPTION_BREAKPOINT
Definition: emulator.h:90
@ EMULATOR_EXCEPTION_DEBUG
Definition: emulator.h:88
@ EMULATOR_EXCEPTION_GPF
Definition: emulator.h:100
@ EMULATOR_EXCEPTION_STACK_SEGMENT
Definition: emulator.h:99
@ EMULATOR_EXCEPTION_NMI
Definition: emulator.h:89
@ EMULATOR_EXCEPTION_NO_FPU
Definition: emulator.h:94
@ EMULATOR_EXCEPTION_DOUBLE_FAULT
Definition: emulator.h:95
@ EMULATOR_EXCEPTION_BOUND
Definition: emulator.h:92
@ EMULATOR_EXCEPTION_DIVISION_BY_ZERO
Definition: emulator.h:87
@ EMULATOR_EXCEPTION_INVALID_OPCODE
Definition: emulator.h:93
@ EMULATOR_EXCEPTION_FPU_SEGMENT
Definition: emulator.h:96
@ EMULATOR_EXCEPTION_OVERFLOW
Definition: emulator.h:91
@ EMULATOR_EXCEPTION_INVALID_TSS
Definition: emulator.h:97
unsigned short WORD
Definition: ntddk_ex.h:93
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
VOID CpuStep(VOID)
Definition: cpu.c:108
BOOLEAN CpuRunning
Definition: cpu.c:40
BOOLEAN CpuInitialize(VOID)
Definition: cpu.c:216
VOID CpuSimulate(VOID)
Definition: cpu.c:167
VOID CpuExecute(WORD Segment, WORD Offset)
Definition: cpu.c:102
VOID CpuCleanup(VOID)
Definition: cpu.c:243
FAST486_STATE EmulatorContext
Definition: cpu.c:39
VOID CpuUnsimulate(VOID)
Definition: cpu.c:203
uint16_t * LPWORD
Definition: typedefs.h:56
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
unsigned char BYTE
Definition: xxhash.c:193