reactos/lib/soft386/common.h
Aleksandar Andrejevic 99302b9d00 [SOFT386]
Implement Soft386LoadSegment.
[NTVDM]
Fix BiosPrintCharacter (Adapted from a patch by Hermes Belusca-Maito).


svn path=/branches/ntvdm/; revision=59764
2013-08-17 18:44:16 +00:00

74 lines
1.3 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_
/* INCLUDES *******************************************************************/
#include <soft386.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 */