Finalize version.
[marekmrva_bc.git] / ResourcesClass.pas
blob78d5f41d9d6ab3d372cb7e79d988d4b03767ebc5
1 unit ResourcesClass;
3 interface
5 uses
6 ConstantsClass, FunctionsClass, TypesClass;
8 const
10 // ************************************************************************** //
11 // * GUI Resources * //
12 // ************************************************************************** //
14 { Fonts used }
16 FONT_DEFAULT_NAME = 'Lucida Console';
17 FONT_DEFAULT_SIZE = 10;
18 FONT_DEFAULT_HEIGHT = 15;
20 { Layout Constants }
22 LAY_PADDING = 3;
24 CPU_MINWIDTH = 112;
25 CPU_MINHEIGHT = 64;
26 MSC_MINWIDTH = CPU_MINWIDTH;
27 MSC_MINHEIGHT = 124;
28 EXC_MINWIDTH = 120;
29 EXC_MINHEIGHT = MSC_MINHEIGHT + LAY_PADDING + CPU_MINHEIGHT;
30 STA_MINWIDTH = EXC_MINWIDTH + LAY_PADDING + CPU_MINWIDTH;
31 STA_MINHEIGHT = 124;
32 ASM_MINWIDTH = 264;
33 ASM_MINHEIGHT = STA_MINHEIGHT + LAY_PADDING + EXC_MINHEIGHT;
34 MEM_MINWIDTH = ASM_MINWIDTH + LAY_PADDING + STA_MINWIDTH;
35 MEM_MINHEIGHT = 67;
36 LOG_MINHEIGHT = 67;
38 LAY_MINWIDTH = MEM_MINWIDTH + (2 * LAY_PADDING);
39 LAY_MINHEIGHT = ASM_MINHEIGHT + MEM_MINHEIGHT + LOG_MINHEIGHT + (4 * LAY_PADDING);
41 INS_MINWIDTH = 100;
43 { Dialog box texts }
45 TEXT_RESET = 'Source has been modified. Reset?';
47 { Popup menu texts }
49 POP_ASM_CHANGE = 'Change';
50 POP_ASM_INSERT = 'Insert';
51 POP_ASM_REMOVE = 'Remove';
52 POP_ASM_STEP = 'Single Step';
53 POP_ASM_GET_ORIGIN = 'Go to Origin';
54 POP_ASM_SET_ORIGIN = 'New Origin here';
55 POP_ASM_RESET = 'Reset Program';
56 POP_ASM_CHECKING = 'Checking program...';
57 POP_ASM_DONE_RUNNING = 'Done. Running...';
58 POP_ASM_ERRORS_FOUND = 'Errors were found!';
59 POP_ASM_EXEC_STOPPED = 'Execution stopped.';
61 { Misc. Captions, Texts, Buttons, etc. }
63 ABO_TEXT = 'Created by Marek Mrva (c) 2010';
65 LOG_VIEW_CLEAR = 'Clear';
67 CPU_VIEW_AX = 'AX';
68 CPU_VIEW_CHANGE = 'Change';
69 CPU_VIEW_TRUE = '1';
70 CPU_VIEW_FALSE = '0';
71 CPU_VIEW_CHG_AX = CPU_VIEW_CHANGE + ' AX';
73 MEM_VIEW_NAME = 'Name';
74 MEM_VIEW_TYPE = 'Type';
75 MEM_VIEW_VALUE = 'Value';
76 MEM_VIEW_EDIT = 'Edit';
77 MEM_VIEW_ADD = 'Add operand';
78 MEM_VIEW_REMOVE = 'Remove operand';
80 MSC_VIEW_FSW = 'FSW';
81 MSC_VIEW_FCW = 'FCW';
82 MSC_VIEW_PREC = 'Prec.';
83 MSC_VIEW_ROUND = 'Round';
84 MSC_VIEW_CHANGE = 'Change';
85 MSC_VIEW_TRUE = '1';
86 MSC_VIEW_FALSE = '0';
87 MSC_VIEW_CHG_SW = MSC_VIEW_CHANGE + ' FPU Status Word';
88 MSC_VIEW_CHG_CW = MSC_VIEW_CHANGE + ' FPU Control Word';
90 EXC_VIEW_TYPE = '';
91 EXC_VIEW_EXC = 'Exc';
92 EXC_VIEW_MASK = 'Msk';
93 EXC_VIEW_TOGGLE = 'Toggle';
94 EXC_VIEW_TRUE = '1';
95 EXC_VIEW_FALSE = '0';
97 OP_EDIT_OK = 'OK';
98 OP_EDIT_CANCEL = 'Cancel';
99 OP_EDIT_CAPTION = 'Add new operand';
100 OP_EDIT_DESCRIPTION = 'Format of operand - NAME:TYPE';
102 BC_EDIT_OK = 'OK';
103 BC_EDIT_CANCEL = 'Cancel';
104 BC_EDIT_BCD = 'BCD';
105 BC_EDIT_HEX = 'Hex';
107 IN_EDIT_OK = 'OK';
108 IN_EDIT_CANCEL = 'Cancel';
109 IN_EDIT_MODIFY = 'Modify ';
110 IN_EDIT_INT_S = 'Signed';
111 IN_EDIT_INT_U = 'Unsigned';
112 IN_EDIT_HEX = 'Hex';
114 FL_EDIT_OK = 'OK';
115 FL_EDIT_CANCEL = 'Cancel';
116 FL_EDIT_MODIFY = 'Modify ';
117 FL_EDIT_FLOAT = 'Float';
118 FL_EDIT_HEX = 'Hex';
119 FL_EDIT_TAG = ' tag';
120 FL_EDIT_MODIFY_TAG = FL_EDIT_MODIFY + 'associated' + FL_EDIT_TAG;
122 ASM_INPUT_BUTTON_ASSEMBLE = 'Assemble';
123 ASM_INPUT_BUTTON_CANCEL = 'Cancel';
124 ASM_INPUT_CAPTION_INSERT = 'Insert instruction at address';
125 ASM_INPUT_CAPTION_CHANGE = 'Change instruction at address';
127 { Preprogrammed Color Themes }
129 THEME_GRID_DEFAULT: TGridTheme = (
130 Address: (None: (FG: $404040; BG: $FFFFFF);
131 Selected: (FG: $202020; BG: $E0E0E0));
132 Assembly: (None: (FG: $202020; BG: $FFFFFF);
133 Selected: (FG: $000000; BG: $E0E0E0));
134 Highlight: (FG: $000000; BG: $00FFFF);
135 Step: (FG: $000000; BG: $FFA080);
138 THEME_GRID_DARK: TGridTheme = (
139 Address: (None: (FG: $C0C0C0; BG: $000000);
140 Selected: (FG: $E0E0E0; BG: $505050));
141 Assembly: (None: (FG: $FFFFFF; BG: $000000);
142 Selected: (FG: $FFFFFF; BG: $505050));
143 Highlight: (FG: $000000; BG: $00FFFF);
144 Step: (FG: $FFFFFF; BG: $A01010);
147 THEME_VIEW_DEFAULT: TViewTheme = (
148 Line: (None: (FG: $404040; BG: $FFFFFF);
149 Selected: (FG: $202020; BG: $E0E0E0));
150 Change: $0000FF;
153 THEME_VIEW_DARK: TViewTheme = (
154 Line: (None: (FG: $FFFFFF; BG: $000000);
155 Selected: (FG: $FFFFFF; BG: $505050));
156 Change: $0000FF;
159 // ************************************************************************** //
160 // * API Resources * //
161 // ************************************************************************** //
163 { Error Messages }
165 GLOB_NO_ERROR = '';
167 FIO_SYSTEM_NOT_FOUND = 'Invalid Asm File';
168 FIO_LOADING = 'Loading file: ';
169 FIO_ERROR_LOADING = 'Errors found when loading file!';
170 FIO_LOADED = 'Loaded.';
171 FIO_SAVING = 'Saving file: ';
172 FIO_SAVED = 'Saved.';
174 INST_CHAR_INVALID = 'Invalid character';
175 INST_NONE = 'No instruction specified';
176 INST_INST_UNKNOWN = 'Unrecognized instruction';
177 INST_INST_UNSUPPORTED = 'Instruction not supported on physical CPU';
178 INST_OPER_INVALID = 'Instruction does not support given operands';
179 INST_OPER_NOT_ENOUGH = 'Not enough operands';
180 INST_OPER_TOO_MANY = 'Too many operands';
181 INST_OPER_UNKNOWN = 'Unrecognized operand';
182 INST_OPER_TYPE_UNKNOWN = 'Unrecognized operand type';
183 INST_OPER_TYPE_INVALID = 'Invalid operand';
184 INST_OPER_NAME_EXISTS = 'Operand name already exists';
185 INST_OPER_NAME_UNKNOWN = 'Unrecognized operand name';
187 STEP_BRANCH_OUT_OF_RANGE = 'Branch address out of range';
188 STEP_NO_CALL_FUNCTION = 'Call function not specified';
189 STEP_POSITION_OUT_OF_RANGE = 'Position out of range';
191 { Instructions Descriptions }
193 DESC_CO = ', ';
194 DESC_COA = ', and ';
195 DESC_DO = '. ';
196 DESC_AF = ' after ';
197 DESC_AN = ' and ';
198 DESC_BY = ' by ';
199 DESC_FO = ' for ';
200 DESC_FR = ' from ';
201 DESC_IF = ' if ';
202 DESC_IN = ' in ';
203 DESC_INT = ' into ';
204 DESC_IT = 'its ';
205 DESC_OF = ' of ';
206 DESC_ONT = ' onto ';
207 DESC_OR = ' or ';
208 DESC_TH = 'the ';
209 DESC_TO = ' to ';
210 DESC_WI = ' with ';
211 DESC_WO = ' without ';
213 DESC_ADD = 'Add ';
214 DESC_CHK = 'Check ';
215 DESC_CLA = 'Classify ';
216 DESC_CLR = 'Clear ';
217 DESC_CMP = 'Compare ';
218 DESC_CNV = 'Convert ';
219 DESC_COM = 'Complements ';
220 DESC_COP = 'Copy ';
221 DESC_CPT = 'Compute ';
222 DESC_DEC = 'Decrement ';
223 DESC_DIV = 'Divide ';
224 DESC_INC = 'Increment ';
225 DESC_INI = 'Initialize ';
226 DESC_JM = 'Jump';
227 DESC_LOA = 'Load ';
228 DESC_MOV = 'Move ';
229 DESC_MUL = 'Multiply ';
230 DESC_PSH = 'Push ';
231 DESC_REP = 'Replace ';
232 DESC_RND = 'Round ';
233 DESC_SCA = 'Scale ';
234 DESC_SET = 'Sets' + FL_EDIT_TAG;
235 DESC_SPR = 'Separate ';
236 DESC_STR = 'Store ';
237 DESC_SUB = 'Subtract ';
238 DESC_XCH = 'Exchange ';
240 DESC_TAG: array [0..3] of String = (
241 'Valid',
242 'Zero',
243 'Invalid',
244 'Empty'
246 DESC_TAG_LONGEST = 2;
248 DESC_EXCE: array [0..7] of String = (
249 'Error',
250 'Stack',
251 'Precis',
252 'Underf',
253 'Overf',
254 'ZerDiv',
255 'Denorm',
256 'Inv.Op'
259 DESC_CONDITION = 'C';
260 DESC_COND: array [0..3] of String = (
261 DESC_CONDITION + '0',
262 DESC_CONDITION + '1',
263 DESC_CONDITION + '2',
264 DESC_CONDITION + '3'
267 DESC_PREC_BIT = 'b';
268 DESC_PREC: array [0..3] of String = (
269 '24' + DESC_PREC_BIT,
270 '???',
271 '53' + DESC_PREC_BIT,
272 '64' + DESC_PREC_BIT
275 DESC_ROUN: array [0..3] of String = (
276 'NEAR',
277 'DOWN',
278 'UP',
279 'ZERO'
281 DESC_ROUN_LONGEST = 0;
283 DESC_FLAG: array [0..2] of String = (
284 'CF',
285 'PF',
286 'ZF'
289 DESC_STACK = 'ST';
290 DESC_STACKS: array [0..7] of String = (
291 DESC_STACK + '(0)', DESC_STACK + '(1)',
292 DESC_STACK + '(2)', DESC_STACK + '(3)',
293 DESC_STACK + '(4)', DESC_STACK + '(5)',
294 DESC_STACK + '(6)', DESC_STACK + '(7)'
297 DESC_ST_0 = DESC_STACK + '(0)';
298 DESC_ST_1 = DESC_STACK + '(1)';
299 DESC_ST_I = DESC_STACK + '(i)';
300 DESC_AX = 'AX';
301 DESC_WORD = 'WORD';
302 DESC_DWORD = 'DWORD';
303 DESC_QWORD = 'QWORD';
304 DESC_ADDR = 'ADDRESS';
305 DESC_BCD = 'BCD';
306 DESC_SINGLE = 'SINGLE';
307 DESC_DOUBLE = 'DOUBLE';
308 DESC_EXTEND = 'EXTENDED';
309 DESC_CW = 'CONTROL_WORD';
310 DESC_SW = 'STATUS_WORD';
311 DESC_ENV_14 = 'ENVIR_14B';
312 DESC_ENV_28 = 'ENVIR_28B';
313 DESC_STAT_94 = 'STATE_94B';
314 DESC_STAT_108 = 'STATE_108B';
316 DESC_EFL = 'EFLAGS';
317 DESC_FPU = 'FPU';
318 DESC_FPU_S = 'the ' + DESC_FPU + ' stack';
319 DESC_FSW = DESC_FPU + ' status word';
320 DESC_FCW = DESC_FPU + ' control word';
321 DESC_FEN = DESC_FPU + ' environment';
322 DESC_STA = DESC_FPU + ' state';
323 DESC_SIN = 'sine';
324 DESC_COS = 'cosine';
325 DESC_SQRT = 'square root';
326 DESC_I_SIN = DESC_IT + DESC_SIN;
327 DESC_I_COS = DESC_IT + DESC_COS;
328 DESC_STO = 'store ';
329 DESC_STORE = DESC_STO + 'result' + DESC_IN;
330 DESC_STORE_ST_0 = DESC_STORE + DESC_ST_0;
331 DESC_STORE_ST_1 = DESC_STORE + DESC_ST_1;
332 DESC_STORE_ST_I = DESC_STORE + DESC_ST_I;
333 DESC_STORE_EFL = DESC_STORE + DESC_EFL;
334 DESC_STORE_FSW = DESC_STORE + DESC_FSW;
335 DESC_VAL = 'value';
336 DESC_EXP = 'exponent';
337 DESC_SIG = 'significand';
338 DESC_POP = 'pop ';
339 DESC_POP_FPU = DESC_POP + DESC_FPU_S;
340 DESC_PUSH = 'push';
341 DESC_PUSH_FPU = DESC_PUSH + DESC_ONT + DESC_FPU_S;
342 DESC_FP_EXC = DESC_FPU + ' exception flags';
343 DESC_FP_E = DESC_FPU + ' exceptions';
344 DESC_CHECK_O = 'check for ordered values';
345 DESC_PU_FP_E = 'pending unmasked ' + DESC_FP_E;
346 DESC_CHECK_PUE = 'checking' + DESC_FO + DESC_PU_FP_E;
347 DESC_REINIT = '. Then re-initialize the ' + DESC_FPU;
348 DESC_MASK = '. Then mask all ' + DESC_FP_E;
349 DESC_REM_D = 'remainder obtained from dividing ';
350 DESC_CON = DESC_TH + 'contents' + DESC_OF;
351 DESC_2X = ' twice';
352 DESC_TOP_F = DESC_TH + 'TOP field';
353 DESC_A = 'above';
354 DESC_B = 'below';
355 DESC_C = 'carry';
356 DESC_E = 'equal';
357 DESC_G = 'greater';
358 DESC_L = 'less';
359 DESC_N = 'not ';
360 DESC_O = 'overflow';
361 DESC_P = 'parity';
362 DESC_U = 'unordered';
363 DESC_EVEN = ' even';
364 DESC_ODD = ' odd';
365 DESC_SIGN = 'sign';
366 DESC_ZERO = 'zero';
367 DESC_EMPTY = 'empty';
368 DESC_TRUNC = 'truncation';
369 DESC_A_L = DESC_IF + DESC_A + ' (CF = 0 and ZF = 0)';
370 DESC_AE_L = DESC_IF + DESC_A + DESC_OR + DESC_E + ' (CF = 0)';
371 DESC_B_L = DESC_IF + DESC_B + ' (CF = 1)';
372 DESC_BE_L = DESC_IF + DESC_B + DESC_OR + DESC_E + ' (CF = 1 or ZF = 1)';
373 DESC_C_L = DESC_IF + DESC_C + ' (CF = 1)';
374 DESC_E_L = DESC_IF + DESC_E + ' (ZF = 1)';
375 DESC_G_L = DESC_IF + DESC_G + ' (ZF = 0 and SF = OF)';
376 DESC_GE_L = DESC_IF + DESC_G + DESC_OR + DESC_E + ' (SF = OF)';
377 DESC_L_L = DESC_IF + DESC_L + ' (SF <> OF)';
378 DESC_LE_L = DESC_IF + DESC_L + DESC_OR + DESC_E + ' (ZF = 1 or SF <> OF)';
379 DESC_NA_L = DESC_IF + DESC_N + DESC_A + ' (CF = 1 or ZF = 1)';
380 DESC_NAE_L = DESC_IF + DESC_N + DESC_A + DESC_OR + DESC_E + ' (CF = 1)';
381 DESC_NB_L = DESC_IF + DESC_N + DESC_B + ' (CF = 0)';
382 DESC_NBE_L = DESC_IF + DESC_N + DESC_B + DESC_OR + DESC_E + ' (CF = 0 and ZF = 0)';
383 DESC_NC_L = DESC_IF + DESC_N + DESC_C + ' (CF = 0)';
384 DESC_NE_L = DESC_IF + DESC_N + DESC_E + ' (ZF = 0)';
385 DESC_NG_L = DESC_IF + DESC_N + DESC_G + ' (ZF = 1 or SF <> OF)';
386 DESC_NGE_L = DESC_IF + DESC_N + DESC_G + DESC_OR + DESC_E + ' (SF <> OF)';
387 DESC_NL_L = DESC_IF + DESC_N + DESC_L + ' (SF = OF)';
388 DESC_NLE_L = DESC_IF + DESC_N + DESC_L + DESC_OR + DESC_E + ' (ZF = 0 and SF = OF)';
389 DESC_NO_L = DESC_IF + DESC_N + DESC_O + ' (OF = 0)';
390 DESC_NP_L = DESC_IF + DESC_N + DESC_P + ' (PF = 0)';
391 DESC_NS_L = DESC_IF + DESC_N + DESC_SIGN + ' (SF = 0)';
392 DESC_NU_L = DESC_IF + DESC_N + DESC_U + ' (PF = 0)';
393 DESC_NZ_L = DESC_IF + DESC_N + DESC_ZERO + ' (ZF = 0)';
394 DESC_O_L = DESC_IF + DESC_O + ' (OF = 1)';
395 DESC_P_L = DESC_IF + DESC_P + ' (PF = 1)';
396 DESC_PE_L = DESC_IF + DESC_P + DESC_EVEN + ' (PF = 1)';
397 DESC_PO_L = DESC_IF + DESC_P + DESC_ODD + ' (PF = 0)';
398 DESC_S_L = DESC_IF + DESC_SIGN + ' (SF = 1)';
399 DESC_U_L = DESC_IF + DESC_U + ' (PF = 1)';
400 DESC_Z_L = DESC_IF + DESC_ZERO + ' (ZF = 1)';
402 DESC_F2XM1 = DESC_REP + DESC_ST_0 + DESC_WI + '(2^(ST(0)) - 1)';
403 DESC_FABS = DESC_REP + DESC_ST_0 + DESC_WI + DESC_IT + 'absolute value';
404 DESC_FADD_S = DESC_ADD + DESC_SINGLE + DESC_TO + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
405 DESC_FADD_D = DESC_ADD + DESC_DOUBLE + DESC_TO + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
406 DESC_FADD_T_I = DESC_ADD + DESC_ST_0 + DESC_TO + DESC_ST_I + DESC_AN + DESC_STORE_ST_0;
407 DESC_FADD_I_T = DESC_ADD + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_AN + DESC_STORE_ST_I;
408 DESC_FADDP_I_T = DESC_ADD + DESC_ST_0 + DESC_TO + DESC_ST_I + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
409 DESC_FADDP = DESC_ADD + DESC_ST_0 + DESC_TO + DESC_ST_1 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
410 DESC_FBLD_0 = DESC_CNV + DESC_BCD + DESC_TO + DESC_EXTEND + DESC_AN + DESC_PUSH_FPU;
411 DESC_FBSTP_0 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_BCD + DESC_AN + DESC_POP_FPU;
412 DESC_FCHS = DESC_COM + DESC_SIGN + DESC_OF + DESC_ST_0;
413 DESC_FCLEX = DESC_CLR + DESC_FP_EXC + DESC_AF + DESC_CHECK_PUE;
414 DESC_FCMOVB_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_B_L;
415 DESC_FCMOVBE_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_BE_L;
416 DESC_FCMOVE_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_E_L;
417 DESC_FCMOVNB_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_NB_L;
418 DESC_FCMOVNBE_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_NBE_L;
419 DESC_FCMOVNE_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_NE_L;
420 DESC_FCMOVNU_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_NU_L;
421 DESC_FCMOVU_T_I = DESC_MOV + DESC_ST_I + DESC_TO + DESC_ST_0 + DESC_U_L;
422 DESC_FCOM = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_AN + DESC_STORE_FSW;
423 DESC_FCOM_S = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_SINGLE + DESC_AN + DESC_STORE_FSW;
424 DESC_FCOM_D = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_DOUBLE + DESC_AN + DESC_STORE_FSW;
425 DESC_FCOM_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_AN + DESC_STORE_FSW;
426 DESC_FCOMI_T_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_AN + DESC_STORE_EFL;
427 DESC_FCOMIP_T_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_STORE_EFL + DESC_COA + DESC_POP_FPU;
428 DESC_FCOMP = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
429 DESC_FCOMP_S = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_SINGLE + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
430 DESC_FCOMP_D = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_DOUBLE + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
431 DESC_FCOMP_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
432 DESC_FCOMPP = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU + DESC_2X;
433 DESC_FCOS = DESC_REP + DESC_ST_0 + DESC_WI + DESC_I_COS;
434 DESC_FDECSTP = DESC_DEC + DESC_TOP_F + DESC_IN + DESC_FSW;
435 DESC_FDIV_S = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_SINGLE + DESC_AN + DESC_STORE_ST_0;
436 DESC_FDIV_D = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_DOUBLE + DESC_AN + DESC_STORE_ST_0;
437 DESC_FDIV_T_I = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_ST_I + DESC_AN + DESC_STORE_ST_0;
438 DESC_FDIV_I_T = DESC_DIV + DESC_ST_I + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_I;
439 DESC_FDIVP = DESC_DIV + DESC_ST_1 + DESC_BY + DESC_ST_0 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
440 DESC_FDIVP_I_T = DESC_DIV + DESC_ST_I + DESC_BY + DESC_ST_0 + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
441 DESC_FDIVR_S = DESC_DIV + DESC_SINGLE + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
442 DESC_FDIVR_D = DESC_DIV + DESC_DOUBLE + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
443 DESC_FDIVR_T_I = DESC_DIV + DESC_ST_I + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
444 DESC_FDIVR_I_T = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_ST_I + DESC_AN + DESC_STORE_ST_I;
445 DESC_FDIVRP = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_ST_1 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
446 DESC_FDIVRP_I_T = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_ST_I + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
447 DESC_FFREE_I = DESC_SET + DESC_FO + DESC_ST_I + DESC_TO + DESC_EMPTY;
448 DESC_FIADD_4 = DESC_ADD + DESC_DWORD + DESC_TO + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
449 DESC_FIADD_2 = DESC_ADD + DESC_WORD + DESC_TO + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
450 DESC_FICOM_2 = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_WORD + DESC_AN + DESC_STORE_FSW;
451 DESC_FICOM_4 = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_DWORD + DESC_AN + DESC_STORE_FSW;
452 DESC_FICOMP_2 = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_WORD + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
453 DESC_FICOMP_4 = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_DWORD + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
454 DESC_FIDIV_2 = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_WORD + DESC_AN + DESC_STORE_ST_0;
455 DESC_FIDIV_4 = DESC_DIV + DESC_ST_0 + DESC_BY + DESC_DWORD + DESC_AN + DESC_STORE_ST_0;
456 DESC_FIDIVR_2 = DESC_DIV + DESC_WORD + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
457 DESC_FIDIVR_4 = DESC_DIV + DESC_DWORD + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
458 DESC_FILD_2 = DESC_PSH + DESC_WORD + DESC_ONT + DESC_FPU_S;
459 DESC_FILD_4 = DESC_PSH + DESC_DWORD + DESC_ONT + DESC_FPU_S;
460 DESC_FILD_8 = DESC_PSH + DESC_QWORD + DESC_ONT + DESC_FPU_S;
461 DESC_FIMUL_2 = DESC_MUL + DESC_ST_0 + DESC_BY + DESC_WORD + DESC_AN + DESC_STORE_ST_0;
462 DESC_FIMUL_4 = DESC_MUL + DESC_ST_0 + DESC_BY + DESC_DWORD + DESC_AN + DESC_STORE_ST_0;
463 DESC_FINCSTP = DESC_INC + DESC_TOP_F + DESC_IN + DESC_FSW;
464 DESC_FINIT = DESC_INI + DESC_FPU + DESC_AF + DESC_CHECK_PUE;
465 DESC_FIST_2 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_WORD;
466 DESC_FIST_4 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_DWORD;
467 DESC_FISTP_2 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_WORD + DESC_AN + DESC_POP_FPU;
468 DESC_FISTP_4 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_DWORD + DESC_AN + DESC_POP_FPU;
469 DESC_FISTP_8 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_QWORD + DESC_AN + DESC_POP_FPU;
470 DESC_FISTTP_2 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_WORD + DESC_WI + DESC_TRUNC + DESC_AN + DESC_POP_FPU;
471 DESC_FISTTP_4 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_DWORD + DESC_WI + DESC_TRUNC + DESC_AN + DESC_POP_FPU;
472 DESC_FISTTP_8 = DESC_STR + DESC_ST_0 + DESC_IN + DESC_QWORD + DESC_WI + DESC_TRUNC + DESC_AN + DESC_POP_FPU;
473 DESC_FISUB_2 = DESC_SUB + DESC_WORD + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
474 DESC_FISUB_4 = DESC_SUB + DESC_DWORD + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
475 DESC_FISUBR_2 = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_WORD + DESC_AN + DESC_STORE_ST_0;
476 DESC_FISUBR_4 = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_DWORD + DESC_AN + DESC_STORE_ST_0;
477 DESC_FLD_S = DESC_PSH + DESC_SINGLE + DESC_ONT + DESC_FPU_S;
478 DESC_FLD_D = DESC_PSH + DESC_DOUBLE + DESC_ONT + DESC_FPU_S;
479 DESC_FLD_E = DESC_PSH + DESC_EXTEND + DESC_ONT + DESC_FPU_S;
480 DESC_FLD_I = DESC_PSH + DESC_ST_I + DESC_ONT + DESC_FPU_S;
481 DESC_FLD1 = DESC_PSH + '+1.0' + DESC_ONT + DESC_FPU_S;
482 DESC_FLDCW_C = DESC_LOA + DESC_FCW + DESC_FR + DESC_CW;
483 DESC_FLDENV_14 = DESC_LOA + DESC_FEN + DESC_FR + DESC_ENV_14;
484 DESC_FLDENV_28 = DESC_LOA + DESC_FEN + DESC_FR + DESC_ENV_28;
485 DESC_FLDL2E = DESC_PSH + 'log_2(e)' + DESC_ONT + DESC_FPU_S;
486 DESC_FLDL2T = DESC_PSH + 'log_2(10)' + DESC_ONT + DESC_FPU_S;
487 DESC_FLDLG2 = DESC_PSH + 'log_10(2)' + DESC_ONT + DESC_FPU_S;
488 DESC_FLDLN2 = DESC_PSH + 'log_e(2)' + DESC_ONT + DESC_FPU_S;
489 DESC_FLDPI = DESC_PSH + 'Pi (3.141...)' + DESC_ONT + DESC_FPU_S;
490 DESC_FLDZ = DESC_PSH + '+0.0' + DESC_ONT + DESC_FPU_S;
491 DESC_FMUL_S = DESC_MUL + DESC_ST_0 + DESC_BY + DESC_SINGLE + DESC_AN + DESC_STORE_ST_0;
492 DESC_FMUL_D = DESC_MUL + DESC_ST_0 + DESC_BY + DESC_DOUBLE + DESC_AN + DESC_STORE_ST_0;
493 DESC_FMUL_T_I = DESC_MUL + DESC_ST_0 + DESC_BY + DESC_ST_I + DESC_AN + DESC_STORE_ST_0;
494 DESC_FMUL_I_T = DESC_MUL + DESC_ST_I + DESC_BY + DESC_ST_0 + DESC_AN + DESC_STORE_ST_I;
495 DESC_FMULP = DESC_MUL + DESC_ST_1 + DESC_BY + DESC_ST_0 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
496 DESC_FMULP_I_T = DESC_MUL + DESC_ST_I + DESC_BY + DESC_ST_0 + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
497 DESC_FNCLEX = DESC_CLR + DESC_FP_EXC + DESC_WO + DESC_CHECK_PUE;
498 DESC_FNINIT = DESC_INI + DESC_FPU + DESC_WO + DESC_CHECK_PUE;
499 DESC_FNOP = 'No operation is performed';
500 DESC_FNSAVE_94 = DESC_STR + DESC_STA + DESC_TO + DESC_STAT_94 + DESC_WO + DESC_CHECK_PUE + DESC_REINIT;
501 DESC_FNSAVE_108 = DESC_STR + DESC_STA + DESC_TO + DESC_STAT_108 + DESC_WO + DESC_CHECK_PUE + DESC_REINIT;
502 DESC_FNSTCW_C = DESC_STR + DESC_FCW + DESC_TO + DESC_CW + DESC_WO + DESC_CHECK_PUE;
503 DESC_FNSTENV_14 = DESC_STR + DESC_FEN + DESC_TO + DESC_ENV_14 + DESC_WO + DESC_CHECK_PUE + DESC_MASK;
504 DESC_FNSTENV_28 = DESC_STR + DESC_FEN + DESC_TO + DESC_ENV_28 + DESC_WO + DESC_CHECK_PUE + DESC_MASK;
505 DESC_FNSTSW_W = DESC_STR + DESC_FSW + DESC_TO + DESC_SW + DESC_WO + DESC_CHECK_PUE;
506 DESC_FNSTSW_AX = DESC_STR + DESC_FSW + DESC_TO + DESC_AX + DESC_WO + DESC_CHECK_PUE;
507 DESC_FPATAN = DESC_REP + DESC_ST_1 + DESC_WI + 'arctan(' + DESC_ST_1 + '/' + DESC_ST_0 + ')' + DESC_AN + DESC_POP_FPU;
508 DESC_FPREM = DESC_REP + DESC_ST_0 + DESC_WI + DESC_TH + DESC_REM_D + DESC_ST_0 + DESC_BY + DESC_ST_1;
509 DESC_FPREM1 = DESC_REP + DESC_ST_0 + DESC_WI + DESC_TH + 'IEEE ' + DESC_REM_D + DESC_ST_0 + DESC_BY + DESC_ST_1;
510 DESC_FPTAN = DESC_REP + DESC_ST_0 + DESC_WI + 'its tangent' + DESC_AN + DESC_PUSH + ' 1' + DESC_ONT + DESC_FPU_S;
511 DESC_FRNDINT = DESC_RND + DESC_ST_0 + DESC_TO + 'an integer';
512 DESC_FRSTOR_94 = DESC_LOA + DESC_STA + DESC_FR + DESC_STAT_94;
513 DESC_FRSTOR_108 = DESC_LOA + DESC_STA + DESC_FR + DESC_STAT_108;
514 DESC_FSAVE_94 = DESC_STR + DESC_STA + DESC_TO + DESC_STAT_94 + DESC_AF + DESC_CHECK_PUE + DESC_REINIT;
515 DESC_FSAVE_108 = DESC_STR + DESC_STA + DESC_TO + DESC_STAT_108 + DESC_AF + DESC_CHECK_PUE + DESC_REINIT;
516 DESC_FSCALE = DESC_SCA + DESC_ST_0 + DESC_BY + DESC_ST_1;
517 DESC_FSIN = DESC_REP + DESC_ST_0 + DESC_WI + DESC_I_SIN;
518 DESC_FSINCOS = DESC_CPT + DESC_TH + DESC_SIN + DESC_AN + DESC_COS + DESC_OF + DESC_ST_0 + DESC_DO + DESC_REP + DESC_ST_0 + DESC_WI + DESC_TH + DESC_SIN + DESC_COA + DESC_PUSH + ' ' + DESC_TH + DESC_COS + DESC_ONT + DESC_FPU_S;
519 DESC_FSQRT = DESC_CPT + DESC_SQRT + DESC_OF + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
520 DESC_FST_S = DESC_STR + DESC_ST_0 + DESC_TO + DESC_SINGLE;
521 DESC_FST_D = DESC_STR + DESC_ST_0 + DESC_TO + DESC_DOUBLE;
522 DESC_FST_I = DESC_COP + DESC_ST_0 + DESC_TO + DESC_ST_I;
523 DESC_FSTCW_C = DESC_STR + DESC_FCW + DESC_TO + DESC_CW + DESC_AF + DESC_CHECK_PUE;
524 DESC_FSTENV_14 = DESC_STR + DESC_FEN + DESC_TO + DESC_ENV_14 + DESC_AF + DESC_CHECK_PUE + DESC_MASK;
525 DESC_FSTENV_28 = DESC_STR + DESC_FEN + DESC_TO + DESC_ENV_28 + DESC_AF + DESC_CHECK_PUE + DESC_MASK;
526 DESC_FSTP_S = DESC_STR + DESC_ST_0 + DESC_TO + DESC_SINGLE + DESC_AN + DESC_POP_FPU;
527 DESC_FSTP_D = DESC_STR + DESC_ST_0 + DESC_TO + DESC_DOUBLE + DESC_AN + DESC_POP_FPU;
528 DESC_FSTP_E = DESC_STR + DESC_ST_0 + DESC_TO + DESC_EXTEND + DESC_AN + DESC_POP_FPU;
529 DESC_FSTP_I = DESC_COP + DESC_ST_0 + DESC_TO + DESC_ST_I + DESC_AN + DESC_POP_FPU;
530 DESC_FSTSW_W = DESC_STR + DESC_FSW + DESC_TO + DESC_SW + DESC_AF + DESC_CHECK_PUE;
531 DESC_FSTSW_AX = DESC_STR + DESC_FSW + DESC_TO + DESC_AX + DESC_AF + DESC_CHECK_PUE;
532 DESC_FSUB_S = DESC_SUB + DESC_SINGLE + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
533 DESC_FSUB_D = DESC_SUB + DESC_DOUBLE + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
534 DESC_FSUB_T_I = DESC_SUB + DESC_ST_I + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_0;
535 DESC_FSUB_I_T = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_ST_I + DESC_AN + DESC_STORE_ST_I;
536 DESC_FSUBP = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_ST_1 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
537 DESC_FSUBP_I_T = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_ST_I + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
538 DESC_FSUBR_S = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_SINGLE + DESC_AN + DESC_STORE_ST_0;
539 DESC_FSUBR_D = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_DOUBLE + DESC_AN + DESC_STORE_ST_0;
540 DESC_FSUBR_T_I = DESC_SUB + DESC_ST_0 + DESC_FR + DESC_ST_I + DESC_AN + DESC_STORE_ST_0;
541 DESC_FSUBR_I_T = DESC_SUB + DESC_ST_I + DESC_FR + DESC_ST_0 + DESC_AN + DESC_STORE_ST_I;
542 DESC_FSUBRP = DESC_SUB + DESC_ST_1 + DESC_FR + DESC_ST_0 + DESC_CO + DESC_STORE_ST_1 + DESC_COA + DESC_POP_FPU;
543 DESC_FSUBRP_I_T = DESC_SUB + DESC_ST_I + DESC_FR + DESC_ST_0 + DESC_CO + DESC_STORE_ST_I + DESC_COA + DESC_POP_FPU;
544 DESC_FTST = DESC_CMP + DESC_ST_0 + DESC_WI + '0.0' + DESC_AN + DESC_STORE_FSW;
545 DESC_FUCOM = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_CO + DESC_CHECK_O + DESC_COA + DESC_STORE_FSW;
546 DESC_FUCOM_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_CHECK_O + DESC_COA + DESC_STORE_FSW;
547 DESC_FUCOMI_T_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_CHECK_O + DESC_COA + DESC_STORE_EFL;
548 DESC_FUCOMIP_T_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_CHECK_O + DESC_CO + DESC_STORE_EFL + DESC_COA + DESC_POP_FPU;
549 DESC_FUCOMP = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_CO + DESC_CHECK_O + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
550 DESC_FUCOMP_I = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_I + DESC_CO + DESC_CHECK_O + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU;
551 DESC_FUCOMPP = DESC_CMP + DESC_ST_0 + DESC_WI + DESC_ST_1 + DESC_CO + DESC_CHECK_O + DESC_CO + DESC_STORE_FSW + DESC_COA + DESC_POP_FPU + DESC_2X;
552 DESC_SAHF = DESC_STR + 'AH' + DESC_INT + DESC_EFL;
553 DESC_FWAIT = DESC_CHK + DESC_PU_FP_E;
554 DESC_FXAM = DESC_CLA + DESC_VAL + DESC_OR + 'number' + DESC_IN + DESC_ST_0;
555 DESC_FXCH = DESC_XCH + DESC_CON + DESC_ST_0 + DESC_AN + DESC_ST_1;
556 DESC_FXCH_I = DESC_XCH + DESC_CON + DESC_ST_0 + DESC_AN + DESC_ST_I;
557 DESC_FXTRACT = DESC_SPR + DESC_VAL + DESC_IN + DESC_ST_0 + DESC_INT + DESC_EXP + DESC_AN + DESC_SIG + DESC_CO + DESC_STO + DESC_EXP + DESC_IN + DESC_ST_0 + DESC_COA + DESC_PUSH + ' ' + DESC_TH + DESC_SIG + DESC_ONT + DESC_FPU_S;
558 DESC_FYL2X = DESC_REP + DESC_ST_1 + DESC_WI + '(' + DESC_ST_1 + ' * ' + 'log_2(' + DESC_ST_0 + '))' + DESC_AN + DESC_POP_FPU;
559 DESC_FYL2XP1 = DESC_REP + DESC_ST_1 + DESC_WI + '(' + DESC_ST_1 + ' * ' + 'log_2(' + DESC_ST_0 + ' + 1.0))' + DESC_AN + DESC_POP_FPU;
560 DESC_JMP = DESC_JM + DESC_TO + DESC_ADDR;
561 DESC_JA = DESC_JMP + DESC_A_L;
562 DESC_JAE = DESC_JMP + DESC_AE_L;
563 DESC_JB = DESC_JMP + DESC_B_L;
564 DESC_JBE = DESC_JMP + DESC_BE_L;
565 DESC_JC = DESC_JMP + DESC_C_L;
566 DESC_JE = DESC_JMP + DESC_E_L;
567 DESC_JG = DESC_JMP + DESC_C_L;
568 DESC_JGE = DESC_JMP + DESC_GE_L;
569 DESC_JL = DESC_JMP + DESC_L_L;
570 DESC_JLE = DESC_JMP + DESC_LE_L;
571 DESC_JNA = DESC_JMP + DESC_NA_L;
572 DESC_JNAE = DESC_JMP + DESC_NAE_L;
573 DESC_JNB = DESC_JMP + DESC_NB_L;
574 DESC_JNBE = DESC_JMP + DESC_NBE_L;
575 DESC_JNC = DESC_JMP + DESC_NC_L;
576 DESC_JNE = DESC_JMP + DESC_NE_L;
577 DESC_JNG = DESC_JMP + DESC_NG_L;
578 DESC_JNGE = DESC_JMP + DESC_NGE_L;
579 DESC_JNL = DESC_JMP + DESC_NL_L;
580 DESC_JNLE = DESC_JMP + DESC_NLE_L;
581 DESC_JNO = DESC_JMP + DESC_NO_L;
582 DESC_JNP = DESC_JMP + DESC_NP_L;
583 DESC_JNS = DESC_JMP + DESC_NS_L;
584 DESC_JNZ = DESC_JMP + DESC_NZ_L;
585 DESC_JO = DESC_JMP + DESC_O_L;
586 DESC_JP = DESC_JMP + DESC_P_L;
587 DESC_JPE = DESC_JMP + DESC_PE_L;
588 DESC_JPO = DESC_JMP + DESC_PO_L;
589 DESC_JS = DESC_JMP + DESC_S_L;
590 DESC_JZ = DESC_JMP + DESC_Z_L;
592 { Operands Description }
594 DESC_OPER_ERROR = 'Error';
595 DESC_OPER_NONE = 'No Operands';
596 DESC_OPER_ST_0 = DESC_ST_0;
597 DESC_OPER_ST_I = DESC_ST_I;
598 DESC_OPER_AX = DESC_AX;
599 DESC_OPER_M16_INT = DESC_WORD;
600 DESC_OPER_M32_INT = DESC_DWORD;
601 DESC_OPER_M64_INT = DESC_QWORD;
602 DESC_OPER_ADDR = DESC_ADDR;
603 DESC_OPER_M80_BCD = DESC_BCD;
604 DESC_OPER_M32_FP = DESC_SINGLE;
605 DESC_OPER_M64_FP = DESC_DOUBLE;
606 DESC_OPER_M80_FP = DESC_EXTEND;
607 DESC_OPER_M2BYTE_CW = DESC_CW;
608 DESC_OPER_M2BYTE_SW = DESC_SW;
609 DESC_OPER_M14BYTE_ENV = DESC_ENV_14;
610 DESC_OPER_M28BYTE_ENV = DESC_ENV_28;
611 DESC_OPER_M94BYTE_STAT = DESC_STAT_94;
612 DESC_OPER_M108BYTE_STAT = DESC_STAT_108;
614 { Operands Default Values }
616 DEFV_M16_INT = #$00#$00;
617 DEFV_M32_INT = #$00#$00#$00#$00;
618 DEFV_M64_INT = #$00#$00#$00#$00#$00#$00#$00#$00;
619 DEFV_M80_BCD = #$00#$00#$00#$00#$00#$00#$00#$00#$00#$00;
620 DEFV_M32_FP = #$00#$00#$00#$00;
621 DEFV_M64_FP = #$00#$00#$00#$00#$00#$00#$00#$00;
622 DEFV_M80_FP = #$00#$00#$00#$00#$00#$00#$00#$00#$00#$00;
623 DEFV_M2BYTE_CW = #$00#$00;
624 DEFV_M2BYTE_SW = #$00#$00;
625 DEFV_M14BYTE_ENV = #$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00;
626 DEFV_M28BYTE_ENV = DEFV_M14BYTE_ENV + DEFV_M14BYTE_ENV;
627 DEFV_M94BYTE_STAT = DEFV_M28BYTE_ENV + DEFV_M28BYTE_ENV + DEFV_M28BYTE_ENV + DEFV_M80_BCD;
628 DEFV_M108BYTE_STAT = DEFV_M94BYTE_STAT + DEFV_M14BYTE_ENV;
630 { Jump Instructions Code Constants }
631 JMP_RESULT_1 = #$C7#$44#$24#$04#$01#$00#$00#$00;
632 JCC_SHARED = #$02#$EB#$08 + JMP_RESULT_1;
636 { Instructions Definition }
638 sInstructions: array [0..222] of TInstructionRecord = (
639 (Name: 'F2XM1' + FP_X; Code: #$D9#$F0; Description: DESC_F2XM1; Branch: BRANCH_NORMAL),
640 (Name: 'FABS' + FP_X; Code: #$D9#$E1; Description: DESC_FABS; Branch: BRANCH_NORMAL),
641 (Name: 'FADD' + FP_S; Code: #$D8#$00; Description: DESC_FADD_S; Branch: BRANCH_NORMAL),
642 (Name: 'FADD' + FP_D; Code: #$DC#$00; Description: DESC_FADD_D; Branch: BRANCH_NORMAL),
643 (Name: 'FADD' + FP_T + FP_T; Code: #$D8#$C0; Description: DESC_FADD_T_I; Branch: BRANCH_NORMAL),
644 (Name: 'FADD' + FP_T + FP_I; Code: #$D8#$C0; Description: DESC_FADD_T_I; Branch: BRANCH_NORMAL),
645 (Name: 'FADD' + FP_I + FP_T; Code: #$DC#$C0; Description: DESC_FADD_I_T; Branch: BRANCH_NORMAL),
646 (Name: 'FADDP' + FP_X; Code: #$DE#$C1; Description: DESC_FADDP; Branch: BRANCH_NORMAL),
647 (Name: 'FADDP' + FP_T + FP_T; Code: #$DE#$C0; Description: DESC_FADDP_I_T; Branch: BRANCH_NORMAL),
648 (Name: 'FADDP' + FP_I + FP_T; Code: #$DE#$C0; Description: DESC_FADDP_I_T; Branch: BRANCH_NORMAL),
649 (Name: 'FBLD' + FP_0; Code: #$DF#$20; Description: DESC_FBLD_0; Branch: BRANCH_NORMAL),
650 (Name: 'FBSTP' + FP_0; Code: #$DF#$30; Description: DESC_FBSTP_0; Branch: BRANCH_NORMAL),
651 (Name: 'FCHS' + FP_X; Code: #$D9#$E0; Description: DESC_FCHS; Branch: BRANCH_NORMAL),
652 (Name: 'FCLEX' + FP_X; Code: #$9B#$DB#$E2; Description: DESC_FCLEX; Branch: BRANCH_NORMAL),
653 (Name: 'FCMOVB' + FP_T + FP_T; Code: #$DA#$C0; Description: DESC_FCMOVB_T_I; Branch: BRANCH_NORMAL),
654 (Name: 'FCMOVB' + FP_T + FP_I; Code: #$DA#$C0; Description: DESC_FCMOVB_T_I; Branch: BRANCH_NORMAL),
655 (Name: 'FCMOVBE' + FP_T + FP_T; Code: #$DA#$D0; Description: DESC_FCMOVBE_T_I; Branch: BRANCH_NORMAL),
656 (Name: 'FCMOVBE' + FP_T + FP_I; Code: #$DA#$D0; Description: DESC_FCMOVBE_T_I; Branch: BRANCH_NORMAL),
657 (Name: 'FCMOVE' + FP_T + FP_T; Code: #$DA#$C8; Description: DESC_FCMOVE_T_I; Branch: BRANCH_NORMAL),
658 (Name: 'FCMOVE' + FP_T + FP_I; Code: #$DA#$C8; Description: DESC_FCMOVE_T_I; Branch: BRANCH_NORMAL),
659 (Name: 'FCMOVNB' + FP_T + FP_T; Code: #$DB#$C0; Description: DESC_FCMOVNB_T_I; Branch: BRANCH_NORMAL),
660 (Name: 'FCMOVNB' + FP_T + FP_I; Code: #$DB#$C0; Description: DESC_FCMOVNB_T_I; Branch: BRANCH_NORMAL),
661 (Name: 'FCMOVNBE' + FP_T + FP_T; Code: #$DB#$D0; Description: DESC_FCMOVNBE_T_I; Branch: BRANCH_NORMAL),
662 (Name: 'FCMOVNBE' + FP_T + FP_I; Code: #$DB#$D0; Description: DESC_FCMOVNBE_T_I; Branch: BRANCH_NORMAL),
663 (Name: 'FCMOVNE' + FP_T + FP_T; Code: #$DB#$C8; Description: DESC_FCMOVNE_T_I; Branch: BRANCH_NORMAL),
664 (Name: 'FCMOVNE' + FP_T + FP_I; Code: #$DB#$C8; Description: DESC_FCMOVNE_T_I; Branch: BRANCH_NORMAL),
665 (Name: 'FCMOVNU' + FP_T + FP_T; Code: #$DB#$D8; Description: DESC_FCMOVNU_T_I; Branch: BRANCH_NORMAL),
666 (Name: 'FCMOVNU' + FP_T + FP_I; Code: #$DB#$D8; Description: DESC_FCMOVNU_T_I; Branch: BRANCH_NORMAL),
667 (Name: 'FCMOVU' + FP_T + FP_T; Code: #$DA#$D8; Description: DESC_FCMOVU_T_I; Branch: BRANCH_NORMAL),
668 (Name: 'FCMOVU' + FP_T + FP_I; Code: #$DA#$D8; Description: DESC_FCMOVU_T_I; Branch: BRANCH_NORMAL),
669 (Name: 'FCOM' + FP_X; Code: #$D8#$D1; Description: DESC_FCOM; Branch: BRANCH_NORMAL),
670 (Name: 'FCOM' + FP_S; Code: #$D8#$10; Description: DESC_FCOM_S; Branch: BRANCH_NORMAL),
671 (Name: 'FCOM' + FP_D; Code: #$DC#$10; Description: DESC_FCOM_D; Branch: BRANCH_NORMAL),
672 (Name: 'FCOM' + FP_T; Code: #$D8#$D0; Description: DESC_FCOM_I; Branch: BRANCH_NORMAL),
673 (Name: 'FCOM' + FP_I; Code: #$D8#$D0; Description: DESC_FCOM_I; Branch: BRANCH_NORMAL),
674 (Name: 'FCOMI' + FP_T + FP_T; Code: #$DB#$F0; Description: DESC_FCOMI_T_I; Branch: BRANCH_NORMAL),
675 (Name: 'FCOMI' + FP_T + FP_I; Code: #$DB#$F0; Description: DESC_FCOMI_T_I; Branch: BRANCH_NORMAL),
676 (Name: 'FCOMIP' + FP_T + FP_T; Code: #$DF#$F0; Description: DESC_FCOMIP_T_I; Branch: BRANCH_NORMAL),
677 (Name: 'FCOMIP' + FP_T + FP_I; Code: #$DF#$F0; Description: DESC_FCOMIP_T_I; Branch: BRANCH_NORMAL),
678 (Name: 'FCOMP' + FP_X; Code: #$D8#$D9; Description: DESC_FCOMP; Branch: BRANCH_NORMAL),
679 (Name: 'FCOMP' + FP_S; Code: #$D8#$18; Description: DESC_FCOMP_S; Branch: BRANCH_NORMAL),
680 (Name: 'FCOMP' + FP_D; Code: #$DC#$18; Description: DESC_FCOMP_D; Branch: BRANCH_NORMAL),
681 (Name: 'FCOMP' + FP_T; Code: #$D8#$D8; Description: DESC_FCOMP_I; Branch: BRANCH_NORMAL),
682 (Name: 'FCOMP' + FP_I; Code: #$D8#$D8; Description: DESC_FCOMP_I; Branch: BRANCH_NORMAL),
683 (Name: 'FCOMPP' + FP_X; Code: #$DE#$D9; Description: DESC_FCOMPP; Branch: BRANCH_NORMAL),
684 (Name: 'FCOS' + FP_X; Code: #$D9#$FF; Description: DESC_FCOS; Branch: BRANCH_NORMAL),
685 (Name: 'FDECSTP' + FP_X; Code: #$D9#$F6; Description: DESC_FDECSTP; Branch: BRANCH_NORMAL),
686 (Name: 'FDIV' + FP_S; Code: #$D8#$30; Description: DESC_FDIV_S; Branch: BRANCH_NORMAL),
687 (Name: 'FDIV' + FP_D; Code: #$DC#$30; Description: DESC_FDIV_D; Branch: BRANCH_NORMAL),
688 (Name: 'FDIV' + FP_T + FP_T; Code: #$D8#$F0; Description: DESC_FDIV_T_I; Branch: BRANCH_NORMAL),
689 (Name: 'FDIV' + FP_T + FP_I; Code: #$D8#$F0; Description: DESC_FDIV_T_I; Branch: BRANCH_NORMAL),
690 (Name: 'FDIV' + FP_I + FP_T; Code: #$DC#$F8; Description: DESC_FDIV_I_T; Branch: BRANCH_NORMAL),
691 (Name: 'FDIVP' + FP_X; Code: #$DE#$F9; Description: DESC_FDIVP; Branch: BRANCH_NORMAL),
692 (Name: 'FDIVP' + FP_T + FP_T; Code: #$DE#$F8; Description: DESC_FDIVP_I_T; Branch: BRANCH_NORMAL),
693 (Name: 'FDIVP' + FP_I + FP_T; Code: #$DE#$F8; Description: DESC_FDIVP_I_T; Branch: BRANCH_NORMAL),
694 (Name: 'FDIVR' + FP_S; Code: #$D8#$38; Description: DESC_FDIVR_S; Branch: BRANCH_NORMAL),
695 (Name: 'FDIVR' + FP_D; Code: #$DC#$38; Description: DESC_FDIVR_D; Branch: BRANCH_NORMAL),
696 (Name: 'FDIVR' + FP_T + FP_T; Code: #$D8#$F8; Description: DESC_FDIVR_T_I; Branch: BRANCH_NORMAL),
697 (Name: 'FDIVR' + FP_T + FP_I; Code: #$D8#$F8; Description: DESC_FDIVR_T_I; Branch: BRANCH_NORMAL),
698 (Name: 'FDIVR' + FP_I + FP_T; Code: #$DC#$F0; Description: DESC_FDIVR_I_T; Branch: BRANCH_NORMAL),
699 (Name: 'FDIVRP' + FP_X; Code: #$DE#$F1; Description: DESC_FDIVRP; Branch: BRANCH_NORMAL),
700 (Name: 'FDIVRP' + FP_T + FP_T; Code: #$DE#$F0; Description: DESC_FDIVRP_I_T; Branch: BRANCH_NORMAL),
701 (Name: 'FDIVRP' + FP_I + FP_T; Code: #$DE#$F0; Description: DESC_FDIVRP_I_T; Branch: BRANCH_NORMAL),
702 (Name: 'FFREE' + FP_T; Code: #$DD#$C0; Description: DESC_FFREE_I; Branch: BRANCH_NORMAL),
703 (Name: 'FFREE' + FP_I; Code: #$DD#$C0; Description: DESC_FFREE_I; Branch: BRANCH_NORMAL),
704 (Name: 'FIADD' + FP_2; Code: #$DE#$00; Description: DESC_FIADD_2; Branch: BRANCH_NORMAL),
705 (Name: 'FIADD' + FP_4; Code: #$DA#$00; Description: DESC_FIADD_4; Branch: BRANCH_NORMAL),
706 (Name: 'FICOM' + FP_2; Code: #$DE#$10; Description: DESC_FICOM_2; Branch: BRANCH_NORMAL),
707 (Name: 'FICOM' + FP_4; Code: #$DA#$10; Description: DESC_FICOM_4; Branch: BRANCH_NORMAL),
708 (Name: 'FICOMP' + FP_2; Code: #$DE#$18; Description: DESC_FICOMP_2; Branch: BRANCH_NORMAL),
709 (Name: 'FICOMP' + FP_4; Code: #$DA#$18; Description: DESC_FICOMP_4; Branch: BRANCH_NORMAL),
710 (Name: 'FIDIV' + FP_2; Code: #$DE#$30; Description: DESC_FIDIV_2; Branch: BRANCH_NORMAL),
711 (Name: 'FIDIV' + FP_4; Code: #$DA#$30; Description: DESC_FIDIV_4; Branch: BRANCH_NORMAL),
712 (Name: 'FIDIVR' + FP_2; Code: #$DE#$38; Description: DESC_FIDIVR_2; Branch: BRANCH_NORMAL),
713 (Name: 'FIDIVR' + FP_4; Code: #$DA#$38; Description: DESC_FIDIVR_4; Branch: BRANCH_NORMAL),
714 (Name: 'FILD' + FP_2; Code: #$DF#$00; Description: DESC_FILD_2; Branch: BRANCH_NORMAL),
715 (Name: 'FILD' + FP_4; Code: #$DB#$00; Description: DESC_FILD_4; Branch: BRANCH_NORMAL),
716 (Name: 'FILD' + FP_8; Code: #$DF#$28; Description: DESC_FILD_8; Branch: BRANCH_NORMAL),
717 (Name: 'FINCSTP' + FP_X; Code: #$D9#$F7; Description: DESC_FINCSTP; Branch: BRANCH_NORMAL),
718 (Name: 'FINIT' + FP_X; Code: #$9B#$DB#$E3; Description: DESC_FINIT; Branch: BRANCH_NORMAL),
719 (Name: 'FIST' + FP_2; Code: #$DF#$10; Description: DESC_FIST_2; Branch: BRANCH_NORMAL),
720 (Name: 'FIST' + FP_4; Code: #$DB#$10; Description: DESC_FIST_4; Branch: BRANCH_NORMAL),
721 (Name: 'FISTP' + FP_2; Code: #$DF#$18; Description: DESC_FISTP_2; Branch: BRANCH_NORMAL),
722 (Name: 'FISTP' + FP_4; Code: #$DB#$18; Description: DESC_FISTP_4; Branch: BRANCH_NORMAL),
723 (Name: 'FISTP' + FP_8; Code: #$DF#$38; Description: DESC_FISTP_8; Branch: BRANCH_NORMAL),
724 (Name: 'FISTTP' + FP_2; Code: #$DF#$08; Description: DESC_FISTTP_2; Branch: BRANCH_NORMAL),
725 (Name: 'FISTTP' + FP_4; Code: #$DB#$08; Description: DESC_FISTTP_4; Branch: BRANCH_NORMAL),
726 (Name: 'FISTTP' + FP_8; Code: #$DD#$08; Description: DESC_FISTTP_8; Branch: BRANCH_NORMAL),
727 (Name: 'FISUB' + FP_2; Code: #$DE#$20; Description: DESC_FISUB_2; Branch: BRANCH_NORMAL),
728 (Name: 'FISUB' + FP_4; Code: #$DA#$20; Description: DESC_FISUB_4; Branch: BRANCH_NORMAL),
729 (Name: 'FISUBR' + FP_2; Code: #$DE#$28; Description: DESC_FISUBR_2; Branch: BRANCH_NORMAL),
730 (Name: 'FISUBR' + FP_4; Code: #$DA#$28; Description: DESC_FISUBR_4; Branch: BRANCH_NORMAL),
731 (Name: 'FLD' + FP_S; Code: #$D9#$00; Description: DESC_FLD_S; Branch: BRANCH_NORMAL),
732 (Name: 'FLD' + FP_D; Code: #$DD#$00; Description: DESC_FLD_D; Branch: BRANCH_NORMAL),
733 (Name: 'FLD' + FP_E; Code: #$DB#$28; Description: DESC_FLD_E; Branch: BRANCH_NORMAL),
734 (Name: 'FLD' + FP_T; Code: #$D9#$C0; Description: DESC_FLD_I; Branch: BRANCH_NORMAL),
735 (Name: 'FLD' + FP_I; Code: #$D9#$C0; Description: DESC_FLD_I; Branch: BRANCH_NORMAL),
736 (Name: 'FLD1' + FP_X; Code: #$D9#$E8; Description: DESC_FLD1; Branch: BRANCH_NORMAL),
737 (Name: 'FLDCW' + FP_C; Code: #$D9#$28; Description: DESC_FLDCW_C; Branch: BRANCH_NORMAL),
738 (Name: 'FLDENV' + FP_14; Code: #$66#$D9#$20; Description: DESC_FLDENV_14; Branch: BRANCH_NORMAL),
739 (Name: 'FLDENV' + FP_28; Code: #$D9#$20; Description: DESC_FLDENV_28; Branch: BRANCH_NORMAL),
740 (Name: 'FLDL2E' + FP_X; Code: #$D9#$EA; Description: DESC_FLDL2E; Branch: BRANCH_NORMAL),
741 (Name: 'FLDL2T' + FP_X; Code: #$D9#$E9; Description: DESC_FLDL2T; Branch: BRANCH_NORMAL),
742 (Name: 'FLDLG2' + FP_X; Code: #$D9#$EC; Description: DESC_FLDLG2; Branch: BRANCH_NORMAL),
743 (Name: 'FLDLN2' + FP_X; Code: #$D9#$ED; Description: DESC_FLDLN2; Branch: BRANCH_NORMAL),
744 (Name: 'FLDPI' + FP_X; Code: #$D9#$EB; Description: DESC_FLDPI; Branch: BRANCH_NORMAL),
745 (Name: 'FLDZ' + FP_X; Code: #$D9#$EE; Description: DESC_FLDZ; Branch: BRANCH_NORMAL),
746 (Name: 'FMUL' + FP_S; Code: #$D8#$08; Description: DESC_FMUL_S; Branch: BRANCH_NORMAL),
747 (Name: 'FMUL' + FP_D; Code: #$DC#$08; Description: DESC_FMUL_D; Branch: BRANCH_NORMAL),
748 (Name: 'FMUL' + FP_T + FP_T; Code: #$D8#$C8; Description: DESC_FMUL_T_I; Branch: BRANCH_NORMAL),
749 (Name: 'FMUL' + FP_T + FP_I; Code: #$D8#$C8; Description: DESC_FMUL_T_I; Branch: BRANCH_NORMAL),
750 (Name: 'FMUL' + FP_I + FP_T; Code: #$DC#$C8; Description: DESC_FMUL_I_T; Branch: BRANCH_NORMAL),
751 (Name: 'FMULP' + FP_T + FP_T; Code: #$DE#$C8; Description: DESC_FMULP_I_T; Branch: BRANCH_NORMAL),
752 (Name: 'FMULP' + FP_I + FP_T; Code: #$DE#$C8; Description: DESC_FMULP_I_T; Branch: BRANCH_NORMAL),
753 (Name: 'FMULP' + FP_X; Code: #$DE#$C9; Description: DESC_FMULP; Branch: BRANCH_NORMAL),
754 (Name: 'FIMUL' + FP_2; Code: #$DE#$08; Description: DESC_FIMUL_2; Branch: BRANCH_NORMAL),
755 (Name: 'FIMUL' + FP_4; Code: #$DA#$08; Description: DESC_FIMUL_4; Branch: BRANCH_NORMAL),
756 (Name: 'FNCLEX' + FP_X; Code: #$DB#$E2; Description: DESC_FNCLEX; Branch: BRANCH_NORMAL),
757 (Name: 'FNINIT' + FP_X; Code: #$DB#$E3; Description: DESC_FNINIT; Branch: BRANCH_NORMAL),
758 (Name: 'FNOP' + FP_X; Code: #$D9#$D0; Description: DESC_FNOP; Branch: BRANCH_NORMAL),
759 (Name: 'FNSAVE' + FP_94; Code: #$66#$DD#$30; Description: DESC_FNSAVE_94; Branch: BRANCH_NORMAL),
760 (Name: 'FNSAVE' + FP_108; Code: #$DD#$30; Description: DESC_FNSAVE_108; Branch: BRANCH_NORMAL),
761 (Name: 'FNSTCW' + FP_C; Code: #$D9#$38; Description: DESC_FNSTCW_C; Branch: BRANCH_NORMAL),
762 (Name: 'FNSTENV' + FP_14; Code: #$66#$D9#$30; Description: DESC_FNSTENV_14; Branch: BRANCH_NORMAL),
763 (Name: 'FNSTENV' + FP_28; Code: #$D9#$30; Description: DESC_FNSTENV_28; Branch: BRANCH_NORMAL),
764 (Name: 'FNSTSW' + FP_W; Code: #$DD#$38; Description: DESC_FNSTSW_W; Branch: BRANCH_NORMAL),
765 (Name: 'FNSTSW' + FP_AX; Code: #$DF#$E0; Description: DESC_FNSTSW_AX; Branch: BRANCH_NORMAL),
766 (Name: 'FPATAN' + FP_X; Code: #$D9#$F3; Description: DESC_FPATAN; Branch: BRANCH_NORMAL),
767 (Name: 'FPREM' + FP_X; Code: #$D9#$F8; Description: DESC_FPREM; Branch: BRANCH_NORMAL),
768 (Name: 'FPREM1' + FP_X; Code: #$D9#$F5; Description: DESC_FPREM1; Branch: BRANCH_NORMAL),
769 (Name: 'FPTAN' + FP_X; Code: #$D9#$F2; Description: DESC_FPTAN; Branch: BRANCH_NORMAL),
770 (Name: 'FRNDINT' + FP_X; Code: #$D9#$FC; Description: DESC_FRNDINT; Branch: BRANCH_NORMAL),
771 (Name: 'FRSTOR' + FP_94; Code: #$66#$DD#$20; Description: DESC_FRSTOR_94; Branch: BRANCH_NORMAL),
772 (Name: 'FRSTOR' + FP_108; Code: #$DD#$20; Description: DESC_FRSTOR_108; Branch: BRANCH_NORMAL),
773 (Name: 'FSAVE' + FP_94; Code: #$9B#$66#$DD#$30; Description: DESC_FSAVE_94; Branch: BRANCH_NORMAL),
774 (Name: 'FSAVE' + FP_108; Code: #$9B#$DD#$30; Description: DESC_FSAVE_108; Branch: BRANCH_NORMAL),
775 (Name: 'FSCALE' + FP_X; Code: #$D9#$FD; Description: DESC_FSCALE; Branch: BRANCH_NORMAL),
776 (Name: 'FSIN' + FP_X; Code: #$D9#$FE; Description: DESC_FSIN; Branch: BRANCH_NORMAL),
777 (Name: 'FSINCOS' + FP_X; Code: #$D9#$FB; Description: DESC_FSINCOS; Branch: BRANCH_NORMAL),
778 (Name: 'FSQRT' + FP_X; Code: #$D9#$FA; Description: DESC_FSQRT; Branch: BRANCH_NORMAL),
779 (Name: 'FST' + FP_S; Code: #$D9#$10; Description: DESC_FST_S; Branch: BRANCH_NORMAL),
780 (Name: 'FST' + FP_D; Code: #$DD#$10; Description: DESC_FST_D; Branch: BRANCH_NORMAL),
781 (Name: 'FST' + FP_T; Code: #$DD#$D0; Description: DESC_FST_I; Branch: BRANCH_NORMAL),
782 (Name: 'FST' + FP_I; Code: #$DD#$D0; Description: DESC_FST_I; Branch: BRANCH_NORMAL),
783 (Name: 'FSTCW' + FP_C; Code: #$9B#$D9#$38; Description: DESC_FSTCW_C; Branch: BRANCH_NORMAL),
784 (Name: 'FSTENV' + FP_14; Code: #$9B#$66#$D9#$30; Description: DESC_FSTENV_14; Branch: BRANCH_NORMAL),
785 (Name: 'FSTENV' + FP_28; Code: #$9B#$D9#$30; Description: DESC_FSTENV_28; Branch: BRANCH_NORMAL),
786 (Name: 'FSTP' + FP_S; Code: #$D9#$18; Description: DESC_FSTP_S; Branch: BRANCH_NORMAL),
787 (Name: 'FSTP' + FP_D; Code: #$DD#$18; Description: DESC_FSTP_D; Branch: BRANCH_NORMAL),
788 (Name: 'FSTP' + FP_E; Code: #$DB#$38; Description: DESC_FSTP_E; Branch: BRANCH_NORMAL),
789 (Name: 'FSTP' + FP_T; Code: #$DD#$D8; Description: DESC_FSTP_I; Branch: BRANCH_NORMAL),
790 (Name: 'FSTP' + FP_I; Code: #$DD#$D8; Description: DESC_FSTP_I; Branch: BRANCH_NORMAL),
791 (Name: 'FSTSW' + FP_W; Code: #$9B#$DD#$38; Description: DESC_FSTSW_W; Branch: BRANCH_NORMAL),
792 (Name: 'FSTSW' + FP_AX; Code: #$9B#$DF#$E0; Description: DESC_FSTSW_AX; Branch: BRANCH_NORMAL),
793 (Name: 'FSUB' + FP_S; Code: #$D8#$20; Description: DESC_FSUB_S; Branch: BRANCH_NORMAL),
794 (Name: 'FSUB' + FP_D; Code: #$DC#$20; Description: DESC_FSUB_D; Branch: BRANCH_NORMAL),
795 (Name: 'FSUB' + FP_T + FP_T; Code: #$D8#$E0; Description: DESC_FSUB_T_I; Branch: BRANCH_NORMAL),
796 (Name: 'FSUB' + FP_T + FP_I; Code: #$D8#$E0; Description: DESC_FSUB_T_I; Branch: BRANCH_NORMAL),
797 (Name: 'FSUB' + FP_I + FP_T; Code: #$DC#$E8; Description: DESC_FSUB_I_T; Branch: BRANCH_NORMAL),
798 (Name: 'FSUBP' + FP_T + FP_T; Code: #$DE#$E8; Description: DESC_FSUBP_I_T; Branch: BRANCH_NORMAL),
799 (Name: 'FSUBP' + FP_I + FP_T; Code: #$DE#$E8; Description: DESC_FSUBP_I_T; Branch: BRANCH_NORMAL),
800 (Name: 'FSUBP' + FP_X; Code: #$DE#$E9; Description: DESC_FSUBP; Branch: BRANCH_NORMAL),
801 (Name: 'FSUBR' + FP_S; Code: #$D8#$28; Description: DESC_FSUBR_S; Branch: BRANCH_NORMAL),
802 (Name: 'FSUBR' + FP_D; Code: #$DC#$28; Description: DESC_FSUBR_D; Branch: BRANCH_NORMAL),
803 (Name: 'FSUBR' + FP_T + FP_T; Code: #$D8#$E8; Description: DESC_FSUBR_T_I; Branch: BRANCH_NORMAL),
804 (Name: 'FSUBR' + FP_T + FP_I; Code: #$D8#$E8; Description: DESC_FSUBR_T_I; Branch: BRANCH_NORMAL),
805 (Name: 'FSUBR' + FP_I + FP_T; Code: #$DC#$E0; Description: DESC_FSUBR_I_T; Branch: BRANCH_NORMAL),
806 (Name: 'FSUBRP' + FP_X; Code: #$DE#$E1; Description: DESC_FSUBRP; Branch: BRANCH_NORMAL),
807 (Name: 'FSUBRP' + FP_T + FP_T; Code: #$DE#$E0; Description: DESC_FSUBRP_I_T; Branch: BRANCH_NORMAL),
808 (Name: 'FSUBRP' + FP_I + FP_T; Code: #$DE#$E0; Description: DESC_FSUBRP_I_T; Branch: BRANCH_NORMAL),
809 (Name: 'FTST' + FP_X; Code: #$D9#$E4; Description: DESC_FTST; Branch: BRANCH_NORMAL),
810 (Name: 'FUCOM' + FP_X; Code: #$DD#$E1; Description: DESC_FUCOM; Branch: BRANCH_NORMAL),
811 (Name: 'FUCOM' + FP_T; Code: #$DD#$E0; Description: DESC_FUCOM_I; Branch: BRANCH_NORMAL),
812 (Name: 'FUCOM' + FP_I; Code: #$DD#$E0; Description: DESC_FUCOM_I; Branch: BRANCH_NORMAL),
813 (Name: 'FUCOMI' + FP_T + FP_T; Code: #$DB#$E8; Description: DESC_FUCOMI_T_I; Branch: BRANCH_NORMAL),
814 (Name: 'FUCOMI' + FP_T + FP_I; Code: #$DB#$E8; Description: DESC_FUCOMI_T_I; Branch: BRANCH_NORMAL),
815 (Name: 'FUCOMIP' + FP_T + FP_T; Code: #$DF#$E8; Description: DESC_FUCOMIP_T_I; Branch: BRANCH_NORMAL),
816 (Name: 'FUCOMIP' + FP_T + FP_I; Code: #$DF#$E8; Description: DESC_FUCOMIP_T_I; Branch: BRANCH_NORMAL),
817 (Name: 'FUCOMP' + FP_X; Code: #$DD#$E9; Description: DESC_FUCOMP; Branch: BRANCH_NORMAL),
818 (Name: 'FUCOMP' + FP_T; Code: #$DD#$E8; Description: DESC_FUCOMP_I; Branch: BRANCH_NORMAL),
819 (Name: 'FUCOMP' + FP_I; Code: #$DD#$E8; Description: DESC_FUCOMP_I; Branch: BRANCH_NORMAL),
820 (Name: 'FUCOMPP' + FP_X; Code: #$DA#$E9; Description: DESC_FUCOMPP; Branch: BRANCH_NORMAL),
821 (Name: 'FWAIT' + FP_X; Code: #$9B; Description: DESC_FWAIT; Branch: BRANCH_NORMAL),
822 (Name: 'FXAM' + FP_X; Code: #$D9#$E5; Description: DESC_FXAM; Branch: BRANCH_NORMAL),
823 (Name: 'FXCH' + FP_X; Code: #$D9#$C9; Description: DESC_FXCH; Branch: BRANCH_NORMAL),
824 (Name: 'FXCH' + FP_T; Code: #$D9#$C8; Description: DESC_FXCH_I; Branch: BRANCH_NORMAL),
825 (Name: 'FXCH' + FP_I; Code: #$D9#$C8; Description: DESC_FXCH_I; Branch: BRANCH_NORMAL),
826 (Name: 'FXTRACT' + FP_X; Code: #$D9#$F4; Description: DESC_FXTRACT; Branch: BRANCH_NORMAL),
827 (Name: 'FYL2X' + FP_X; Code: #$D9#$F1; Description: DESC_FYL2X; Branch: BRANCH_NORMAL),
828 (Name: 'FYL2XP1' + FP_X; Code: #$D9#$F9; Description: DESC_FYL2XP1; Branch: BRANCH_NORMAL),
829 (Name: 'JA' + FP_ADDR; Code: #$77 + JCC_SHARED; Description: DESC_JA; Branch: BRANCH_BRANCH),
830 (Name: 'JAE' + FP_ADDR; Code: #$73 + JCC_SHARED; Description: DESC_JAE; Branch: BRANCH_BRANCH),
831 (Name: 'JB' + FP_ADDR; Code: #$72 + JCC_SHARED; Description: DESC_JB; Branch: BRANCH_BRANCH),
832 (Name: 'JBE' + FP_ADDR; Code: #$76 + JCC_SHARED; Description: DESC_JBE; Branch: BRANCH_BRANCH),
833 (Name: 'JC' + FP_ADDR; Code: #$72 + JCC_SHARED; Description: DESC_JC; Branch: BRANCH_BRANCH),
834 (Name: 'JE' + FP_ADDR; Code: #$74 + JCC_SHARED; Description: DESC_JE; Branch: BRANCH_BRANCH),
835 (Name: 'JG' + FP_ADDR; Code: #$7F + JCC_SHARED; Description: DESC_JG; Branch: BRANCH_BRANCH),
836 (Name: 'JGE' + FP_ADDR; Code: #$7D + JCC_SHARED; Description: DESC_JGE; Branch: BRANCH_BRANCH),
837 (Name: 'JL' + FP_ADDR; Code: #$7C + JCC_SHARED; Description: DESC_JL; Branch: BRANCH_BRANCH),
838 (Name: 'JLE' + FP_ADDR; Code: #$7E + JCC_SHARED; Description: DESC_JLE; Branch: BRANCH_BRANCH),
839 (Name: 'JMP' + FP_ADDR; Code: JMP_RESULT_1; Description: DESC_JMP; Branch: BRANCH_BRANCH),
840 (Name: 'JNA' + FP_ADDR; Code: #$76 + JCC_SHARED; Description: DESC_JNA; Branch: BRANCH_BRANCH),
841 (Name: 'JNAE' + FP_ADDR; Code: #$72 + JCC_SHARED; Description: DESC_JNAE; Branch: BRANCH_BRANCH),
842 (Name: 'JNB' + FP_ADDR; Code: #$73 + JCC_SHARED; Description: DESC_JNB; Branch: BRANCH_BRANCH),
843 (Name: 'JNBE' + FP_ADDR; Code: #$77 + JCC_SHARED; Description: DESC_JNBE; Branch: BRANCH_BRANCH),
844 (Name: 'JNC' + FP_ADDR; Code: #$73 + JCC_SHARED; Description: DESC_JNC; Branch: BRANCH_BRANCH),
845 (Name: 'JNE' + FP_ADDR; Code: #$75 + JCC_SHARED; Description: DESC_JNE; Branch: BRANCH_BRANCH),
846 (Name: 'JNG' + FP_ADDR; Code: #$7E + JCC_SHARED; Description: DESC_JNG; Branch: BRANCH_BRANCH),
847 (Name: 'JNGE' + FP_ADDR; Code: #$7C + JCC_SHARED; Description: DESC_JNGE; Branch: BRANCH_BRANCH),
848 (Name: 'JNL' + FP_ADDR; Code: #$7D + JCC_SHARED; Description: DESC_JNL; Branch: BRANCH_BRANCH),
849 (Name: 'JNLE' + FP_ADDR; Code: #$7F + JCC_SHARED; Description: DESC_JNLE; Branch: BRANCH_BRANCH),
850 (Name: 'JNO' + FP_ADDR; Code: #$71 + JCC_SHARED; Description: DESC_JNO; Branch: BRANCH_BRANCH),
851 (Name: 'JNP' + FP_ADDR; Code: #$7B + JCC_SHARED; Description: DESC_JNP; Branch: BRANCH_BRANCH),
852 (Name: 'JNS' + FP_ADDR; Code: #$79 + JCC_SHARED; Description: DESC_JNS; Branch: BRANCH_BRANCH),
853 (Name: 'JNZ' + FP_ADDR; Code: #$75 + JCC_SHARED; Description: DESC_JNZ; Branch: BRANCH_BRANCH),
854 (Name: 'JO' + FP_ADDR; Code: #$70 + JCC_SHARED; Description: DESC_JO; Branch: BRANCH_BRANCH),
855 (Name: 'JP' + FP_ADDR; Code: #$7A + JCC_SHARED; Description: DESC_JP; Branch: BRANCH_BRANCH),
856 (Name: 'JPE' + FP_ADDR; Code: #$7A + JCC_SHARED; Description: DESC_JPE; Branch: BRANCH_BRANCH),
857 (Name: 'JPO' + FP_ADDR; Code: #$7B + JCC_SHARED; Description: DESC_JPO; Branch: BRANCH_BRANCH),
858 (Name: 'JS' + FP_ADDR; Code: #$78 + JCC_SHARED; Description: DESC_JS; Branch: BRANCH_BRANCH),
859 (Name: 'JZ' + FP_ADDR; Code: #$74 + JCC_SHARED; Description: DESC_JZ; Branch: BRANCH_BRANCH),
860 (Name: 'SAHF' + FP_X; Code: #$9E; Description: DESC_SAHF; Branch: BRANCH_NORMAL),
861 (Name: 'WAIT' + FP_X; Code: #$9B; Description: DESC_FWAIT; Branch: BRANCH_NORMAL)
864 { Operands Definition }
866 sOperands: array [0..9] of TOperandRecord = (
867 (Name: 'ST'; Code: ''; OperandType: FPU_OPERAND_ST_0; Default: ''; Data: nil),
868 (Name: 'ST(0)'; Code: ''; OperandType: FPU_OPERAND_ST_0; Default: ''; Data: nil),
869 (Name: 'ST(1)'; Code: #$01; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
870 (Name: 'ST(2)'; Code: #$02; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
871 (Name: 'ST(3)'; Code: #$03; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
872 (Name: 'ST(4)'; Code: #$04; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
873 (Name: 'ST(5)'; Code: #$05; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
874 (Name: 'ST(6)'; Code: #$06; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
875 (Name: 'ST(7)'; Code: #$07; OperandType: FPU_OPERAND_ST_I; Default: ''; Data: nil),
876 (Name: 'AX'; Code: ''; OperandType: FPU_OPERAND_AX; Default: ''; Data: nil)
879 { Operands Ordinals }
881 sOperandOrdinals: array [0..12] of TOperandRecord = (
882 (Name: DESC_OPER_M16_INT; Code: #$05; OperandType: FPU_OPERAND_M16_INT; Default: DEFV_M16_INT; Data: nil),
883 (Name: DESC_OPER_M32_INT; Code: #$05; OperandType: FPU_OPERAND_M32_INT; Default: DEFV_M32_INT; Data: nil),
884 (Name: DESC_OPER_M64_INT; Code: #$05; OperandType: FPU_OPERAND_M64_INT; Default: DEFV_M64_INT; Data: nil),
885 (Name: DESC_OPER_M80_BCD; Code: #$05; OperandType: FPU_OPERAND_M80_BCD; Default: DEFV_M80_BCD; Data: nil),
886 (Name: DESC_OPER_M32_FP; Code: #$05; OperandType: FPU_OPERAND_M32_FP; Default: DEFV_M32_FP; Data: nil),
887 (Name: DESC_OPER_M64_FP; Code: #$05; OperandType: FPU_OPERAND_M64_FP; Default: DEFV_M64_FP; Data: nil),
888 (Name: DESC_OPER_M80_FP; Code: #$05; OperandType: FPU_OPERAND_M80_FP; Default: DEFV_M80_FP; Data: nil),
889 (Name: DESC_OPER_M2BYTE_CW; Code: #$05; OperandType: FPU_OPERAND_M2BYTE_CW; Default: DEFV_M2BYTE_CW; Data: nil),
890 (Name: DESC_OPER_M2BYTE_SW; Code: #$05; OperandType: FPU_OPERAND_M2BYTE_SW; Default: DEFV_M2BYTE_SW; Data: nil),
891 (Name: DESC_OPER_M14BYTE_ENV; Code: #$05; OperandType: FPU_OPERAND_M14BYTE_ENV; Default: DEFV_M14BYTE_ENV; Data: nil),
892 (Name: DESC_OPER_M28BYTE_ENV; Code: #$05; OperandType: FPU_OPERAND_M28BYTE_ENV; Default: DEFV_M28BYTE_ENV; Data: nil),
893 (Name: DESC_OPER_M94BYTE_STAT; Code: #$05; OperandType: FPU_OPERAND_M94BYTE_STAT; Default: DEFV_M94BYTE_STAT; Data: nil),
894 (Name: DESC_OPER_M108BYTE_STAT; Code: #$05; OperandType: FPU_OPERAND_M108BYTE_STAT; Default: DEFV_M108BYTE_STAT; Data: nil)
897 { Operands Type Definition }
899 sOperandTypes: array [0..18] of TOperandTypeRecord = (
900 (OperandType: FPU_OPERAND_ERROR; Description: DESC_OPER_ERROR),
901 (OperandType: FPU_OPERAND_NONE; Description: DESC_OPER_NONE),
902 (OperandType: FPU_OPERAND_ST_0; Description: DESC_OPER_ST_0),
903 (OperandType: FPU_OPERAND_ST_I; Description: DESC_OPER_ST_I),
904 (OperandType: FPU_OPERAND_AX; Description: DESC_OPER_AX),
905 (OperandType: FPU_OPERAND_M16_INT; Description: DESC_OPER_M16_INT),
906 (OperandType: FPU_OPERAND_M32_INT; Description: DESC_OPER_M32_INT),
907 (OperandType: FPU_OPERAND_M64_INT; Description: DESC_OPER_M64_INT),
908 (OperandType: FPU_OPERAND_ADDR; Description: DESC_OPER_ADDR),
909 (OperandType: FPU_OPERAND_M80_BCD; Description: DESC_OPER_M80_BCD),
910 (OperandType: FPU_OPERAND_M32_FP; Description: DESC_OPER_M32_FP),
911 (OperandType: FPU_OPERAND_M64_FP; Description: DESC_OPER_M64_FP),
912 (OperandType: FPU_OPERAND_M80_FP; Description: DESC_OPER_M80_FP),
913 (OperandType: FPU_OPERAND_M2BYTE_CW; Description: DESC_OPER_M2BYTE_CW),
914 (OperandType: FPU_OPERAND_M2BYTE_SW; Description: DESC_OPER_M2BYTE_SW),
915 (OperandType: FPU_OPERAND_M14BYTE_ENV; Description: DESC_OPER_M14BYTE_ENV),
916 (OperandType: FPU_OPERAND_M28BYTE_ENV; Description: DESC_OPER_M28BYTE_ENV),
917 (OperandType: FPU_OPERAND_M94BYTE_STAT; Description: DESC_OPER_M94BYTE_STAT),
918 (OperandType: FPU_OPERAND_M108BYTE_STAT; Description: DESC_OPER_M108BYTE_STAT)
921 { CPU Features Flags }
923 CPU_SSE3_PRESENT: Boolean;
925 implementation
927 procedure CheckCPUFeatures;
929 i: Integer;
930 begin
932 mov eax, 1
933 cpuid
934 and ecx, 1
935 mov CPU_SSE3_PRESENT, cl
936 end;
937 if not CPU_SSE3_PRESENT then
938 for i := 0 to (Length(sInstructions) - 1) do
939 if (ParseBeforeFirst(sInstructions[i].Name, FPU_SPACE) = 'FISTTP') then
940 with sInstructions[i] do
941 begin
942 Description := Description + DESC_DO + INST_INST_UNSUPPORTED;
943 Branch := BRANCH_UNSUPPORTED;
944 end;
945 end;
947 initialization
948 CheckCPUFeatures;
950 end.