-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathop_80.c
More file actions
30 lines (21 loc) · 714 Bytes
/
op_80.c
File metadata and controls
30 lines (21 loc) · 714 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
#include"bin2inc.h"
boolean op_80(void){
byte ib;
char * mod_rm_str;
char * o_size;
char * mnems[8] = { "add", "or", "adc", 0, "and", "sub", "xor", "cmp" };
char * mnemonic;
operand_size = 8;
address_mode = read_byte();
o_size = (((address_mode >> 6) & 3) == 3) ? "" : "byte ";
mod_rm_str = mod_rm();
ib = read_byte();
mnemonic = mnems[(address_mode >> 3) & 7];
if(!mnemonic) return boolean(0);
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);
}