mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 05:43:24 +00:00
![Aleksandar Andrejevic](/assets/img/avatar_default.png)
Implement Soft386LoadSegment. [NTVDM] Fix BiosPrintCharacter (Adapted from a patch by Hermes Belusca-Maito). svn path=/branches/ntvdm/; revision=59764
74 lines
1.3 KiB
C
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 */
|