Rizin
unix-like reverse engineering framework and cli tools
analysis_m680x_cs.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2015-2019 pancake <pancake@nopcode.org>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_asm.h>
5 #include <rz_lib.h>
6 #include <capstone/capstone.h>
7 
8 #if CS_API_MAJOR >= 4 && CS_API_MINOR >= 0
9 #define CAPSTONE_HAS_M680X 1
10 #else
11 #define CAPSTONE_HAS_M680X 0
12 #endif
13 
14 #if !CAPSTONE_HAS_M680X
15 #ifdef _MSC_VER
16 #pragma message("Cannot find support for m680x in capstone")
17 #else
18 #warning Cannot find capstone-m680x support
19 #endif
20 #endif
21 
22 #if CAPSTONE_HAS_M680X
23 #include <capstone/m680x.h>
24 
25 static int m680xmode(const char *str) {
26  if (!str) {
27  return CS_MODE_M680X_6800;
28  }
29  // replace this with the asm.features?
30  if (str && strstr(str, "6800")) {
31  return CS_MODE_M680X_6800;
32  }
33  if (str && strstr(str, "6801")) {
34  return CS_MODE_M680X_6801;
35  } else if (str && strstr(str, "6805")) {
36  return CS_MODE_M680X_6805;
37  } else if (str && strstr(str, "6808")) {
38  return CS_MODE_M680X_6808;
39  } else if (str && strstr(str, "6809")) {
40  return CS_MODE_M680X_6809;
41  } else if (str && strstr(str, "6811")) {
42  return CS_MODE_M680X_6811;
43  }
44  //
45  if (str && strstr(str, "cpu12")) {
46  return CS_MODE_M680X_CPU12;
47  }
48  if (str && strstr(str, "6301")) {
49  return CS_MODE_M680X_6301;
50  }
51  if (str && strstr(str, "6309")) {
52  return CS_MODE_M680X_6309;
53  }
54  if (str && strstr(str, "hcs08")) {
55  return CS_MODE_M680X_HCS08;
56  }
57  return CS_MODE_M680X_6800;
58 }
59 
60 #define IMM(x) insn->detail->m680x.operands[x].imm
61 #define REL(x) insn->detail->m680x.operands[x].rel
62 
63 static int analop(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, RzAnalysisOpMask mask) {
64  int n, ret, opsize = -1;
65  static csh handle = 0;
66  static int omode = -1;
67  static int obits = 32;
68  cs_insn *insn;
69 
70  int mode = m680xmode(a->cpu);
71 
72  if (mode != omode || a->bits != obits) {
73  cs_close(&handle);
74  handle = 0;
75  omode = mode;
76  obits = a->bits;
77  }
78  op->size = 4;
79  if (handle == 0) {
80  ret = cs_open(CS_ARCH_M680X, mode, &handle);
81  if (ret != CS_ERR_OK) {
82  goto fin;
83  }
85  }
86  n = cs_disasm(handle, (ut8 *)buf, len, addr, 1, &insn);
87  if (n < 1 || insn->size < 1) {
89  op->size = 2;
90  opsize = -1;
91  goto beach;
92  }
93  if (!memcmp(buf, "\xff\xff", RZ_MIN(len, 2))) {
95  op->size = 2;
96  opsize = -1;
97  goto beach;
98  }
99  op->id = insn->id;
100  opsize = op->size = insn->size;
101  switch (insn->id) {
102  case M680X_INS_INVLD:
103  op->type = RZ_ANALYSIS_OP_TYPE_ILL;
104  break;
105  case M680X_INS_ABA:
106  case M680X_INS_ABX:
107  case M680X_INS_ABY:
108  break;
109  case M680X_INS_ADC:
110  case M680X_INS_ADCA:
111  case M680X_INS_ADCB:
112  case M680X_INS_ADCD:
113  case M680X_INS_ADCR:
114  case M680X_INS_ADD:
115  case M680X_INS_ADDA:
116  case M680X_INS_ADDB:
117  case M680X_INS_ADDD:
118  case M680X_INS_ADDE:
119  case M680X_INS_ADDF:
120  case M680X_INS_ADDR:
121  case M680X_INS_ADDW:
122  op->type = RZ_ANALYSIS_OP_TYPE_ADD;
123  break;
124  case M680X_INS_AIM:
125  case M680X_INS_AIS:
126  case M680X_INS_AIX:
127  case M680X_INS_AND:
128  case M680X_INS_ANDA:
129  case M680X_INS_ANDB:
130  case M680X_INS_ANDCC:
131  case M680X_INS_ANDD:
132  case M680X_INS_ANDR:
133  case M680X_INS_ASL:
134  case M680X_INS_ASLA:
135  case M680X_INS_ASLB:
136  case M680X_INS_ASLD:
137  case M680X_INS_ASR:
138  case M680X_INS_ASRA:
139  case M680X_INS_ASRB:
140  case M680X_INS_ASRD:
141  case M680X_INS_ASRX:
142  case M680X_INS_BAND:
143  case M680X_INS_BCC:
144  case M680X_INS_BCLR:
145  case M680X_INS_BCS:
146  case M680X_INS_BEOR:
147  break;
148  case M680X_INS_BIAND:
149  case M680X_INS_BIEOR:
150  case M680X_INS_BIH:
151  case M680X_INS_BIL:
152  case M680X_INS_BIOR:
153  case M680X_INS_BIT:
154  case M680X_INS_BITA:
155  case M680X_INS_BITB:
156  case M680X_INS_BITD:
157  case M680X_INS_BITMD:
158  break;
159  case M680X_INS_BRA:
160  op->type = RZ_ANALYSIS_OP_TYPE_JMP;
161  op->jump = addr + op->size + REL(0).offset;
162  op->fail = UT64_MAX;
163  break;
164  case M680X_INS_BEQ:
165  case M680X_INS_BGE:
166  case M680X_INS_BGND:
167  case M680X_INS_BGT:
168  case M680X_INS_BHCC:
169  case M680X_INS_BHCS:
170  case M680X_INS_BHI:
171  case M680X_INS_BLE:
172  case M680X_INS_BLS:
173  case M680X_INS_BLT:
174  case M680X_INS_BMC:
175  case M680X_INS_BMI:
176  case M680X_INS_BMS:
177  case M680X_INS_BNE:
178  case M680X_INS_BOR:
179  case M680X_INS_BPL:
180  case M680X_INS_BRCLR:
181  case M680X_INS_BRSET:
182  case M680X_INS_BRN:
183  case M680X_INS_BSET:
184  case M680X_INS_BSR:
185  case M680X_INS_BVC:
186  case M680X_INS_BVS:
188  op->jump = addr + op->size + REL(0).offset;
189  op->fail = addr + op->size;
190  break;
191  case M680X_INS_CALL:
192  case M680X_INS_CBA:
193  case M680X_INS_CBEQ:
194  case M680X_INS_CBEQA:
195  case M680X_INS_CBEQX:
196  case M680X_INS_CLC:
197  case M680X_INS_CLI:
198  case M680X_INS_CLR:
199  case M680X_INS_CLRA:
200  case M680X_INS_CLRB:
201  case M680X_INS_CLRD:
202  case M680X_INS_CLRE:
203  case M680X_INS_CLRF:
204  case M680X_INS_CLRH:
205  case M680X_INS_CLRW:
206  case M680X_INS_CLRX:
207  case M680X_INS_CLV:
208  break;
209  case M680X_INS_CMP:
210  case M680X_INS_CMPA:
211  case M680X_INS_CMPB:
212  case M680X_INS_CMPD:
213  case M680X_INS_CMPE:
214  case M680X_INS_CMPF:
215  case M680X_INS_CMPR:
216  case M680X_INS_CMPS:
217  case M680X_INS_CMPU:
218  case M680X_INS_CMPW:
219  case M680X_INS_CMPX:
220  case M680X_INS_CMPY:
221  op->type = RZ_ANALYSIS_OP_TYPE_CMP;
222  break;
223  case M680X_INS_COM:
224  case M680X_INS_COMA:
225  case M680X_INS_COMB:
226  case M680X_INS_COMD:
227  case M680X_INS_COME:
228  case M680X_INS_COMF:
229  case M680X_INS_COMW:
230  case M680X_INS_COMX:
231  case M680X_INS_CPD:
232  case M680X_INS_CPHX:
233  case M680X_INS_CPS:
234  case M680X_INS_CPX:
235  case M680X_INS_CPY:
236  case M680X_INS_CWAI:
237  case M680X_INS_DAA:
238  case M680X_INS_DBEQ:
239  case M680X_INS_DBNE:
240  case M680X_INS_DBNZ:
241  case M680X_INS_DBNZA:
242  case M680X_INS_DBNZX:
243  case M680X_INS_DEC:
244  case M680X_INS_DECA:
245  case M680X_INS_DECB:
246  case M680X_INS_DECD:
247  case M680X_INS_DECE:
248  case M680X_INS_DECF:
249  case M680X_INS_DECW:
250  case M680X_INS_DECX:
251  case M680X_INS_DES:
252  case M680X_INS_DEX:
253  case M680X_INS_DEY:
254  case M680X_INS_DIV:
255  case M680X_INS_DIVD:
256  case M680X_INS_DIVQ:
257  case M680X_INS_EDIV:
258  case M680X_INS_EDIVS:
259  case M680X_INS_EIM:
260  case M680X_INS_EMACS:
261  case M680X_INS_EMAXD:
262  case M680X_INS_EMAXM:
263  case M680X_INS_EMIND:
264  case M680X_INS_EMINM:
265  break;
266  case M680X_INS_EMUL:
267  case M680X_INS_EMULS:
268  op->type = RZ_ANALYSIS_OP_TYPE_MUL;
269  break;
270  case M680X_INS_EOR:
271  case M680X_INS_EORA:
272  case M680X_INS_EORB:
273  case M680X_INS_EORD:
274  case M680X_INS_EORR:
275  op->type = RZ_ANALYSIS_OP_TYPE_XOR;
276  break;
277  case M680X_INS_ETBL:
278  case M680X_INS_EXG:
279  case M680X_INS_FDIV:
280  case M680X_INS_IBEQ:
281  case M680X_INS_IBNE:
282  break;
283  case M680X_INS_IDIV:
284  case M680X_INS_IDIVS:
285  op->type = RZ_ANALYSIS_OP_TYPE_DIV;
286  break;
287  case M680X_INS_ILLGL:
288  break;
289  case M680X_INS_INC:
290  case M680X_INS_INCA:
291  case M680X_INS_INCB:
292  case M680X_INS_INCD:
293  case M680X_INS_INCE:
294  case M680X_INS_INCF:
295  case M680X_INS_INCW:
296  case M680X_INS_INCX:
297  op->type = RZ_ANALYSIS_OP_TYPE_ADD;
298  break;
299  case M680X_INS_INS:
300  case M680X_INS_INX:
301  case M680X_INS_INY:
302  break;
303  case M680X_INS_JMP:
304  op->type = RZ_ANALYSIS_OP_TYPE_JMP;
305  break;
306  case M680X_INS_JSR:
308  break;
309  case M680X_INS_LBCC:
310  case M680X_INS_LBCS:
311  case M680X_INS_LBEQ:
312  case M680X_INS_LBGE:
313  case M680X_INS_LBGT:
314  case M680X_INS_LBHI:
315  case M680X_INS_LBLE:
316  case M680X_INS_LBLS:
317  case M680X_INS_LBLT:
318  case M680X_INS_LBMI:
319  case M680X_INS_LBNE:
320  case M680X_INS_LBPL:
321  case M680X_INS_LBRA:
322  case M680X_INS_LBRN:
323  case M680X_INS_LBSR:
324  case M680X_INS_LBVC:
325  case M680X_INS_LBVS:
326  case M680X_INS_LDA:
327  case M680X_INS_LDAA:
328  case M680X_INS_LDAB:
329  case M680X_INS_LDB:
330  case M680X_INS_LDBT:
331  case M680X_INS_LDD:
332  case M680X_INS_LDE:
333  case M680X_INS_LDF:
334  case M680X_INS_LDHX:
335  case M680X_INS_LDMD:
336  case M680X_INS_LDQ:
337  case M680X_INS_LDS:
338  case M680X_INS_LDU:
339  case M680X_INS_LDW:
340  case M680X_INS_LDX:
341  case M680X_INS_LDY:
342  case M680X_INS_LEAS:
343  case M680X_INS_LEAU:
344  case M680X_INS_LEAX:
345  case M680X_INS_LEAY:
346  case M680X_INS_LSL:
347  case M680X_INS_LSLA:
348  case M680X_INS_LSLB:
349  case M680X_INS_LSLD:
350  case M680X_INS_LSLX:
351  case M680X_INS_LSR:
352  case M680X_INS_LSRA:
353  case M680X_INS_LSRB:
354  case M680X_INS_LSRD:
355  case M680X_INS_LSRW:
356  case M680X_INS_LSRX:
357  case M680X_INS_MAXA:
358  case M680X_INS_MAXM:
359  case M680X_INS_MEM:
360  case M680X_INS_MINA:
361  case M680X_INS_MINM:
362  break;
363  case M680X_INS_MOV:
364  case M680X_INS_MOVB:
365  case M680X_INS_MOVW:
366  op->type = RZ_ANALYSIS_OP_TYPE_MOV;
367  break;
368  case M680X_INS_MUL:
369  case M680X_INS_MULD:
370  op->type = RZ_ANALYSIS_OP_TYPE_MUL;
371  break;
372  case M680X_INS_NEG:
373  case M680X_INS_NEGA:
374  case M680X_INS_NEGB:
375  case M680X_INS_NEGD:
376  case M680X_INS_NEGX:
377  op->type = RZ_ANALYSIS_OP_TYPE_NOT;
378  break;
379  case M680X_INS_NOP:
380  op->type = RZ_ANALYSIS_OP_TYPE_NOP;
381  break;
382  case M680X_INS_NSA:
383  case M680X_INS_OIM:
384  case M680X_INS_ORA:
385  case M680X_INS_ORAA:
386  case M680X_INS_ORAB:
387  case M680X_INS_ORB:
388  case M680X_INS_ORCC:
389  case M680X_INS_ORD:
390  case M680X_INS_ORR:
391  case M680X_INS_PSHA:
392  case M680X_INS_PSHB:
393  case M680X_INS_PSHC:
394  case M680X_INS_PSHD:
395  case M680X_INS_PSHH:
396  case M680X_INS_PSHS:
397  case M680X_INS_PSHSW:
398  case M680X_INS_PSHU:
399  case M680X_INS_PSHUW:
400  case M680X_INS_PSHX:
401  case M680X_INS_PSHY:
402  case M680X_INS_PULA:
403  case M680X_INS_PULB:
404  case M680X_INS_PULC:
405  case M680X_INS_PULD:
406  case M680X_INS_PULH:
407  case M680X_INS_PULS:
408  case M680X_INS_PULSW:
409  case M680X_INS_PULU:
410  case M680X_INS_PULUW:
411  case M680X_INS_PULX:
412  case M680X_INS_PULY:
413  case M680X_INS_REV:
414  case M680X_INS_REVW:
415  case M680X_INS_ROL:
416  case M680X_INS_ROLA:
417  case M680X_INS_ROLB:
418  case M680X_INS_ROLD:
419  case M680X_INS_ROLW:
420  case M680X_INS_ROLX:
421  case M680X_INS_ROR:
422  case M680X_INS_RORA:
423  case M680X_INS_RORB:
424  case M680X_INS_RORD:
425  case M680X_INS_RORW:
426  case M680X_INS_RORX:
427  case M680X_INS_RSP:
428  case M680X_INS_RTC:
429  case M680X_INS_RTI:
430  case M680X_INS_RTS:
431  case M680X_INS_SBA:
432  case M680X_INS_SBC:
433  case M680X_INS_SBCA:
434  case M680X_INS_SBCB:
435  case M680X_INS_SBCD:
436  case M680X_INS_SBCR:
437  case M680X_INS_SEC:
438  case M680X_INS_SEI:
439  case M680X_INS_SEV:
440  case M680X_INS_SEX:
441  case M680X_INS_SEXW:
442  case M680X_INS_SLP:
443  case M680X_INS_STA:
444  case M680X_INS_STAA:
445  case M680X_INS_STAB:
446  case M680X_INS_STB:
447  case M680X_INS_STBT:
448  case M680X_INS_STD:
449  case M680X_INS_STE:
450  case M680X_INS_STF:
451  case M680X_INS_STOP:
452  case M680X_INS_STHX:
453  case M680X_INS_STQ:
454  case M680X_INS_STS:
455  case M680X_INS_STU:
456  case M680X_INS_STW:
457  case M680X_INS_STX:
458  case M680X_INS_STY:
459  case M680X_INS_SUB:
460  case M680X_INS_SUBA:
461  case M680X_INS_SUBB:
462  case M680X_INS_SUBD:
463  case M680X_INS_SUBE:
464  case M680X_INS_SUBF:
465  case M680X_INS_SUBR:
466  case M680X_INS_SUBW:
467  op->type = RZ_ANALYSIS_OP_TYPE_SUB;
468  break;
469  case M680X_INS_SWI:
470  case M680X_INS_SWI2:
471  case M680X_INS_SWI3:
472  op->type = RZ_ANALYSIS_OP_TYPE_SWI;
473  break;
474  case M680X_INS_SYNC:
475  case M680X_INS_TAB:
476  case M680X_INS_TAP:
477  case M680X_INS_TAX:
478  break;
479  case M680X_INS_TBA:
480  case M680X_INS_TBEQ:
481  case M680X_INS_TBL:
482  case M680X_INS_TBNE:
483  case M680X_INS_TEST:
484  case M680X_INS_TFM:
485  case M680X_INS_TFR:
486  case M680X_INS_TIM:
487  case M680X_INS_TPA:
488  case M680X_INS_TST:
489  case M680X_INS_TSTA:
490  case M680X_INS_TSTB:
491  case M680X_INS_TSTD:
492  case M680X_INS_TSTE:
493  case M680X_INS_TSTF:
494  case M680X_INS_TSTW:
495  case M680X_INS_TSTX:
496  op->type = RZ_ANALYSIS_OP_TYPE_CMP;
497  break;
498  case M680X_INS_TSX:
499  case M680X_INS_TSY:
500  case M680X_INS_TXA:
501  case M680X_INS_TXS:
502  case M680X_INS_TYS:
503  case M680X_INS_WAI:
504  case M680X_INS_WAIT:
505  case M680X_INS_WAV:
506  case M680X_INS_WAVR:
507  case M680X_INS_XGDX:
508  case M680X_INS_XGDY:
509  break;
510  }
511 beach:
512  cs_free(insn, n);
513  // cs_close (&handle);
514 fin:
515  return opsize;
516 }
517 
518 static char *get_reg_profile(RzAnalysis *analysis) {
519  const char *p =
520  "=PC pc\n"
521  "=SP sp\n"
522  "=A0 a0\n"
523  "=A1 a1\n"
524  "gpr pc .16 48 0\n"
525  "gpr sp .16 48 0\n"
526  "gpr a0 .16 48 0\n"
527  "gpr a1 .16 48 0\n";
528  return strdup(p);
529 }
530 
532  .name = "m680x",
533  .desc = "Capstone M680X analysis plugin",
534  .license = "BSD",
535  .esil = false,
536  .arch = "m680x",
537  .get_reg_profile = &get_reg_profile,
538  .bits = 16 | 32,
539  .op = &analop,
540 };
541 #else
543  .name = "m680x (unsupported)",
544  .desc = "Capstone M680X analyzer (unsupported)",
545  .license = "BSD",
546  .arch = "m680x",
547  .bits = 32,
548 };
549 #endif
550 
551 #ifndef RZ_PLUGIN_INCORE
556 };
557 #endif
size_t len
Definition: 6502dis.c:15
static int analop(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, RzAnalysisOpMask mask)
#define mask()
RZ_API char * get_reg_profile(RzAnalysis *analysis)
RZ_API RzLibStruct rizin_plugin
RzAnalysisPlugin rz_analysis_plugin_m680x_cs
static mcore_handle handle
Definition: asm_mcore.c:8
@ CS_ARCH_M680X
680X architecture
Definition: capstone.h:85
@ CS_MODE_M680X_6811
M680X Motorola/Freescale/NXP 68HC11 mode.
Definition: capstone.h:133
@ CS_MODE_M680X_6805
M680X Motorola/Freescale 6805 mode.
Definition: capstone.h:130
@ CS_MODE_M680X_HCS08
M680X Freescale/NXP HCS08 mode.
Definition: capstone.h:136
@ CS_MODE_M680X_6309
M680X Hitachi 6309 mode.
Definition: capstone.h:127
@ CS_MODE_M680X_CPU12
used on M68HC12/HCS12
Definition: capstone.h:134
@ CS_MODE_M680X_6301
M680X Hitachi 6301,6303 mode.
Definition: capstone.h:126
@ CS_MODE_M680X_6801
M680X Motorola 6801,6803 mode.
Definition: capstone.h:129
@ CS_MODE_M680X_6800
M680X Motorola 6800,6802 mode.
Definition: capstone.h:128
@ CS_MODE_M680X_6808
M680X Motorola/Freescale/NXP 68HC08 mode.
Definition: capstone.h:131
@ CS_MODE_M680X_6809
M680X Motorola 6809 mode.
Definition: capstone.h:132
@ CS_OPT_DETAIL
Break down instruction structure into details.
Definition: capstone.h:171
size_t csh
Definition: capstone.h:71
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
Definition: capstone.h:183
#define RZ_API
CAPSTONE_EXPORT size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
Definition: cs.c:798
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
Definition: cs.c:453
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
Definition: cs.c:1017
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
Definition: cs.c:501
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
Definition: cs.c:646
voidpf void uLong size
Definition: ioapi.h:138
const char int mode
Definition: ioapi.h:137
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
void * p
Definition: libc.cpp:67
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
@ M680X_INS_WAVR
Definition: m680x.h:527
@ M680X_INS_ABX
Definition: m680x.h:175
@ M680X_INS_BHCS
Definition: m680x.h:218
@ M680X_INS_ETBL
Definition: m680x.h:325
@ M680X_INS_PULB
M6800/1/2/3.
Definition: m680x.h:431
@ M680X_INS_ADD
Definition: m680x.h:182
@ M680X_INS_TSTX
Definition: m680x.h:518
@ M680X_INS_BMC
Definition: m680x.h:233
@ M680X_INS_SUBE
Definition: m680x.h:491
@ M680X_INS_ABA
M6800/1/2/3.
Definition: m680x.h:174
@ M680X_INS_CMPA
Definition: m680x.h:265
@ M680X_INS_ADCR
Definition: m680x.h:181
@ M680X_INS_EMUL
Definition: m680x.h:318
@ M680X_INS_BRA
Definition: m680x.h:241
@ M680X_INS_AIM
Definition: m680x.h:190
@ M680X_INS_SWI
Definition: m680x.h:495
@ M680X_INS_TSTF
Definition: m680x.h:516
@ M680X_INS_LBNE
Definition: m680x.h:356
@ M680X_INS_LSLB
Definition: m680x.h:385
@ M680X_INS_EDIV
Definition: m680x.h:310
@ M680X_INS_EIM
Definition: m680x.h:312
@ M680X_INS_LDB
Definition: m680x.h:366
@ M680X_INS_TFM
Definition: m680x.h:507
@ M680X_INS_BIH
Definition: m680x.h:222
@ M680X_INS_DECA
Definition: m680x.h:297
@ M680X_INS_ASR
Definition: m680x.h:203
@ M680X_INS_CALL
Definition: m680x.h:247
@ M680X_INS_PSHSW
Definition: m680x.h:425
@ M680X_INS_BRSET
Definition: m680x.h:240
@ M680X_INS_LBLE
Definition: m680x.h:352
@ M680X_INS_LBCC
or LBHS
Definition: m680x.h:346
@ M680X_INS_NEGA
Definition: m680x.h:405
@ M680X_INS_ORD
Definition: m680x.h:417
@ M680X_INS_DBNZA
Definition: m680x.h:294
@ M680X_INS_BIAND
Definition: m680x.h:220
@ M680X_INS_ANDA
Definition: m680x.h:194
@ M680X_INS_RORW
Definition: m680x.h:453
@ M680X_INS_CMPX
Definition: m680x.h:274
@ M680X_INS_BITD
Definition: m680x.h:228
@ M680X_INS_BIEOR
Definition: m680x.h:221
@ M680X_INS_RTC
Definition: m680x.h:456
@ M680X_INS_CMP
Definition: m680x.h:264
@ M680X_INS_EORA
Definition: m680x.h:321
@ M680X_INS_CLRD
Definition: m680x.h:257
@ M680X_INS_AND
Definition: m680x.h:193
@ M680X_INS_INC
Definition: m680x.h:333
@ M680X_INS_DECE
Definition: m680x.h:300
@ M680X_INS_BCS
or BLO
Definition: m680x.h:211
@ M680X_INS_CBEQX
Definition: m680x.h:251
@ M680X_INS_ROLD
Definition: m680x.h:446
@ M680X_INS_BLT
Definition: m680x.h:232
@ M680X_INS_MOVW
Definition: m680x.h:401
@ M680X_INS_ROLA
Definition: m680x.h:444
@ M680X_INS_SYNC
Definition: m680x.h:498
@ M680X_INS_CLRW
Definition: m680x.h:261
@ M680X_INS_PSHB
M6800/1/2/3.
Definition: m680x.h:420
@ M680X_INS_FDIV
Definition: m680x.h:327
@ M680X_INS_ADCB
Definition: m680x.h:179
@ M680X_INS_IDIV
Definition: m680x.h:330
@ M680X_INS_COMX
Definition: m680x.h:283
@ M680X_INS_BMS
Definition: m680x.h:235
@ M680X_INS_ORAB
M6800/1/2/3.
Definition: m680x.h:414
@ M680X_INS_BHI
Definition: m680x.h:219
@ M680X_INS_ADDF
Definition: m680x.h:187
@ M680X_INS_BEOR
Definition: m680x.h:212
@ M680X_INS_MINA
Definition: m680x.h:397
@ M680X_INS_BNE
Definition: m680x.h:236
@ M680X_INS_BIOR
Definition: m680x.h:224
@ M680X_INS_DBNZ
Definition: m680x.h:293
@ M680X_INS_TSTA
Definition: m680x.h:512
@ M680X_INS_BSET
Definition: m680x.h:243
@ M680X_INS_BGT
Definition: m680x.h:216
@ M680X_INS_SEXW
Definition: m680x.h:469
@ M680X_INS_NEG
Definition: m680x.h:404
@ M680X_INS_PSHUW
Definition: m680x.h:427
@ M680X_INS_STS
Definition: m680x.h:482
@ M680X_INS_CBA
M6800/1/2/3.
Definition: m680x.h:248
@ M680X_INS_LEAU
Definition: m680x.h:380
@ M680X_INS_STB
Definition: m680x.h:474
@ M680X_INS_COMD
Definition: m680x.h:279
@ M680X_INS_WAI
M6800/1/2/3.
Definition: m680x.h:524
@ M680X_INS_LDAB
M6800/1/2/3.
Definition: m680x.h:365
@ M680X_INS_CLRH
Definition: m680x.h:260
@ M680X_INS_CMPW
Definition: m680x.h:273
@ M680X_INS_TBA
M6800/1/2/3.
Definition: m680x.h:502
@ M680X_INS_MEM
Definition: m680x.h:396
@ M680X_INS_EMINM
Definition: m680x.h:317
@ M680X_INS_PSHX
M6800/1/2/3.
Definition: m680x.h:428
@ M680X_INS_TPA
M6800/1/2/3.
Definition: m680x.h:510
@ M680X_INS_SUBB
Definition: m680x.h:489
@ M680X_INS_LBLT
Definition: m680x.h:354
@ M680X_INS_LBRA
Definition: m680x.h:358
@ M680X_INS_CLRE
Definition: m680x.h:258
@ M680X_INS_ORR
Definition: m680x.h:418
@ M680X_INS_SUBR
Definition: m680x.h:493
@ M680X_INS_BIT
Definition: m680x.h:225
@ M680X_INS_LDX
Definition: m680x.h:377
@ M680X_INS_TSY
Definition: m680x.h:520
@ M680X_INS_ASLB
Definition: m680x.h:201
@ M680X_INS_STF
Definition: m680x.h:478
@ M680X_INS_CPS
Definition: m680x.h:286
@ M680X_INS_RSP
Definition: m680x.h:455
@ M680X_INS_CWAI
Definition: m680x.h:289
@ M680X_INS_DIV
Definition: m680x.h:307
@ M680X_INS_CLI
M6800/1/2/3.
Definition: m680x.h:253
@ M680X_INS_CMPS
Definition: m680x.h:271
@ M680X_INS_BLS
Definition: m680x.h:231
@ M680X_INS_IDIVS
Definition: m680x.h:331
@ M680X_INS_LBCS
or LBLO
Definition: m680x.h:347
@ M680X_INS_ILLGL
Definition: m680x.h:332
@ M680X_INS_LBMI
Definition: m680x.h:355
@ M680X_INS_LDMD
Definition: m680x.h:372
@ M680X_INS_BGND
Definition: m680x.h:215
@ M680X_INS_LSRA
Definition: m680x.h:389
@ M680X_INS_ROLW
Definition: m680x.h:447
@ M680X_INS_MOVB
Definition: m680x.h:400
@ M680X_INS_CMPF
Definition: m680x.h:269
@ M680X_INS_CLR
Definition: m680x.h:254
@ M680X_INS_XGDX
HD6301.
Definition: m680x.h:528
@ M680X_INS_SEC
Definition: m680x.h:465
@ M680X_INS_PULA
M6800/1/2/3.
Definition: m680x.h:430
@ M680X_INS_DAA
Definition: m680x.h:290
@ M680X_INS_INVLD
Definition: m680x.h:173
@ M680X_INS_BAND
Definition: m680x.h:208
@ M680X_INS_LSLD
Definition: m680x.h:386
@ M680X_INS_STAB
M6800/1/2/3.
Definition: m680x.h:473
@ M680X_INS_SBCR
Definition: m680x.h:464
@ M680X_INS_WAIT
Definition: m680x.h:525
@ M680X_INS_INCF
Definition: m680x.h:338
@ M680X_INS_BMI
Definition: m680x.h:234
@ M680X_INS_BHCC
Definition: m680x.h:217
@ M680X_INS_BEQ
Definition: m680x.h:213
@ M680X_INS_ADDR
Definition: m680x.h:188
@ M680X_INS_TYS
Definition: m680x.h:523
@ M680X_INS_CPHX
Definition: m680x.h:285
@ M680X_INS_OIM
Definition: m680x.h:411
@ M680X_INS_SLP
Definition: m680x.h:470
@ M680X_INS_ORCC
Definition: m680x.h:416
@ M680X_INS_CMPU
Definition: m680x.h:272
@ M680X_INS_JMP
Definition: m680x.h:344
@ M680X_INS_SUBD
Definition: m680x.h:490
@ M680X_INS_COM
Definition: m680x.h:276
@ M680X_INS_SEV
Definition: m680x.h:467
@ M680X_INS_CPY
Definition: m680x.h:288
@ M680X_INS_PULY
Definition: m680x.h:440
@ M680X_INS_CPD
Definition: m680x.h:284
@ M680X_INS_MULD
Definition: m680x.h:403
@ M680X_INS_DECW
Definition: m680x.h:302
@ M680X_INS_INCX
Definition: m680x.h:340
@ M680X_INS_STE
Definition: m680x.h:477
@ M680X_INS_TXS
M6800/1/2/3.
Definition: m680x.h:522
@ M680X_INS_EMAXD
Definition: m680x.h:314
@ M680X_INS_DES
M6800/1/2/3.
Definition: m680x.h:304
@ M680X_INS_ROR
Definition: m680x.h:449
@ M680X_INS_ADCA
Definition: m680x.h:178
@ M680X_INS_BRN
Definition: m680x.h:242
@ M680X_INS_LDQ
Definition: m680x.h:373
@ M680X_INS_BPL
Definition: m680x.h:238
@ M680X_INS_TAB
M6800/1/2/3.
Definition: m680x.h:499
@ M680X_INS_INCW
Definition: m680x.h:339
@ M680X_INS_LDY
Definition: m680x.h:378
@ M680X_INS_SUBW
Definition: m680x.h:494
@ M680X_INS_TSTB
Definition: m680x.h:513
@ M680X_INS_ORAA
M6800/1/2/3.
Definition: m680x.h:413
@ M680X_INS_PSHC
Definition: m680x.h:421
@ M680X_INS_LSR
Definition: m680x.h:388
@ M680X_INS_LDBT
Definition: m680x.h:367
@ M680X_INS_COME
Definition: m680x.h:280
@ M680X_INS_TAP
M6800/1/2/3.
Definition: m680x.h:500
@ M680X_INS_BRCLR
Definition: m680x.h:239
@ M680X_INS_CMPD
Definition: m680x.h:267
@ M680X_INS_EDIVS
Definition: m680x.h:311
@ M680X_INS_IBNE
Definition: m680x.h:329
@ M680X_INS_WAV
Definition: m680x.h:526
@ M680X_INS_ASRD
Definition: m680x.h:206
@ M680X_INS_STHX
Definition: m680x.h:480
@ M680X_INS_IBEQ
Definition: m680x.h:328
@ M680X_INS_INCA
Definition: m680x.h:334
@ M680X_INS_TFR
Definition: m680x.h:508
@ M680X_INS_TST
Definition: m680x.h:511
@ M680X_INS_BVC
Definition: m680x.h:245
@ M680X_INS_SUB
Definition: m680x.h:487
@ M680X_INS_ANDD
Definition: m680x.h:197
@ M680X_INS_CMPR
Definition: m680x.h:270
@ M680X_INS_CLRF
Definition: m680x.h:259
@ M680X_INS_LBSR
Definition: m680x.h:360
@ M680X_INS_LDU
Definition: m680x.h:375
@ M680X_INS_BITMD
Definition: m680x.h:229
@ M680X_INS_DBEQ
Definition: m680x.h:291
@ M680X_INS_ADDE
Definition: m680x.h:186
@ M680X_INS_DIVD
Definition: m680x.h:308
@ M680X_INS_LSLA
Definition: m680x.h:384
@ M680X_INS_NSA
Definition: m680x.h:410
@ M680X_INS_LBVS
Definition: m680x.h:362
@ M680X_INS_LSRX
Definition: m680x.h:393
@ M680X_INS_SBCD
Definition: m680x.h:463
@ M680X_INS_TBL
Definition: m680x.h:504
@ M680X_INS_REVW
Definition: m680x.h:442
@ M680X_INS_EMIND
Definition: m680x.h:316
@ M680X_INS_LSRW
Definition: m680x.h:392
@ M680X_INS_PSHY
Definition: m680x.h:429
@ M680X_INS_INS
M6800/1/2/3.
Definition: m680x.h:341
@ M680X_INS_TSTD
Definition: m680x.h:514
@ M680X_INS_ASLA
Definition: m680x.h:200
@ M680X_INS_EORD
Definition: m680x.h:323
@ M680X_INS_MAXA
Definition: m680x.h:394
@ M680X_INS_TEST
Definition: m680x.h:506
@ M680X_INS_ROLX
Definition: m680x.h:448
@ M680X_INS_PSHU
Definition: m680x.h:426
@ M680X_INS_SEX
Definition: m680x.h:468
@ M680X_INS_ADCD
Definition: m680x.h:180
@ M680X_INS_ASRB
Definition: m680x.h:205
@ M680X_INS_SBCA
Definition: m680x.h:461
@ M680X_INS_SBCB
Definition: m680x.h:462
@ M680X_INS_EOR
Definition: m680x.h:320
@ M680X_INS_NEGD
Definition: m680x.h:407
@ M680X_INS_CLRA
Definition: m680x.h:255
@ M680X_INS_ROLB
Definition: m680x.h:445
@ M680X_INS_DECD
Definition: m680x.h:299
@ M680X_INS_CMPY
Definition: m680x.h:275
@ M680X_INS_TBEQ
Definition: m680x.h:503
@ M680X_INS_BCLR
Definition: m680x.h:210
@ M680X_INS_TSTE
Definition: m680x.h:515
@ M680X_INS_DBNZX
Definition: m680x.h:295
@ M680X_INS_CLRB
Definition: m680x.h:256
@ M680X_INS_BLE
Definition: m680x.h:230
@ M680X_INS_LDD
Definition: m680x.h:368
@ M680X_INS_CLRX
Definition: m680x.h:262
@ M680X_INS_PSHD
Definition: m680x.h:422
@ M680X_INS_LBPL
Definition: m680x.h:357
@ M680X_INS_LDF
Definition: m680x.h:370
@ M680X_INS_PSHH
Definition: m680x.h:423
@ M680X_INS_LBGT
Definition: m680x.h:350
@ M680X_INS_STU
Definition: m680x.h:483
@ M680X_INS_INCB
Definition: m680x.h:335
@ M680X_INS_ABY
Definition: m680x.h:176
@ M680X_INS_ORB
Definition: m680x.h:415
@ M680X_INS_TSTW
Definition: m680x.h:517
@ M680X_INS_DBNE
Definition: m680x.h:292
@ M680X_INS_LBGE
Definition: m680x.h:349
@ M680X_INS_LDS
Definition: m680x.h:374
@ M680X_INS_SWI3
Definition: m680x.h:497
@ M680X_INS_PULD
Definition: m680x.h:433
@ M680X_INS_BIL
Definition: m680x.h:223
@ M680X_INS_RORB
Definition: m680x.h:451
@ M680X_INS_RORX
Definition: m680x.h:454
@ M680X_INS_INCD
Definition: m680x.h:336
@ M680X_INS_TSX
M6800/1/2/3.
Definition: m680x.h:519
@ M680X_INS_COMW
Definition: m680x.h:282
@ M680X_INS_NEGB
Definition: m680x.h:406
@ M680X_INS_BCC
or BHS
Definition: m680x.h:209
@ M680X_INS_EMAXM
Definition: m680x.h:315
@ M680X_INS_LEAS
Definition: m680x.h:379
@ M680X_INS_PULS
Definition: m680x.h:435
@ M680X_INS_ADC
Definition: m680x.h:177
@ M680X_INS_AIX
Definition: m680x.h:192
@ M680X_INS_XGDY
Definition: m680x.h:529
@ M680X_INS_EORR
Definition: m680x.h:324
@ M680X_INS_TAX
Definition: m680x.h:501
@ M680X_INS_LBHI
Definition: m680x.h:351
@ M680X_INS_STQ
Definition: m680x.h:481
@ M680X_INS_TBNE
Definition: m680x.h:505
@ M680X_INS_TXA
Definition: m680x.h:521
@ M680X_INS_EMULS
Definition: m680x.h:319
@ M680X_INS_STW
Definition: m680x.h:484
@ M680X_INS_EORB
Definition: m680x.h:322
@ M680X_INS_EXG
Definition: m680x.h:326
@ M680X_INS_RTS
Definition: m680x.h:458
@ M680X_INS_ROL
Definition: m680x.h:443
@ M680X_INS_LDE
Definition: m680x.h:369
@ M680X_INS_CBEQ
Definition: m680x.h:249
@ M680X_INS_LBLS
Definition: m680x.h:353
@ M680X_INS_DEY
Definition: m680x.h:306
@ M680X_INS_LDW
Definition: m680x.h:376
@ M680X_INS_RORA
Definition: m680x.h:450
@ M680X_INS_SUBF
Definition: m680x.h:492
@ M680X_INS_PULUW
Definition: m680x.h:438
@ M680X_INS_CLC
M6800/1/2/3.
Definition: m680x.h:252
@ M680X_INS_NOP
Definition: m680x.h:409
@ M680X_INS_ANDR
Definition: m680x.h:198
@ M680X_INS_SUBA
Definition: m680x.h:488
@ M680X_INS_STAA
M6800/1/2/3.
Definition: m680x.h:472
@ M680X_INS_LBRN
Definition: m680x.h:359
@ M680X_INS_MUL
Definition: m680x.h:402
@ M680X_INS_ASL
Definition: m680x.h:199
@ M680X_INS_DEC
Definition: m680x.h:296
@ M680X_INS_COMB
Definition: m680x.h:278
@ M680X_INS_REV
Definition: m680x.h:441
@ M680X_INS_ADDD
Definition: m680x.h:185
@ M680X_INS_DECX
Definition: m680x.h:303
@ M680X_INS_PULU
Definition: m680x.h:437
@ M680X_INS_ADDB
Definition: m680x.h:184
@ M680X_INS_PSHA
M6800/1/2/3.
Definition: m680x.h:419
@ M680X_INS_DECB
Definition: m680x.h:298
@ M680X_INS_ANDB
Definition: m680x.h:195
@ M680X_INS_STA
Definition: m680x.h:471
@ M680X_INS_STBT
Definition: m680x.h:475
@ M680X_INS_CMPE
Definition: m680x.h:268
@ M680X_INS_CBEQA
Definition: m680x.h:250
@ M680X_INS_STD
Definition: m680x.h:476
@ M680X_INS_INCE
Definition: m680x.h:337
@ M680X_INS_ASLD
or LSLD
Definition: m680x.h:202
@ M680X_INS_ADDA
Definition: m680x.h:183
@ M680X_INS_SBA
M6800/1/2/3.
Definition: m680x.h:459
@ M680X_INS_INY
Definition: m680x.h:343
@ M680X_INS_SBC
Definition: m680x.h:460
@ M680X_INS_PULH
Definition: m680x.h:434
@ M680X_INS_PSHS
Definition: m680x.h:424
@ M680X_INS_LSRB
Definition: m680x.h:390
@ M680X_INS_RORD
Definition: m680x.h:452
@ M680X_INS_ADDW
Definition: m680x.h:189
@ M680X_INS_DECF
Definition: m680x.h:301
@ M680X_INS_LDA
Definition: m680x.h:363
@ M680X_INS_LBEQ
Definition: m680x.h:348
@ M680X_INS_STY
Definition: m680x.h:486
@ M680X_INS_MOV
Definition: m680x.h:399
@ M680X_INS_LDAA
M6800/1/2/3.
Definition: m680x.h:364
@ M680X_INS_LSLX
Definition: m680x.h:387
@ M680X_INS_LDHX
Definition: m680x.h:371
@ M680X_INS_COMA
Definition: m680x.h:277
@ M680X_INS_PULC
Definition: m680x.h:432
@ M680X_INS_LEAX
Definition: m680x.h:381
@ M680X_INS_ANDCC
Definition: m680x.h:196
@ M680X_INS_CMPB
Definition: m680x.h:266
@ M680X_INS_BSR
Definition: m680x.h:244
@ M680X_INS_LSL
Definition: m680x.h:383
@ M680X_INS_ORA
Definition: m680x.h:412
@ M680X_INS_MAXM
Definition: m680x.h:395
@ M680X_INS_INX
M6800/1/2/3.
Definition: m680x.h:342
@ M680X_INS_LSRD
or ASRD
Definition: m680x.h:391
@ M680X_INS_BOR
Definition: m680x.h:237
@ M680X_INS_MINM
Definition: m680x.h:398
@ M680X_INS_NEGX
Definition: m680x.h:408
@ M680X_INS_BVS
Definition: m680x.h:246
@ M680X_INS_CLV
M6800/1/2/3.
Definition: m680x.h:263
@ M680X_INS_STX
Definition: m680x.h:485
@ M680X_INS_BITB
Definition: m680x.h:227
@ M680X_INS_CPX
M6800/1/2/3.
Definition: m680x.h:287
@ M680X_INS_LBVC
Definition: m680x.h:361
@ M680X_INS_SWI2
Definition: m680x.h:496
@ M680X_INS_PULSW
Definition: m680x.h:436
@ M680X_INS_AIS
Definition: m680x.h:191
@ M680X_INS_LEAY
Definition: m680x.h:382
@ M680X_INS_BGE
Definition: m680x.h:214
@ M680X_INS_DIVQ
Definition: m680x.h:309
@ M680X_INS_BITA
Definition: m680x.h:226
@ M680X_INS_RTI
Definition: m680x.h:457
@ M680X_INS_DEX
M6800/1/2/3.
Definition: m680x.h:305
@ M680X_INS_STOP
Definition: m680x.h:479
@ M680X_INS_SEI
Definition: m680x.h:466
@ M680X_INS_ASRX
Definition: m680x.h:207
@ M680X_INS_EMACS
Definition: m680x.h:313
@ M680X_INS_TIM
Definition: m680x.h:509
@ M680X_INS_JSR
Definition: m680x.h:345
@ M680X_INS_PULX
M6800/1/2/3.
Definition: m680x.h:439
@ M680X_INS_ASRA
Definition: m680x.h:204
@ M680X_INS_COMF
Definition: m680x.h:281
int n
Definition: mipsasm.c:19
int CS_ERR_OK
Definition: __init__.py:235
RzAnalysisOpMask
Definition: rz_analysis.h:439
@ RZ_ANALYSIS_OP_TYPE_CMP
Definition: rz_analysis.h:399
@ RZ_ANALYSIS_OP_TYPE_SUB
Definition: rz_analysis.h:402
@ RZ_ANALYSIS_OP_TYPE_MUL
Definition: rz_analysis.h:404
@ RZ_ANALYSIS_OP_TYPE_JMP
Definition: rz_analysis.h:368
@ RZ_ANALYSIS_OP_TYPE_SWI
Definition: rz_analysis.h:393
@ RZ_ANALYSIS_OP_TYPE_ADD
Definition: rz_analysis.h:401
@ RZ_ANALYSIS_OP_TYPE_RJMP
Definition: rz_analysis.h:370
@ RZ_ANALYSIS_OP_TYPE_CJMP
Definition: rz_analysis.h:373
@ RZ_ANALYSIS_OP_TYPE_DIV
Definition: rz_analysis.h:405
@ RZ_ANALYSIS_OP_TYPE_MOV
Definition: rz_analysis.h:390
@ RZ_ANALYSIS_OP_TYPE_ILL
Definition: rz_analysis.h:387
@ RZ_ANALYSIS_OP_TYPE_NOT
Definition: rz_analysis.h:414
@ RZ_ANALYSIS_OP_TYPE_NOP
Definition: rz_analysis.h:389
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
@ RZ_LIB_TYPE_ANALYSIS
Definition: rz_lib.h:73
#define RZ_MIN(x, y)
#define UT64_MAX
Definition: rz_types_base.h:86
#define RZ_VERSION
Definition: rz_version.h:8
#define a(i)
Definition: sha256.c:41
const char * version
Definition: rz_analysis.h:1239
Definition: dis.c:32
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static int addr
Definition: z80asm.c:58