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)
DOS: Make use of get/setAX and consorts instead of EmulatorGet/SetRegister(EMULATOR_REG_AX, ...). Start to implement real (but undocumented?) behaviour according to http://www.delorie.com/djgpp/doc/rbinter/ and http://www.datadoctor.biz/fr/data_recovery_programming_book_chapter6-pageXX.html (change XX by a valid page number) and http://spike.scu.edu.au/~barry/interrupts.html svn path=/branches/ntvdm/; revision=60778
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>
|
|
|
|
#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;
|
|
extern LPCWSTR ExceptionName[];
|
|
|
|
VOID DisplayMessage(LPCWSTR Format, ...);
|
|
|
|
#endif // _NTVDM_H_
|
|
|
|
/* EOF */
|