[SOFT386]
[reactos.git] / lib / soft386 / opcodes.h
1 /*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: 386/486 CPU Emulation Library
4 * FILE: opcodes.h
5 * PURPOSE: Opcode handlers. (header file)
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 #ifndef _OPCODES_H_
10 #define _OPCODES_H_
11
12 /* DEFINES ********************************************************************/
13
14 #ifndef FASTCALL
15 #define FASTCALL __fastcall
16 #endif
17
18 #define SOFT386_NUM_OPCODE_HANDLERS 256
19
20 typedef BOOLEAN (FASTCALL *SOFT386_OPCODE_HANDLER_PROC)(PSOFT386_STATE, UCHAR);
21
22 extern
23 SOFT386_OPCODE_HANDLER_PROC
24 Soft386OpcodeHandlers[SOFT386_NUM_OPCODE_HANDLERS];
25
26 BOOLEAN
27 FASTCALL
28 Soft386OpcodePrefix
29 (
30 PSOFT386_STATE State,
31 UCHAR Opcode
32 );
33
34 BOOLEAN
35 FASTCALL
36 Soft386OpcodeIncrement
37 (
38 PSOFT386_STATE State,
39 UCHAR Opcode
40 );
41
42 BOOLEAN
43 FASTCALL
44 Soft386OpcodeDecrement
45 (
46 PSOFT386_STATE State,
47 UCHAR Opcode
48 );
49
50 BOOLEAN
51 FASTCALL
52 Soft386OpcodePushReg
53 (
54 PSOFT386_STATE State,
55 UCHAR Opcode
56 );
57
58 BOOLEAN
59 FASTCALL
60 Soft386OpcodePopReg
61 (
62 PSOFT386_STATE State,
63 UCHAR Opcode
64 );
65
66 BOOLEAN
67 FASTCALL
68 Soft386OpcodeNop
69 (
70 PSOFT386_STATE State,
71 UCHAR Opcode
72 );
73
74 BOOLEAN
75 FASTCALL
76 Soft386OpcodeExchangeEax
77 (
78 PSOFT386_STATE State,
79 UCHAR Opcode
80 );
81
82 BOOLEAN
83 FASTCALL
84 Soft386OpcodeShortConditionalJmp
85 (
86 PSOFT386_STATE State,
87 UCHAR Opcode
88 );
89
90 BOOLEAN
91 FASTCALL
92 Soft386OpcodeClearCarry
93 (
94 PSOFT386_STATE State,
95 UCHAR Opcode
96 );
97
98 BOOLEAN
99 FASTCALL
100 Soft386OpcodeSetCarry
101 (
102 PSOFT386_STATE State,
103 UCHAR Opcode
104 );
105
106 BOOLEAN
107 FASTCALL
108 Soft386OpcodeComplCarry
109 (
110 PSOFT386_STATE State,
111 UCHAR Opcode
112 );
113
114 BOOLEAN
115 FASTCALL
116 Soft386OpcodeClearInt
117 (
118 PSOFT386_STATE State,
119 UCHAR Opcode
120 );
121
122 BOOLEAN
123 FASTCALL
124 Soft386OpcodeSetInt
125 (
126 PSOFT386_STATE State,
127 UCHAR Opcode
128 );
129
130 BOOLEAN
131 FASTCALL
132 Soft386OpcodeClearDir
133 (
134 PSOFT386_STATE State,
135 UCHAR Opcode
136 );
137
138 BOOLEAN
139 FASTCALL
140 Soft386OpcodeSetDir
141 (
142 PSOFT386_STATE State,
143 UCHAR Opcode
144 );
145
146 BOOLEAN
147 FASTCALL
148 Soft386OpcodeHalt
149 (
150 PSOFT386_STATE State,
151 UCHAR Opcode
152 );
153
154 BOOLEAN
155 FASTCALL
156 Soft386OpcodeInByte
157 (
158 PSOFT386_STATE State,
159 UCHAR Opcode
160 );
161
162 BOOLEAN
163 FASTCALL
164 Soft386OpcodeIn
165 (
166 PSOFT386_STATE State,
167 UCHAR Opcode
168 );
169
170 BOOLEAN
171 FASTCALL
172 Soft386OpcodeOutByte
173 (
174 PSOFT386_STATE State,
175 UCHAR Opcode
176 );
177
178 BOOLEAN
179 FASTCALL
180 Soft386OpcodeOut
181 (
182 PSOFT386_STATE State,
183 UCHAR Opcode
184 );
185
186 BOOLEAN
187 FASTCALL
188 Soft386OpcodeShortJump
189 (
190 PSOFT386_STATE State,
191 UCHAR Opcode
192 );
193
194 #endif // _OPCODES_H_