148 switch (ext_opcode) {
175 strncpy(
cmd->instr,
bytes[3] & 0x80 ?
"bior" :
"bor",
179 strncpy(
cmd->instr,
bytes[3] & 0x80 ?
"biand" :
"band",
183 strncpy(
cmd->instr,
bytes[3] & 0x80 ?
"bild" :
"bld",
187 strncpy(
cmd->instr,
bytes[3] & 0x80 ?
"bist" :
"bst",
191 strncpy(
cmd->instr,
bytes[3] & 0x80 ?
"bixor" :
"bxor",
222 cmd->operands[0] =
'\0';
244 "#0x%x:8,ccr",
bytes[1]);
247 "r%u%c,ccr",
bytes[1] & 0x7,
248 bytes[1] & 0x8 ?
'l' :
'h');
251 "ccr,r%u%c",
bytes[1] & 0x7,
252 bytes[1] & 0x8 ?
'l' :
'h');
294 if (
bytes[1] & 0x80) {
345 if (
bytes[1] & 0x80) {
347 "r%u,@(0x%x:16,r%u)",
348 bytes[1] & 0x7, disp,
349 (
bytes[1] >> 4) & 0x7);
352 "@(0x%x:16,r%u),r%u", disp,
363 strncpy(
cmd->instr,
tmp == 0x7 ?
"pop" :
"push",
368 "r%u",
bytes[1] & 0x7);
378 if (
bytes[0] == 0x6D && (
tmp == 7 ||
tmp == 0xF)) {
386 if (
bytes[1] & 0x80) {
405 if (
bytes[1] & 0x80) {
408 (
bytes[1] >> 4) & 0x7);
411 (
bytes[1] >> 4) & 0x7,
428 bytes[1] & 0x8 ?
'l' :
'h');
470 (
bytes[1] >> 4) & 0x7,
471 bytes[1] & 0x80 ?
'l' :
'h',
486 (
bytes[3] >> 4) & 0x7,
487 bytes[3] & 0x80 ?
'l' :
'h',
502 (
bytes[3] >> 4) & 0x7,
503 bytes[3] & 0x80 ?
'l' :
'h',
529 }
else if (
bytes[0] == 0x12 &&
bytes[1] >> 4 == 0) {
532 }
else if (
bytes[0] == 0x13 &&
bytes[1] >> 4 == 0) {
535 }
else if (
bytes[0] == 0x10 &&
bytes[1] >> 4 == 0) {
537 }
else if (
bytes[0] == 0x11 &&
bytes[1] >> 4 == 0) {
545 bytes[1] & 0x8 ?
'l' :
'h');
559 (
bytes[1] >> 4) & 0x7,
560 bytes[1] & 0x80 ?
'l' :
'h',
590 "@@0x%x:8",
bytes[1]);
604 "@r%u", (
bytes[1] >> 4) & 0x7);
619 if (
bytes[1] & 0x80) {
621 "r%u,@0x%x:16",
bytes[1] & 0x7, abs);
624 abs,
bytes[1] & 0x7);
638 if (
bytes[1] & 0x80) {
641 (
bytes[1] >> 4) & 0x7);
644 (
bytes[1] >> 4) & 0x7,
661 if (
bytes[1] & 0x80) {
663 "r%u%c,@(0x%x:16,r%u)",
665 disp, (
bytes[1] >> 4) & 0x7);
668 "@(0x%x:16,r%u),r%u%c",
669 disp, (
bytes[1] >> 4) & 0x7,
683 if (
bytes[1] & 0x80) {
687 (
bytes[1] >> 4) & 0x7);
691 (
bytes[1] >> 4) & 0x7,
705 }
else if (
bytes[0] == 0x6A &&
bytes[1] >> 4 == 0xC) {
713 if (
bytes[1] & 0x80) {
715 bytes[1] & 0x7,
bytes[1] & 0x8 ?
'l' :
'h', abs);
719 bytes[1] & 0x8 ?
'l' :
'h');
732 cmd->operands[0] =
'\0';
747 bytes[0] & 0x8 ?
'l' :
'h');
782 switch (instr[0] >> 4) {
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
static int decode_abs162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r82abs16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_indinc162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_daa(const ut8 *bytes, struct h8300_cmd *cmd)
int h8300_decode_command(const ut8 *instr, struct h8300_cmd *cmd)
static int decode_subs(const ut8 *bytes, struct h8300_cmd *cmd)
int decode_jmp_abs16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_pop(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_imm162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_nop(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_imm2r8(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_bsr(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_imm2r_short(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_eepmov(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_jmp_ind(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r82r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_imm2abs8(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_andc(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_disp162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r82rdec16(const ut8 *bytes, struct h8300_cmd *cmd)
int decode_jmp_abs8(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_opcode_4bit(const ut8 *bytes, struct h8300_cmd *cmd)
static const char * commands[]
static int decode_rzind16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_opcode(const ut8 *bytes, struct h8300_cmd *cmd)
static const char * commands_4bit[]
static int decode_abs2r_short(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r82dispr16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r82ind16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_rzimm_short(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_r2r8(const ut8 *bytes, struct h8300_cmd *cmd)
static const char * commands_9bit[]
static int decode_imm2ind16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_ind162r16(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_rzabs8(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_ldc(const ut8 *bytes, struct h8300_cmd *cmd)
static int decode_adds(const ut8 *bytes, struct h8300_cmd *cmd)
#define H8300_INSTR_MAXLEN
static ut16 rz_read_at_be16(const void *src, size_t offset)
static ut16 rz_read_be16(const void *src)