-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathop_c1.c
More file actions
35 lines (27 loc) · 835 Bytes
/
op_c1.c
File metadata and controls
35 lines (27 loc) · 835 Bytes
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
#include"bin2inc.h"
boolean op_c1(void){
char * mod_rm_str;
char * o_size;
char * mnems[8] = { "rol", "ror", "rcl", "rcr", "shl", "shr", 0, "sar" };
char * mnemonic;
char * imm_str;
address_mode = read_byte();
mnemonic = mnems[(address_mode >> 3) & 7];
if(!mnemonic) return boolean(0);
mod_rm_str = mod_rm();
ib = read_byte();
if(operand_size == 32){
o_size = "dword ";
}
else if(operand_size == 16){
o_size = "word ";
}
else return boolean(0);
if(((address_mode >> 6) & 3) == 3) o_size = "";
sprintf(ibuffer, iFORMAT"%s%s, %s",
mnemonic, o_size, mod_rm_str, hexbyte(ib));
mark_instruction();// comment_instruction();
// push next instruction offset to stack
IDisasm.pushAddress(¤t_va);
return boolean(1);
}