17 #define ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
134 #define LH5801_IFMT_IMMS(f) ((f)&LH5801_IFMT_IMM_MASK)
135 #define LH5801_IFMT_RMODE(f) ((f)&LH5801_IFMT_RMODE_MASK)
142 default:
return false;
675 int fd = (
buf[0] == 0xfd);
713 if (
byte ==
desc.opcode) {
721 if (!(
byte & 1) &&
byte >= 0xc0 &&
byte <= 0xf6) {
736 case 3: insn->
imm[2] =
buf[3];
737 case 2: insn->
imm[1] =
buf[2];
738 case 1: insn->
imm[0] =
buf[1];
749 unsigned regnr = (insn->
opcode >> 4) & 3;
750 const char names[] =
"xyu";
751 char *saved_buf =
buf;
802 mnembuf[0] =
mnem[0];
803 mnembuf[1] =
"chzv"[(insn->
opcode >> 2) % 4];
804 mnembuf[2] = (insn->
opcode & 2) ?
's' :
'r';
849 (insn->
opcode & 0x10) ?
'-' :
'+', insn->
imm[0]);
855 insn->
imm[0], insn->
imm[1]);
858 insn->
imm[0], insn->
imm[1]);
865 insn->
imm[0], insn->
imm[1], insn->
imm[2]);
const lzma_allocator const uint8_t size_t uint8_t * out
static char * print_reg(char *buf, const struct lh5801_insn *insn)
#define LH5801_IFMT_RMODE(f)
const struct lh5801_insn_desc lh5801_insn_descs[]
const struct lh5801_insn_class_desc lh5801_insn_class_descs[LH5801_INSNC_NUMBER]
static bool lh5801_ifmt_fd_matches(enum lh5801_insn_format fmt, int fd)
void lh5801_print_insn(char *out, int size, const struct lh5801_insn *insn)
int lh5801_decode(struct lh5801_insn *insn, const ut8 *buf, int len)
#define LH5801_IFMT_IMMS(f)
static const z80_opcode fd[]