reactos/subsystems/ntvdm/ntvdm.h
Hermès Bélusca-Maïto da7d643e51 [NTVDM]
- Use MAX/MINSHORT instead of CRT macros.
- Include only the relevant headers.

svn path=/branches/ntvdm/; revision=61014
2013-11-16 23:11:54 +00:00

53 lines
1.3 KiB
C

/*
* COPYRIGHT: GPL - See COPYING in the top level directory
* PROJECT: ReactOS Virtual DOS Machine
* FILE: ntvdm.h
* PURPOSE: Header file to define commonly used stuff
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
*/
#ifndef _NTVDM_H_
#define _NTVDM_H_
/* INCLUDES *******************************************************************/
#include <stdio.h>
#include <stdarg.h>
#include <conio.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <wincon.h>
#include <winnls.h>
#include <winuser.h>
#include <debug.h>
/* DEFINES ********************************************************************/
#define TO_LINEAR(seg, off) (((seg) << 4) + (off))
#define MAX_SEGMENT 0xFFFF
#define MAX_OFFSET 0xFFFF
#define MAX_ADDRESS 0x1000000 // 16 MB of RAM
#define FAR_POINTER(x) \
(PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
#define SEG_OFF_TO_PTR(seg, off) \
(PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off)))
#define STEPS_PER_CYCLE 256
/* FUNCTIONS ******************************************************************/
extern LPVOID BaseAddress;
extern BOOLEAN VdmRunning;
VOID DisplayMessage(LPCWSTR Format, ...);
#endif // _NTVDM_H_
/* EOF */