2013-06-17 00:00:36 +00:00
|
|
|
/*
|
|
|
|
* 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>
|
|
|
|
*/
|
|
|
|
|
2013-06-26 22:58:41 +00:00
|
|
|
#ifndef _NTVDM_H_
|
|
|
|
#define _NTVDM_H_
|
|
|
|
|
2013-06-17 00:00:36 +00:00
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
2013-10-27 14:17:34 +00:00
|
|
|
#include <conio.h>
|
|
|
|
|
2013-11-03 20:31:19 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2013-10-27 14:17:34 +00:00
|
|
|
#include <windows.h>
|
|
|
|
|
2013-06-22 01:41:51 +00:00
|
|
|
#include <debug.h>
|
2013-06-17 00:00:36 +00:00
|
|
|
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
|
|
|
|
#define TO_LINEAR(seg, off) (((seg) << 4) + (off))
|
|
|
|
#define MAX_SEGMENT 0xFFFF
|
2013-10-27 22:31:53 +00:00
|
|
|
#define MAX_OFFSET 0xFFFF
|
2013-06-17 00:00:36 +00:00
|
|
|
#define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET)
|
2013-10-27 22:08:41 +00:00
|
|
|
|
2013-10-27 22:31:53 +00:00
|
|
|
#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)))
|
2013-10-27 22:08:41 +00:00
|
|
|
|
2013-06-23 00:20:24 +00:00
|
|
|
#define STEPS_PER_CYCLE 256
|
2013-06-17 00:00:36 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
|
|
|
|
extern LPVOID BaseAddress;
|
|
|
|
extern BOOLEAN VdmRunning;
|
|
|
|
extern LPCWSTR ExceptionName[];
|
|
|
|
|
|
|
|
VOID DisplayMessage(LPCWSTR Format, ...);
|
2013-06-26 22:58:41 +00:00
|
|
|
|
2013-08-09 18:55:35 +00:00
|
|
|
#endif // _NTVDM_H_
|
2013-06-17 00:00:36 +00:00
|
|
|
|
|
|
|
/* EOF */
|