move from branch
[reactos.git] / rosapps / devutils / cputointel / From / dummycpu / Dummyopcode.c
1
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include "Dummy.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 * Return value :
20 * value -1 : unimplement
21 * value 0 : wrong opcode or not vaild opcode
22 * value +1 and higher : who many byte we should add to cpu_pos
23 */
24
25 CPU_INT DUMMY_Add( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
26 CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
27
28 {
29 /*
30 * ConvertBitToByte() is perfect to use to get the bit being in use from a bit array
31 * GetMaskByte() is perfect if u whant known which bit have been mask out
32 * see M68kopcode.c and how it use the ConvertBitToByte()
33 */
34
35 fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
36
37 printf(";Add unimplement\n");
38 return -1;
39 }