5 #include <capstone/capstone.h>
10 "UNCHANGED",
"READ",
"WRITE",
"READ | WRITE",
17 if (
detail->regs_read_count > 0) {
18 printf(
"\treading from regs: ");
20 for (
i = 0;
i <
detail->regs_read_count; ++
i) {
30 if (
detail->regs_write_count > 0) {
31 printf(
"\twriting to regs: ");
33 for (
i = 0;
i <
detail->regs_write_count; ++
i) {
47 cs_detail *
detail = insn->detail;
65 switch ((
int)
op->type) {
75 comment =
" (in mnemonic)";
77 printf(
"\t\toperands[%u].type: REGISTER = %s%s\n",
i,
82 printf(
"\t\toperands[%u].type: CONSTANT = %u\n",
i,
87 printf(
"\t\toperands[%u].type: IMMEDIATE = #%d\n",
i,
92 printf(
"\t\toperands[%u].type: DIRECT = 0x%02x\n",
i,
97 printf(
"\t\toperands[%u].type: EXTENDED %s = 0x%04x\n",
98 i,
op->ext.indirect ?
"INDIRECT" :
"",
103 printf(
"\t\toperands[%u].type: RELATIVE = 0x%04x\n",
i,
108 printf(
"\t\toperands[%u].type: INDEXED%s\n",
i,
113 printf(
"\t\t\tbase register: %s\n",
117 printf(
"\t\t\toffset register: %s\n",
120 if ((
op->idx.offset_bits != 0) &&
123 printf(
"\t\t\toffset: %d\n",
op->idx.offset);
126 printf(
"\t\t\toffset address: 0x%x\n",
127 op->idx.offset_addr);
129 printf(
"\t\t\toffset bits: %u\n",
130 op->idx.offset_bits);
133 if (
op->idx.inc_dec) {
134 const char *post_pre =
op->idx.flags &
136 const char *inc_dec = (
op->idx.inc_dec > 0) ?
137 "increment" :
"decrement";
139 printf(
"\t\t\t%s %s: %d\n", post_pre, inc_dec,
140 abs(
op->idx.inc_dec));
147 printf(
"\t\t\tsize: %u\n",
op->size);
static mcore_handle handle
@ CS_AC_INVALID
Uninitialized/invalid access type.
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
#define M680X_IDX_INDIRECT
#define M680X_FIRST_OP_IN_MNEM
@ M680X_REG_PC
M6800/1/2/3/9, M6301/9.
#define M680X_IDX_POST_INC_DEC
@ M680X_OP_EXTENDED
= Extended addressing operand.
@ M680X_OP_INDEXED
= Indexed addressing operand.
@ M680X_OP_CONSTANT
Used e.g. for a bit index or page number.
@ M680X_OP_IMMEDIATE
= Immediate operand.
@ M680X_OP_REGISTER
= Register operand.
@ M680X_OP_RELATIVE
= Relative addressing operand.
@ M680X_OP_DIRECT
= Direct addressing operand.
#define M680X_SECOND_OP_IN_MNEM
The M680X instruction and it's operands.
uint8_t flags
See: M680X instruction flags.
cs_m680x_op operands[M680X_OPERAND_COUNT]
operands for this insn.
uint8_t op_count
number of operands for the instruction or 0