-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathop_f6.c
46 lines (36 loc) · 1013 Bytes
/
op_f6.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include"bin2inc.h"
boolean op_f6(void){
byte ib;
char * mod_rm_str;
char * o_size;
char * mnems[8] = { "test", 0, "not", "neg", "mul", "imul", "div", "idiv" };
char * mnemonic;
operand_size = 8;
address_mode = read_byte();
o_size = (((address_mode >> 6) & 3) == 3) ? "" : "byte ";
mod_rm_str = mod_rm();
mnemonic = mnems[(address_mode >> 3) & 7];
if(!mnemonic) return boolean(0);
switch((address_mode >> 3)&7){
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
sprintf(ibuffer, iFORMAT"%s%s",
mnemonic, o_size, mod_rm_str);
break;
case 0:
ib = read_byte();
sprintf(ibuffer, iFORMAT"%s%s, %s",
mnemonic, o_size, mod_rm_str, hexbyte(ib));
break;
default:
return boolean(0);
}
mark_instruction();// comment_instruction();
// push next instruction offset to stack
IDisasm.pushAddress(¤t_va);
return boolean(1);
}