[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 #define SOFT386_OPCODE_WRITE_REG (1 << 1)
20
21 typedef BOOLEAN (FASTCALL *SOFT386_OPCODE_HANDLER_PROC)(PSOFT386_STATE, UCHAR);
22
23 extern
24 SOFT386_OPCODE_HANDLER_PROC
25 Soft386OpcodeHandlers[SOFT386_NUM_OPCODE_HANDLERS];
26
27 BOOLEAN
28 FASTCALL
29 Soft386OpcodePrefix
30 (
31 PSOFT386_STATE State,
32 UCHAR Opcode
33 );
34
35 BOOLEAN
36 FASTCALL
37 Soft386OpcodeIncrement
38 (
39 PSOFT386_STATE State,
40 UCHAR Opcode
41 );
42
43 BOOLEAN
44 FASTCALL
45 Soft386OpcodeDecrement
46 (
47 PSOFT386_STATE State,
48 UCHAR Opcode
49 );
50
51 BOOLEAN
52 FASTCALL
53 Soft386OpcodePushReg
54 (
55 PSOFT386_STATE State,
56 UCHAR Opcode
57 );
58
59 BOOLEAN
60 FASTCALL
61 Soft386OpcodePopReg
62 (
63 PSOFT386_STATE State,
64 UCHAR Opcode
65 );
66
67 BOOLEAN
68 FASTCALL
69 Soft386OpcodeNop
70 (
71 PSOFT386_STATE State,
72 UCHAR Opcode
73 );
74
75 BOOLEAN
76 FASTCALL
77 Soft386OpcodeExchangeEax
78 (
79 PSOFT386_STATE State,
80 UCHAR Opcode
81 );
82
83 BOOLEAN
84 FASTCALL
85 Soft386OpcodeShortConditionalJmp
86 (
87 PSOFT386_STATE State,
88 UCHAR Opcode
89 );
90
91 BOOLEAN
92 FASTCALL
93 Soft386OpcodeClearCarry
94 (
95 PSOFT386_STATE State,
96 UCHAR Opcode
97 );
98
99 BOOLEAN
100 FASTCALL
101 Soft386OpcodeSetCarry
102 (
103 PSOFT386_STATE State,
104 UCHAR Opcode
105 );
106
107 BOOLEAN
108 FASTCALL
109 Soft386OpcodeComplCarry
110 (
111 PSOFT386_STATE State,
112 UCHAR Opcode
113 );
114
115 BOOLEAN
116 FASTCALL
117 Soft386OpcodeClearInt
118 (
119 PSOFT386_STATE State,
120 UCHAR Opcode
121 );
122
123 BOOLEAN
124 FASTCALL
125 Soft386OpcodeSetInt
126 (
127 PSOFT386_STATE State,
128 UCHAR Opcode
129 );
130
131 BOOLEAN
132 FASTCALL
133 Soft386OpcodeClearDir
134 (
135 PSOFT386_STATE State,
136 UCHAR Opcode
137 );
138
139 BOOLEAN
140 FASTCALL
141 Soft386OpcodeSetDir
142 (
143 PSOFT386_STATE State,
144 UCHAR Opcode
145 );
146
147 BOOLEAN
148 FASTCALL
149 Soft386OpcodeHalt
150 (
151 PSOFT386_STATE State,
152 UCHAR Opcode
153 );
154
155 BOOLEAN
156 FASTCALL
157 Soft386OpcodeInByte
158 (
159 PSOFT386_STATE State,
160 UCHAR Opcode
161 );
162
163 BOOLEAN
164 FASTCALL
165 Soft386OpcodeIn
166 (
167 PSOFT386_STATE State,
168 UCHAR Opcode
169 );
170
171 BOOLEAN
172 FASTCALL
173 Soft386OpcodeOutByte
174 (
175 PSOFT386_STATE State,
176 UCHAR Opcode
177 );
178
179 BOOLEAN
180 FASTCALL
181 Soft386OpcodeOut
182 (
183 PSOFT386_STATE State,
184 UCHAR Opcode
185 );
186
187 BOOLEAN
188 FASTCALL
189 Soft386OpcodeShortJump
190 (
191 PSOFT386_STATE State,
192 UCHAR Opcode
193 );
194
195 BOOLEAN
196 FASTCALL
197 Soft386OpcodeMovRegImm
198 (
199 PSOFT386_STATE State,
200 UCHAR Opcode
201 );
202
203 BOOLEAN
204 FASTCALL
205 Soft386OpcodeMovByteRegImm
206 (
207 PSOFT386_STATE State,
208 UCHAR Opcode
209 );
210
211 BOOLEAN
212 FASTCALL
213 Soft386OpcodeAddByteModrm
214 (
215 PSOFT386_STATE State,
216 UCHAR Opcode
217 );
218
219 #endif // _OPCODES_H_