b316eebc192aae0df32fcfcec8da9b563250b761
[reactos.git] / lib / soft386 / common.h
1 /*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: 386/486 CPU Emulation Library
4 * FILE: common.h
5 * PURPOSE: Common functions used internally by Soft386 (header file).
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 #ifndef _COMMON_H_
10 #define _COMMON_H_
11
12 /* INCLUDES *******************************************************************/
13
14 #include <soft386.h>
15
16 /* DEFINES ********************************************************************/
17
18 #define GET_SEGMENT_DPL(s) ((s) & 3)
19
20 /* FUNCTIONS ******************************************************************/
21
22 inline
23 BOOLEAN
24 Soft386ReadMemory
25 (
26 PSOFT386_STATE State,
27 INT SegmentReg,
28 ULONG Offset,
29 BOOLEAN InstFetch,
30 PVOID Buffer,
31 ULONG Size
32 );
33
34 inline
35 BOOLEAN
36 Soft386WriteMemory
37 (
38 PSOFT386_STATE State,
39 INT SegmentReg,
40 ULONG Offset,
41 PVOID Buffer,
42 ULONG Size
43 );
44
45 inline
46 BOOLEAN
47 Soft386StackPush
48 (
49 PSOFT386_STATE State,
50 ULONG Value
51 );
52
53 inline
54 BOOLEAN
55 Soft386StackPop
56 (
57 PSOFT386_STATE State,
58 PULONG Value
59 );
60
61 #endif // _COMMON_H_
62
63 /* EOF */