[NTVDM]
[reactos.git] / subsystems / ntvdm / ntvdm.h
1 /*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: ntvdm.h
5 * PURPOSE: Header file to define commonly used stuff
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 #ifndef _NTVDM_H_
10 #define _NTVDM_H_
11
12 /* INCLUDES *******************************************************************/
13
14 #include <windows.h>
15 #include <tchar.h>
16 #include <stdio.h>
17 #include <conio.h>
18 #include <stdarg.h>
19
20 #define NDEBUG
21 #include <debug.h>
22
23 /* DEFINES ********************************************************************/
24
25 #define TO_LINEAR(seg, off) (((seg) << 4) + (off))
26 #define MAX_SEGMENT 0xFFFF
27 #define MAX_OFFSET 0xFFFF
28 #define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET)
29 #define FAR_POINTER(x) ((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
30 #define STEPS_PER_CYCLE 256
31
32 /* FUNCTIONS ******************************************************************/
33
34 extern LPVOID BaseAddress;
35 extern BOOLEAN VdmRunning;
36 extern LPCWSTR ExceptionName[];
37
38 VOID DisplayMessage(LPCWSTR Format, ...);
39
40 #endif
41
42 /* EOF */