- Rearrange reactos.dff according to rosapps rearrange.
[reactos.git] / rosapps / devutils / cputointel / From / IA32 / IA32opcode.c
1
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include "IA32.h"
5 #include "../../misc.h"
6
7
8 /* cpuDummyInit_Add
9 * Input param :
10 * out : The file pointer that we write to (the output file to intel asm)
11 * cpu_buffer : The memory buffer we have our binary code that we whant convert
12 * cpu_pos : Current positions in the cpu_buffer
13 * cpu_size : The memory size of the cpu_buffer
14 * BaseAddress : The base address you whant the binay file should run from
15 * cpuarch : if it exists diffent cpu from a manufactor like pentium,
16 * pentinum-mmx so on, use this flag to specify which type
17 * of cpu you whant or do not use it if it does not exists
18 * other or any sub model.
19 *
20 * mode : if we should run disambler of this binary or
21 * translate it, Disambler will not calc the
22 * the row name right so we simple give each
23 row a name. In translations mode we run a
24 * analys so we getting better optimzing and
25 * only row name there we need.
26 * value for mode are :
27 * 0 = disambler mode
28 * 1 = translate mode intel
29 *
30 * Return value :
31 * value -1 : unimplement
32 * value 0 : wrong opcode or not vaild opcode
33 * value +1 and higher : who many byte we should add to cpu_pos
34 */
35
36 CPU_INT IA32_Add( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
37 CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
38
39 {
40 /*
41 * ConvertBitToByte() is perfect to use to get the bit being in use from a bit array
42 * GetMaskByte() is perfect if u whant known which bit have been mask out
43 * see M68kopcode.c and how it use the ConvertBitToByte()
44 */
45
46 fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
47
48 printf(";Add unimplement\n");
49 return -1;
50 }