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 *******************************************************************/
21 /* DEFINES ********************************************************************/
23 #define TO_LINEAR(seg, off) (((seg) << 4) + (off))
24 #define MAX_SEGMENT 0xFFFF
25 #define MAX_OFFSET 0xFFFF
26 #define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET)
27 #define FAR_POINTER(x) ((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
28 #define STEPS_PER_CYCLE 256
29 #define IsConsoleHandle(h) (((((ULONG_PTR)h) & 0x10000003) == 3) ? TRUE : FALSE)
31 /* FUNCTIONS ******************************************************************/
33 extern LPVOID BaseAddress
;
34 extern BOOLEAN VdmRunning
;
35 extern LPCWSTR ExceptionName
[];
37 VOID
DisplayMessage(LPCWSTR Format
, ...);