mirror of
https://github.com/reactos/reactos.git
synced 2024-07-15 17:06:29 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
- In the interface header soft386.h, do not include other particular headers (windows.h and debug.h). Those must be included by the different applications which also will include soft386.h. - LPVOID --> PVOID (do it general, not just à-la Win32). - The .c files include the headers, and each .c files must have its "#define NDEBUG\n#include <debug.h>" lines, to activate (or deactivate here in the example) debugging output. - In the .c files, include the header windef.h for having the basic types, and temporarily comment out the needed #defines which will be needed if one needs to include other win***.h files. Those will be deleted if they aren't needed at the end. svn path=/branches/ntvdm/; revision=59766
70 lines
1.2 KiB
C
70 lines
1.2 KiB
C
/*
|
|
* COPYRIGHT: GPL - See COPYING in the top level directory
|
|
* PROJECT: 386/486 CPU Emulation Library
|
|
* FILE: common.h
|
|
* PURPOSE: Common functions used internally by Soft386 (header file).
|
|
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
|
*/
|
|
|
|
#ifndef _COMMON_H_
|
|
#define _COMMON_H_
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
#define GET_SEGMENT_RPL(s) ((s) & 3)
|
|
#define GET_SEGMENT_INDEX(s) ((s) & 0xFFF8)
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
inline
|
|
BOOLEAN
|
|
Soft386ReadMemory
|
|
(
|
|
PSOFT386_STATE State,
|
|
INT SegmentReg,
|
|
ULONG Offset,
|
|
BOOLEAN InstFetch,
|
|
PVOID Buffer,
|
|
ULONG Size
|
|
);
|
|
|
|
inline
|
|
BOOLEAN
|
|
Soft386WriteMemory
|
|
(
|
|
PSOFT386_STATE State,
|
|
INT SegmentReg,
|
|
ULONG Offset,
|
|
PVOID Buffer,
|
|
ULONG Size
|
|
);
|
|
|
|
inline
|
|
BOOLEAN
|
|
Soft386StackPush
|
|
(
|
|
PSOFT386_STATE State,
|
|
ULONG Value
|
|
);
|
|
|
|
inline
|
|
BOOLEAN
|
|
Soft386StackPop
|
|
(
|
|
PSOFT386_STATE State,
|
|
PULONG Value
|
|
);
|
|
|
|
inline
|
|
BOOLEAN
|
|
Soft386LoadSegment
|
|
(
|
|
PSOFT386_STATE State,
|
|
INT Segment,
|
|
WORD Selector
|
|
);
|
|
|
|
#endif // _COMMON_H_
|
|
|
|
/* EOF */
|