2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
5 * PURPOSE: Header file to define commonly used stuff
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
12 /* INCLUDES *******************************************************************/
18 #define WIN32_NO_STATUS
23 /* DEFINES ********************************************************************/
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)
30 #define FAR_POINTER(x) \
31 (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
33 #define SEG_OFF_TO_PTR(seg, off) \
34 (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off)))
36 #define STEPS_PER_CYCLE 256
38 /* FUNCTIONS ******************************************************************/
40 extern LPVOID BaseAddress
;
41 extern BOOLEAN VdmRunning
;
42 extern LPCWSTR ExceptionName
[];
44 VOID
DisplayMessage(LPCWSTR Format
, ...);