ReactOS  0.4.13-dev-961-g238ea69
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
37 enum
38 {
54 };
55 #endif
56 
57 extern BOOLEAN CpuRunning;
58 extern FAST486_STATE EmulatorContext;
59 
60 /* FUNCTIONS ******************************************************************/
61 
62 #if 0
63 VOID EmulatorException(BYTE ExceptionNumber, LPWORD Stack);
64 #endif
65 
70 #if 0
72 #endif
73 
76 
77 #endif // _CPU_H_
78 
79 /* EOF */
VOID CpuCleanup(VOID)
Definition: cpu.c:243
BOOLEAN CpuRunning
Definition: cpu.c:40
VOID CpuSimulate(VOID)
Definition: cpu.c:167
VOID CpuStep(VOID)
Definition: cpu.c:108
VOID EmulatorException(BYTE ExceptionNumber, LPWORD Stack)
Definition: emulator.c:85
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
VOID CpuUnsimulate(VOID)
Definition: cpu.c:203
unsigned char BOOLEAN
_Inout_ PVOID Segment
Definition: exfuncs.h:893
VOID CpuExecute(WORD Segment, WORD Offset)
Definition: cpu.c:102
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned char BYTE
Definition: mem.h:68
BOOLEAN CpuInitialize(VOID)
Definition: cpu.c:216
VOID EmulatorTerminate(VOID)
Definition: emulator.c:503
uint16_t * LPWORD
Definition: typedefs.h:54
FAST486_STATE EmulatorContext
Definition: cpu.c:39