mirror of
https://github.com/reactos/reactos.git
synced 2024-09-09 12:20:21 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
Finish my Interruption revamp. - Move interrupt-related code from bop.c to int32.c - Introduce InitializeInt32 helper so that one can initialize all the needed 16-bit stubs for the 32-bit interrupts. - Remove unneeded defines in emulator.h and an exported variable in ntvdm.h. svn path=/branches/ntvdm/; revision=60908
48 lines
1.2 KiB
C
48 lines
1.2 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 <windows.h>
|
|
|
|
#include <debug.h>
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
#define TO_LINEAR(seg, off) (((seg) << 4) + (off))
|
|
#define MAX_SEGMENT 0xFFFF
|
|
#define MAX_OFFSET 0xFFFF
|
|
#define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET)
|
|
|
|
#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 */
|