1 #line 1 "rl78-decode.opc"
9 #include "opcode/rl78.h"
15 RL78_Opcode_Decoded
* rl78
;
16 int (* getbyte
)(void *);
21 #define ID(x) rl78->id = RLO_##x, rl78->lineno = __LINE__
22 #define OP(n,t,r,a) (rl78->op[n].type = t, \
23 rl78->op[n].reg = r, \
24 rl78->op[n].addend = a )
25 #define OPX(n,t,r1,r2,a) \
26 (rl78->op[n].type = t, \
27 rl78->op[n].reg = r1, \
28 rl78->op[n].reg2 = r2, \
29 rl78->op[n].addend = a )
31 #define W() rl78->size = RL78_Word
33 #define AU ATTRIBUTE_UNUSED
34 #define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
35 #define B ((unsigned long) GETBYTE())
37 #define SYNTAX(x) rl78->syntax = x
39 #define UNSUPPORTED() \
40 rl78->syntax = "*unknown*"
42 #define RB(x) ((x)+RL78_Reg_X)
43 #define RW(x) ((x)+RL78_Reg_AX)
45 #define Fz rl78->flags = RL78_PSW_Z
46 #define Fza rl78->flags = RL78_PSW_Z | RL78_PSW_AC
47 #define Fzc rl78->flags = RL78_PSW_Z | RL78_PSW_CY
48 #define Fzac rl78->flags = RL78_PSW_Z | RL78_PSW_AC | RL78_PSW_CY
49 #define Fa rl78->flags = RL78_PSW_AC
50 #define Fc rl78->flags = RL78_PSW_CY
51 #define Fac rl78->flags = RL78_PSW_AC | RL78_PSW_CY
53 #define IMMU(bytes) immediate (bytes, 0, ld)
54 #define IMMS(bytes) immediate (bytes, 1, ld)
57 immediate (int bytes
, int sign_extend
, LocalData
* ld
)
65 if (sign_extend
&& (i
& 0x80))
71 if (sign_extend
&& (i
& 0x8000))
78 if (sign_extend
&& (i
& 0x800000))
82 fprintf (stderr
, "Programmer error: immediate() called with invalid byte count %d\n", bytes
);
88 #define DC(c) OP (0, RL78_Operand_Immediate, 0, c)
89 #define DR(r) OP (0, RL78_Operand_Register, RL78_Reg_##r, 0)
90 #define DRB(r) OP (0, RL78_Operand_Register, RB(r), 0)
91 #define DRW(r) OP (0, RL78_Operand_Register, RW(r), 0)
92 #define DM(r,a) OP (0, RL78_Operand_Indirect, RL78_Reg_##r, a)
93 #define DM2(r1,r2,a) OPX (0, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
94 #define DE() rl78->op[0].use_es = 1
95 #define DB(b) set_bit (rl78->op, b)
96 #define DCY() DR(PSW); DB(0)
97 #define DPUSH() OP (0, RL78_Operand_PreDec, RL78_Reg_SP, 0);
99 #define SC(c) OP (1, RL78_Operand_Immediate, 0, c)
100 #define SR(r) OP (1, RL78_Operand_Register, RL78_Reg_##r, 0)
101 #define SRB(r) OP (1, RL78_Operand_Register, RB(r), 0)
102 #define SRW(r) OP (1, RL78_Operand_Register, RW(r), 0)
103 #define SM(r,a) OP (1, RL78_Operand_Indirect, RL78_Reg_##r, a)
104 #define SM2(r1,r2,a) OPX (1, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
105 #define SE() rl78->op[1].use_es = 1
106 #define SB(b) set_bit (rl78->op+1, b)
107 #define SCY() SR(PSW); SB(0)
108 #define COND(c) rl78->op[1].condition = RL78_Condition_##c
109 #define SPOP() OP (1, RL78_Operand_PostInc, RL78_Reg_SP, 0);
112 set_bit (RL78_Opcode_Operand
*op
, int bit
)
114 op
->bit_number
= bit
;
116 case RL78_Operand_Register
:
117 op
->type
= RL78_Operand_Bit
;
119 case RL78_Operand_Indirect
:
120 op
->type
= RL78_Operand_BitIndirect
;
141 #define SADDR saddr (IMMU (1))
142 #define SFR sfr (IMMU (1))
145 rl78_decode_opcode (unsigned long pc AU
,
146 RL78_Opcode_Decoded
* rl78
,
147 int (* getbyte
)(void *),
150 LocalData lds
, * ld
= &lds
;
151 unsigned char op_buf
[20] = {0};
152 unsigned char *op
= op_buf
;
156 lds
.getbyte
= getbyte
;
160 memset (rl78
, 0, sizeof (*rl78
));
164 /* Byte registers, not including A. */
165 /* Word registers, not including AX. */
167 /*----------------------------------------------------------------------*/
171 switch (op
[0] & 0xff)
178 printf ("\033[33m%s\033[0m %02x\n",
179 "/** 0000 0000 nop */",
183 #line 887 "rl78-decode.opc"
186 /*----------------------------------------------------------------------*/
195 /** 0000 0rw1 addw %0, %1 */
196 #line 253 "rl78-decode.opc"
197 int rw AU
= (op
[0] >> 1) & 0x03;
200 printf ("\033[33m%s\033[0m %02x\n",
201 "/** 0000 0rw1 addw %0, %1 */",
203 printf (" rw = 0x%x\n", rw
);
205 SYNTAX("addw %0, %1");
206 #line 253 "rl78-decode.opc"
207 ID(add
); W(); DR(AX
); SRW(rw
); Fzac
;
213 /** 0000 0010 addw %0, %e1%!1 */
216 printf ("\033[33m%s\033[0m %02x\n",
217 "/** 0000 0010 addw %0, %e1%!1 */",
220 SYNTAX("addw %0, %e1%!1");
221 #line 244 "rl78-decode.opc"
222 ID(add
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
228 /** 0000 0100 addw %0, #%1 */
231 printf ("\033[33m%s\033[0m %02x\n",
232 "/** 0000 0100 addw %0, #%1 */",
235 SYNTAX("addw %0, #%1");
236 #line 250 "rl78-decode.opc"
237 ID(add
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
243 /** 0000 0110 addw %0, %1 */
246 printf ("\033[33m%s\033[0m %02x\n",
247 "/** 0000 0110 addw %0, %1 */",
250 SYNTAX("addw %0, %1");
251 #line 256 "rl78-decode.opc"
252 ID(add
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
258 /** 0000 1000 xch a, x */
261 printf ("\033[33m%s\033[0m %02x\n",
262 "/** 0000 1000 xch a, x */",
266 #line 1205 "rl78-decode.opc"
267 ID(xch
); DR(A
); SR(X
);
269 /*----------------------------------------------------------------------*/
275 /** 0000 1001 mov %0, %e1%1 */
278 printf ("\033[33m%s\033[0m %02x\n",
279 "/** 0000 1001 mov %0, %e1%1 */",
282 SYNTAX("mov %0, %e1%1");
283 #line 657 "rl78-decode.opc"
284 ID(mov
); DR(A
); SM(B
, IMMU(2));
290 /** 0000 1010 add %0, #%1 */
293 printf ("\033[33m%s\033[0m %02x\n",
294 "/** 0000 1010 add %0, #%1 */",
297 SYNTAX("add %0, #%1");
298 #line 207 "rl78-decode.opc"
299 ID(add
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
301 /*----------------------------------------------------------------------*/
307 /** 0000 1011 add %0, %1 */
310 printf ("\033[33m%s\033[0m %02x\n",
311 "/** 0000 1011 add %0, %1 */",
314 SYNTAX("add %0, %1");
315 #line 201 "rl78-decode.opc"
316 ID(add
); DR(A
); SM(None
, SADDR
); Fzac
;
322 /** 0000 1100 add %0, #%1 */
325 printf ("\033[33m%s\033[0m %02x\n",
326 "/** 0000 1100 add %0, #%1 */",
329 SYNTAX("add %0, #%1");
330 #line 195 "rl78-decode.opc"
331 ID(add
); DR(A
); SC(IMMU(1)); Fzac
;
337 /** 0000 1101 add %0, %e1%1 */
340 printf ("\033[33m%s\033[0m %02x\n",
341 "/** 0000 1101 add %0, %e1%1 */",
344 SYNTAX("add %0, %e1%1");
345 #line 183 "rl78-decode.opc"
346 ID(add
); DR(A
); SM(HL
, 0); Fzac
;
352 /** 0000 1110 add %0, %e1%1 */
355 printf ("\033[33m%s\033[0m %02x\n",
356 "/** 0000 1110 add %0, %e1%1 */",
359 SYNTAX("add %0, %e1%1");
360 #line 189 "rl78-decode.opc"
361 ID(add
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
367 /** 0000 1111 add %0, %e1%!1 */
370 printf ("\033[33m%s\033[0m %02x\n",
371 "/** 0000 1111 add %0, %e1%!1 */",
374 SYNTAX("add %0, %e1%!1");
375 #line 180 "rl78-decode.opc"
376 ID(add
); DR(A
); SM(None
, IMMU(2)); Fzac
;
382 /** 0001 0000 addw %0, #%1 */
385 printf ("\033[33m%s\033[0m %02x\n",
386 "/** 0001 0000 addw %0, #%1 */",
389 SYNTAX("addw %0, #%1");
390 #line 259 "rl78-decode.opc"
391 ID(add
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
393 /*----------------------------------------------------------------------*/
402 printf ("\033[33m%s\033[0m %02x\n",
403 "/** 0001 0001 es: */",
407 #line 172 "rl78-decode.opc"
413 /*----------------------------------------------------------------------*/
421 /** 0001 0ra0 movw %0, %1 */
422 #line 835 "rl78-decode.opc"
423 int ra AU
= (op
[0] >> 1) & 0x03;
426 printf ("\033[33m%s\033[0m %02x\n",
427 "/** 0001 0ra0 movw %0, %1 */",
429 printf (" ra = 0x%x\n", ra
);
431 SYNTAX("movw %0, %1");
432 #line 835 "rl78-decode.opc"
433 ID(mov
); W(); DRW(ra
); SR(AX
);
441 /** 0001 0ra1 movw %0, %1 */
442 #line 832 "rl78-decode.opc"
443 int ra AU
= (op
[0] >> 1) & 0x03;
446 printf ("\033[33m%s\033[0m %02x\n",
447 "/** 0001 0ra1 movw %0, %1 */",
449 printf (" ra = 0x%x\n", ra
);
451 SYNTAX("movw %0, %1");
452 #line 832 "rl78-decode.opc"
453 ID(mov
); W(); DR(AX
); SRW(ra
);
459 /** 0001 1000 mov %e0%0, %1 */
462 printf ("\033[33m%s\033[0m %02x\n",
463 "/** 0001 1000 mov %e0%0, %1 */",
466 SYNTAX("mov %e0%0, %1");
467 #line 708 "rl78-decode.opc"
468 ID(mov
); DM(B
, IMMU(2)); SR(A
);
474 /** 0001 1001 mov %e0%0, #%1 */
477 printf ("\033[33m%s\033[0m %02x\n",
478 "/** 0001 1001 mov %e0%0, #%1 */",
481 SYNTAX("mov %e0%0, #%1");
482 #line 705 "rl78-decode.opc"
483 ID(mov
); DM(B
, IMMU(2)); SC(IMMU(1));
489 /** 0001 1010 addc %0, #%1 */
492 printf ("\033[33m%s\033[0m %02x\n",
493 "/** 0001 1010 addc %0, #%1 */",
496 SYNTAX("addc %0, #%1");
497 #line 239 "rl78-decode.opc"
498 ID(addc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
500 /*----------------------------------------------------------------------*/
506 /** 0001 1011 addc %0, %1 */
509 printf ("\033[33m%s\033[0m %02x\n",
510 "/** 0001 1011 addc %0, %1 */",
513 SYNTAX("addc %0, %1");
514 #line 236 "rl78-decode.opc"
515 ID(addc
); DR(A
); SM(None
, SADDR
); Fzac
;
521 /** 0001 1100 addc %0, #%1 */
524 printf ("\033[33m%s\033[0m %02x\n",
525 "/** 0001 1100 addc %0, #%1 */",
528 SYNTAX("addc %0, #%1");
529 #line 227 "rl78-decode.opc"
530 ID(addc
); DR(A
); SC(IMMU(1)); Fzac
;
536 /** 0001 1101 addc %0, %e1%1 */
539 printf ("\033[33m%s\033[0m %02x\n",
540 "/** 0001 1101 addc %0, %e1%1 */",
543 SYNTAX("addc %0, %e1%1");
544 #line 215 "rl78-decode.opc"
545 ID(addc
); DR(A
); SM(HL
, 0); Fzac
;
551 /** 0001 1110 addc %0, %e1%1 */
554 printf ("\033[33m%s\033[0m %02x\n",
555 "/** 0001 1110 addc %0, %e1%1 */",
558 SYNTAX("addc %0, %e1%1");
559 #line 224 "rl78-decode.opc"
560 ID(addc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
566 /** 0001 1111 addc %0, %e1%!1 */
569 printf ("\033[33m%s\033[0m %02x\n",
570 "/** 0001 1111 addc %0, %e1%!1 */",
573 SYNTAX("addc %0, %e1%!1");
574 #line 212 "rl78-decode.opc"
575 ID(addc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
581 /** 0010 0000 subw %0, #%1 */
584 printf ("\033[33m%s\033[0m %02x\n",
585 "/** 0010 0000 subw %0, #%1 */",
588 SYNTAX("subw %0, #%1");
589 #line 1169 "rl78-decode.opc"
590 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
592 /*----------------------------------------------------------------------*/
601 /** 0010 0rw1 subw %0, %1 */
602 #line 1163 "rl78-decode.opc"
603 int rw AU
= (op
[0] >> 1) & 0x03;
606 printf ("\033[33m%s\033[0m %02x\n",
607 "/** 0010 0rw1 subw %0, %1 */",
609 printf (" rw = 0x%x\n", rw
);
611 SYNTAX("subw %0, %1");
612 #line 1163 "rl78-decode.opc"
613 ID(sub
); W(); DR(AX
); SRW(rw
); Fzac
;
619 /** 0010 0010 subw %0, %e1%!1 */
622 printf ("\033[33m%s\033[0m %02x\n",
623 "/** 0010 0010 subw %0, %e1%!1 */",
626 SYNTAX("subw %0, %e1%!1");
627 #line 1154 "rl78-decode.opc"
628 ID(sub
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
634 /** 0010 0100 subw %0, #%1 */
637 printf ("\033[33m%s\033[0m %02x\n",
638 "/** 0010 0100 subw %0, #%1 */",
641 SYNTAX("subw %0, #%1");
642 #line 1160 "rl78-decode.opc"
643 ID(sub
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
649 /** 0010 0110 subw %0, %1 */
652 printf ("\033[33m%s\033[0m %02x\n",
653 "/** 0010 0110 subw %0, %1 */",
656 SYNTAX("subw %0, %1");
657 #line 1166 "rl78-decode.opc"
658 ID(sub
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
664 /** 0010 1000 mov %e0%0, %1 */
667 printf ("\033[33m%s\033[0m %02x\n",
668 "/** 0010 1000 mov %e0%0, %1 */",
671 SYNTAX("mov %e0%0, %1");
672 #line 720 "rl78-decode.opc"
673 ID(mov
); DM(C
, IMMU(2)); SR(A
);
679 /** 0010 1001 mov %0, %e1%1 */
682 printf ("\033[33m%s\033[0m %02x\n",
683 "/** 0010 1001 mov %0, %e1%1 */",
686 SYNTAX("mov %0, %e1%1");
687 #line 663 "rl78-decode.opc"
688 ID(mov
); DR(A
); SM(C
, IMMU(2));
694 /** 0010 1010 sub %0, #%1 */
697 printf ("\033[33m%s\033[0m %02x\n",
698 "/** 0010 1010 sub %0, #%1 */",
701 SYNTAX("sub %0, #%1");
702 #line 1117 "rl78-decode.opc"
703 ID(sub
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
705 /*----------------------------------------------------------------------*/
711 /** 0010 1011 sub %0, %1 */
714 printf ("\033[33m%s\033[0m %02x\n",
715 "/** 0010 1011 sub %0, %1 */",
718 SYNTAX("sub %0, %1");
719 #line 1111 "rl78-decode.opc"
720 ID(sub
); DR(A
); SM(None
, SADDR
); Fzac
;
726 /** 0010 1100 sub %0, #%1 */
729 printf ("\033[33m%s\033[0m %02x\n",
730 "/** 0010 1100 sub %0, #%1 */",
733 SYNTAX("sub %0, #%1");
734 #line 1105 "rl78-decode.opc"
735 ID(sub
); DR(A
); SC(IMMU(1)); Fzac
;
741 /** 0010 1101 sub %0, %e1%1 */
744 printf ("\033[33m%s\033[0m %02x\n",
745 "/** 0010 1101 sub %0, %e1%1 */",
748 SYNTAX("sub %0, %e1%1");
749 #line 1093 "rl78-decode.opc"
750 ID(sub
); DR(A
); SM(HL
, 0); Fzac
;
756 /** 0010 1110 sub %0, %e1%1 */
759 printf ("\033[33m%s\033[0m %02x\n",
760 "/** 0010 1110 sub %0, %e1%1 */",
763 SYNTAX("sub %0, %e1%1");
764 #line 1099 "rl78-decode.opc"
765 ID(sub
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
771 /** 0010 1111 sub %0, %e1%!1 */
774 printf ("\033[33m%s\033[0m %02x\n",
775 "/** 0010 1111 sub %0, %e1%!1 */",
778 SYNTAX("sub %0, %e1%!1");
779 #line 1090 "rl78-decode.opc"
780 ID(sub
); DR(A
); SM(None
, IMMU(2)); Fzac
;
789 /** 0011 0rg0 movw %0, #%1 */
790 #line 829 "rl78-decode.opc"
791 int rg AU
= (op
[0] >> 1) & 0x03;
794 printf ("\033[33m%s\033[0m %02x\n",
795 "/** 0011 0rg0 movw %0, #%1 */",
797 printf (" rg = 0x%x\n", rg
);
799 SYNTAX("movw %0, #%1");
800 #line 829 "rl78-decode.opc"
801 ID(mov
); W(); DRW(rg
); SC(IMMU(2));
807 switch (op
[1] & 0x8f)
811 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
812 #line 395 "rl78-decode.opc"
813 int bit AU
= (op
[1] >> 4) & 0x07;
816 printf ("\033[33m%s\033[0m %02x %02x\n",
817 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
819 printf (" bit = 0x%x\n", bit
);
821 SYNTAX("btclr %s1, $%a0");
822 #line 395 "rl78-decode.opc"
823 ID(branch_cond_clear
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
825 /*----------------------------------------------------------------------*/
831 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
832 #line 389 "rl78-decode.opc"
833 int bit AU
= (op
[1] >> 4) & 0x07;
836 printf ("\033[33m%s\033[0m %02x %02x\n",
837 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
839 printf (" bit = 0x%x\n", bit
);
841 SYNTAX("btclr %1, $%a0");
842 #line 389 "rl78-decode.opc"
843 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
849 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
850 #line 381 "rl78-decode.opc"
851 int bit AU
= (op
[1] >> 4) & 0x07;
854 printf ("\033[33m%s\033[0m %02x %02x\n",
855 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
857 printf (" bit = 0x%x\n", bit
);
859 SYNTAX("bt %s1, $%a0");
860 #line 381 "rl78-decode.opc"
861 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
863 /*----------------------------------------------------------------------*/
869 /** 0011 0001 0bit 0011 bt %1, $%a0 */
870 #line 375 "rl78-decode.opc"
871 int bit AU
= (op
[1] >> 4) & 0x07;
874 printf ("\033[33m%s\033[0m %02x %02x\n",
875 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
877 printf (" bit = 0x%x\n", bit
);
879 SYNTAX("bt %1, $%a0");
880 #line 375 "rl78-decode.opc"
881 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
887 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
888 #line 342 "rl78-decode.opc"
889 int bit AU
= (op
[1] >> 4) & 0x07;
892 printf ("\033[33m%s\033[0m %02x %02x\n",
893 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
895 printf (" bit = 0x%x\n", bit
);
897 SYNTAX("bf %s1, $%a0");
898 #line 342 "rl78-decode.opc"
899 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
901 /*----------------------------------------------------------------------*/
907 /** 0011 0001 0bit 0101 bf %1, $%a0 */
908 #line 336 "rl78-decode.opc"
909 int bit AU
= (op
[1] >> 4) & 0x07;
912 printf ("\033[33m%s\033[0m %02x %02x\n",
913 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
915 printf (" bit = 0x%x\n", bit
);
917 SYNTAX("bf %1, $%a0");
918 #line 336 "rl78-decode.opc"
919 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(F
);
925 /** 0011 0001 0cnt 0111 shl %0, %1 */
926 #line 1046 "rl78-decode.opc"
927 int cnt AU
= (op
[1] >> 4) & 0x07;
930 printf ("\033[33m%s\033[0m %02x %02x\n",
931 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
933 printf (" cnt = 0x%x\n", cnt
);
935 SYNTAX("shl %0, %1");
936 #line 1046 "rl78-decode.opc"
937 ID(shl
); DR(C
); SC(cnt
);
943 /** 0011 0001 0cnt 1000 shl %0, %1 */
944 #line 1043 "rl78-decode.opc"
945 int cnt AU
= (op
[1] >> 4) & 0x07;
948 printf ("\033[33m%s\033[0m %02x %02x\n",
949 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
951 printf (" cnt = 0x%x\n", cnt
);
953 SYNTAX("shl %0, %1");
954 #line 1043 "rl78-decode.opc"
955 ID(shl
); DR(B
); SC(cnt
);
961 /** 0011 0001 0cnt 1001 shl %0, %1 */
962 #line 1040 "rl78-decode.opc"
963 int cnt AU
= (op
[1] >> 4) & 0x07;
966 printf ("\033[33m%s\033[0m %02x %02x\n",
967 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
969 printf (" cnt = 0x%x\n", cnt
);
971 SYNTAX("shl %0, %1");
972 #line 1040 "rl78-decode.opc"
973 ID(shl
); DR(A
); SC(cnt
);
979 /** 0011 0001 0cnt 1010 shr %0, %1 */
980 #line 1057 "rl78-decode.opc"
981 int cnt AU
= (op
[1] >> 4) & 0x07;
984 printf ("\033[33m%s\033[0m %02x %02x\n",
985 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
987 printf (" cnt = 0x%x\n", cnt
);
989 SYNTAX("shr %0, %1");
990 #line 1057 "rl78-decode.opc"
991 ID(shr
); DR(A
); SC(cnt
);
997 /** 0011 0001 0cnt 1011 sar %0, %1 */
998 #line 1004 "rl78-decode.opc"
999 int cnt AU
= (op
[1] >> 4) & 0x07;
1002 printf ("\033[33m%s\033[0m %02x %02x\n",
1003 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1005 printf (" cnt = 0x%x\n", cnt
);
1007 SYNTAX("sar %0, %1");
1008 #line 1004 "rl78-decode.opc"
1009 ID(sar
); DR(A
); SC(cnt
);
1016 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1017 #line 1052 "rl78-decode.opc"
1018 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1021 printf ("\033[33m%s\033[0m %02x %02x\n",
1022 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1024 printf (" wcnt = 0x%x\n", wcnt
);
1026 SYNTAX("shlw %0, %1");
1027 #line 1052 "rl78-decode.opc"
1028 ID(shl
); W(); DR(BC
); SC(wcnt
);
1030 /*----------------------------------------------------------------------*/
1037 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1038 #line 1049 "rl78-decode.opc"
1039 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1042 printf ("\033[33m%s\033[0m %02x %02x\n",
1043 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1045 printf (" wcnt = 0x%x\n", wcnt
);
1047 SYNTAX("shlw %0, %1");
1048 #line 1049 "rl78-decode.opc"
1049 ID(shl
); W(); DR(AX
); SC(wcnt
);
1056 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1057 #line 1060 "rl78-decode.opc"
1058 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1061 printf ("\033[33m%s\033[0m %02x %02x\n",
1062 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1064 printf (" wcnt = 0x%x\n", wcnt
);
1066 SYNTAX("shrw %0, %1");
1067 #line 1060 "rl78-decode.opc"
1068 ID(shr
); W(); DR(AX
); SC(wcnt
);
1070 /*----------------------------------------------------------------------*/
1077 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1078 #line 1007 "rl78-decode.opc"
1079 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1082 printf ("\033[33m%s\033[0m %02x %02x\n",
1083 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1085 printf (" wcnt = 0x%x\n", wcnt
);
1087 SYNTAX("sarw %0, %1");
1088 #line 1007 "rl78-decode.opc"
1089 ID(sar
); W(); DR(AX
); SC(wcnt
);
1091 /*----------------------------------------------------------------------*/
1097 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
1098 #line 392 "rl78-decode.opc"
1099 int bit AU
= (op
[1] >> 4) & 0x07;
1102 printf ("\033[33m%s\033[0m %02x %02x\n",
1103 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1105 printf (" bit = 0x%x\n", bit
);
1107 SYNTAX("btclr %s1, $%a0");
1108 #line 392 "rl78-decode.opc"
1109 ID(branch_cond_clear
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1115 /** 0011 0001 1bit 0001 btclr %e1%1, $%a0 */
1116 #line 386 "rl78-decode.opc"
1117 int bit AU
= (op
[1] >> 4) & 0x07;
1120 printf ("\033[33m%s\033[0m %02x %02x\n",
1121 "/** 0011 0001 1bit 0001 btclr %e1%1, $%a0 */",
1123 printf (" bit = 0x%x\n", bit
);
1125 SYNTAX("btclr %e1%1, $%a0");
1126 #line 386 "rl78-decode.opc"
1127 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1133 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
1134 #line 378 "rl78-decode.opc"
1135 int bit AU
= (op
[1] >> 4) & 0x07;
1138 printf ("\033[33m%s\033[0m %02x %02x\n",
1139 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1141 printf (" bit = 0x%x\n", bit
);
1143 SYNTAX("bt %s1, $%a0");
1144 #line 378 "rl78-decode.opc"
1145 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1151 /** 0011 0001 1bit 0011 bt %e1%1, $%a0 */
1152 #line 372 "rl78-decode.opc"
1153 int bit AU
= (op
[1] >> 4) & 0x07;
1156 printf ("\033[33m%s\033[0m %02x %02x\n",
1157 "/** 0011 0001 1bit 0011 bt %e1%1, $%a0 */",
1159 printf (" bit = 0x%x\n", bit
);
1161 SYNTAX("bt %e1%1, $%a0");
1162 #line 372 "rl78-decode.opc"
1163 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1169 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
1170 #line 339 "rl78-decode.opc"
1171 int bit AU
= (op
[1] >> 4) & 0x07;
1174 printf ("\033[33m%s\033[0m %02x %02x\n",
1175 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1177 printf (" bit = 0x%x\n", bit
);
1179 SYNTAX("bf %s1, $%a0");
1180 #line 339 "rl78-decode.opc"
1181 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
1187 /** 0011 0001 1bit 0101 bf %e1%1, $%a0 */
1188 #line 333 "rl78-decode.opc"
1189 int bit AU
= (op
[1] >> 4) & 0x07;
1192 printf ("\033[33m%s\033[0m %02x %02x\n",
1193 "/** 0011 0001 1bit 0101 bf %e1%1, $%a0 */",
1195 printf (" bit = 0x%x\n", bit
);
1197 SYNTAX("bf %e1%1, $%a0");
1198 #line 333 "rl78-decode.opc"
1199 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(F
);
1203 default: UNSUPPORTED(); break;
1210 /** 0011 0ra1 xchw %0, %1 */
1211 #line 1210 "rl78-decode.opc"
1212 int ra AU
= (op
[0] >> 1) & 0x03;
1215 printf ("\033[33m%s\033[0m %02x\n",
1216 "/** 0011 0ra1 xchw %0, %1 */",
1218 printf (" ra = 0x%x\n", ra
);
1220 SYNTAX("xchw %0, %1");
1221 #line 1210 "rl78-decode.opc"
1222 ID(xch
); W(); DR(AX
); SRW(ra
);
1224 /*----------------------------------------------------------------------*/
1230 /** 0011 1000 mov %e0%0, #%1 */
1233 printf ("\033[33m%s\033[0m %02x\n",
1234 "/** 0011 1000 mov %e0%0, #%1 */",
1237 SYNTAX("mov %e0%0, #%1");
1238 #line 717 "rl78-decode.opc"
1239 ID(mov
); DM(C
, IMMU(2)); SC(IMMU(1));
1245 /** 0011 1001 mov %e0%0, #%1 */
1248 printf ("\033[33m%s\033[0m %02x\n",
1249 "/** 0011 1001 mov %e0%0, #%1 */",
1252 SYNTAX("mov %e0%0, #%1");
1253 #line 711 "rl78-decode.opc"
1254 ID(mov
); DM(BC
, IMMU(2)); SC(IMMU(1));
1260 /** 0011 1010 subc %0, #%1 */
1263 printf ("\033[33m%s\033[0m %02x\n",
1264 "/** 0011 1010 subc %0, #%1 */",
1267 SYNTAX("subc %0, #%1");
1268 #line 1149 "rl78-decode.opc"
1269 ID(subc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1271 /*----------------------------------------------------------------------*/
1277 /** 0011 1011 subc %0, %1 */
1280 printf ("\033[33m%s\033[0m %02x\n",
1281 "/** 0011 1011 subc %0, %1 */",
1284 SYNTAX("subc %0, %1");
1285 #line 1146 "rl78-decode.opc"
1286 ID(subc
); DR(A
); SM(None
, SADDR
); Fzac
;
1292 /** 0011 1100 subc %0, #%1 */
1295 printf ("\033[33m%s\033[0m %02x\n",
1296 "/** 0011 1100 subc %0, #%1 */",
1299 SYNTAX("subc %0, #%1");
1300 #line 1137 "rl78-decode.opc"
1301 ID(subc
); DR(A
); SC(IMMU(1)); Fzac
;
1307 /** 0011 1101 subc %0, %e1%1 */
1310 printf ("\033[33m%s\033[0m %02x\n",
1311 "/** 0011 1101 subc %0, %e1%1 */",
1314 SYNTAX("subc %0, %e1%1");
1315 #line 1125 "rl78-decode.opc"
1316 ID(subc
); DR(A
); SM(HL
, 0); Fzac
;
1322 /** 0011 1110 subc %0, %e1%1 */
1325 printf ("\033[33m%s\033[0m %02x\n",
1326 "/** 0011 1110 subc %0, %e1%1 */",
1329 SYNTAX("subc %0, %e1%1");
1330 #line 1134 "rl78-decode.opc"
1331 ID(subc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1337 /** 0011 1111 subc %0, %e1%!1 */
1340 printf ("\033[33m%s\033[0m %02x\n",
1341 "/** 0011 1111 subc %0, %e1%!1 */",
1344 SYNTAX("subc %0, %e1%!1");
1345 #line 1122 "rl78-decode.opc"
1346 ID(subc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1352 /** 0100 0000 cmp %e0%!0, #%1 */
1355 printf ("\033[33m%s\033[0m %02x\n",
1356 "/** 0100 0000 cmp %e0%!0, #%1 */",
1359 SYNTAX("cmp %e0%!0, #%1");
1360 #line 459 "rl78-decode.opc"
1361 ID(cmp
); DM(None
, IMMU(2)); SC(IMMU(1)); Fzac
;
1367 /** 0100 0001 mov %0, #%1 */
1370 printf ("\033[33m%s\033[0m %02x\n",
1371 "/** 0100 0001 mov %0, #%1 */",
1374 SYNTAX("mov %0, #%1");
1375 #line 696 "rl78-decode.opc"
1376 ID(mov
); DR(ES
); SC(IMMU(1));
1382 /** 0100 0010 cmpw %0, %e1%!1 */
1385 printf ("\033[33m%s\033[0m %02x\n",
1386 "/** 0100 0010 cmpw %0, %e1%!1 */",
1389 SYNTAX("cmpw %0, %e1%!1");
1390 #line 510 "rl78-decode.opc"
1391 ID(cmp
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
1399 /** 0100 0ra1 cmpw %0, %1 */
1400 #line 519 "rl78-decode.opc"
1401 int ra AU
= (op
[0] >> 1) & 0x03;
1404 printf ("\033[33m%s\033[0m %02x\n",
1405 "/** 0100 0ra1 cmpw %0, %1 */",
1407 printf (" ra = 0x%x\n", ra
);
1409 SYNTAX("cmpw %0, %1");
1410 #line 519 "rl78-decode.opc"
1411 ID(cmp
); W(); DR(AX
); SRW(ra
); Fzac
;
1417 /** 0100 0100 cmpw %0, #%1 */
1420 printf ("\033[33m%s\033[0m %02x\n",
1421 "/** 0100 0100 cmpw %0, #%1 */",
1424 SYNTAX("cmpw %0, #%1");
1425 #line 516 "rl78-decode.opc"
1426 ID(cmp
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
1432 /** 0100 0110 cmpw %0, %1 */
1435 printf ("\033[33m%s\033[0m %02x\n",
1436 "/** 0100 0110 cmpw %0, %1 */",
1439 SYNTAX("cmpw %0, %1");
1440 #line 522 "rl78-decode.opc"
1441 ID(cmp
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
1443 /*----------------------------------------------------------------------*/
1449 /** 0100 1000 mov %e0%0, %1 */
1452 printf ("\033[33m%s\033[0m %02x\n",
1453 "/** 0100 1000 mov %e0%0, %1 */",
1456 SYNTAX("mov %e0%0, %1");
1457 #line 714 "rl78-decode.opc"
1458 ID(mov
); DM(BC
, IMMU(2)); SR(A
);
1464 /** 0100 1001 mov %0, %e1%1 */
1467 printf ("\033[33m%s\033[0m %02x\n",
1468 "/** 0100 1001 mov %0, %e1%1 */",
1471 SYNTAX("mov %0, %e1%1");
1472 #line 660 "rl78-decode.opc"
1473 ID(mov
); DR(A
); SM(BC
, IMMU(2));
1479 /** 0100 1010 cmp %0, #%1 */
1482 printf ("\033[33m%s\033[0m %02x\n",
1483 "/** 0100 1010 cmp %0, #%1 */",
1486 SYNTAX("cmp %0, #%1");
1487 #line 462 "rl78-decode.opc"
1488 ID(cmp
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1494 /** 0100 1011 cmp %0, %1 */
1497 printf ("\033[33m%s\033[0m %02x\n",
1498 "/** 0100 1011 cmp %0, %1 */",
1501 SYNTAX("cmp %0, %1");
1502 #line 489 "rl78-decode.opc"
1503 ID(cmp
); DR(A
); SM(None
, SADDR
); Fzac
;
1505 /*----------------------------------------------------------------------*/
1511 /** 0100 1100 cmp %0, #%1 */
1514 printf ("\033[33m%s\033[0m %02x\n",
1515 "/** 0100 1100 cmp %0, #%1 */",
1518 SYNTAX("cmp %0, #%1");
1519 #line 480 "rl78-decode.opc"
1520 ID(cmp
); DR(A
); SC(IMMU(1)); Fzac
;
1526 /** 0100 1101 cmp %0, %e1%1 */
1529 printf ("\033[33m%s\033[0m %02x\n",
1530 "/** 0100 1101 cmp %0, %e1%1 */",
1533 SYNTAX("cmp %0, %e1%1");
1534 #line 468 "rl78-decode.opc"
1535 ID(cmp
); DR(A
); SM(HL
, 0); Fzac
;
1541 /** 0100 1110 cmp %0, %e1%1 */
1544 printf ("\033[33m%s\033[0m %02x\n",
1545 "/** 0100 1110 cmp %0, %e1%1 */",
1548 SYNTAX("cmp %0, %e1%1");
1549 #line 477 "rl78-decode.opc"
1550 ID(cmp
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1556 /** 0100 1111 cmp %0, %e1%!1 */
1559 printf ("\033[33m%s\033[0m %02x\n",
1560 "/** 0100 1111 cmp %0, %e1%!1 */",
1563 SYNTAX("cmp %0, %e1%!1");
1564 #line 465 "rl78-decode.opc"
1565 ID(cmp
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1578 /** 0101 0reg mov %0, #%1 */
1579 #line 648 "rl78-decode.opc"
1580 int reg AU
= op
[0] & 0x07;
1583 printf ("\033[33m%s\033[0m %02x\n",
1584 "/** 0101 0reg mov %0, #%1 */",
1586 printf (" reg = 0x%x\n", reg
);
1588 SYNTAX("mov %0, #%1");
1589 #line 648 "rl78-decode.opc"
1590 ID(mov
); DRB(reg
); SC(IMMU(1));
1596 /** 0101 1000 movw %e0%0, %1 */
1599 printf ("\033[33m%s\033[0m %02x\n",
1600 "/** 0101 1000 movw %e0%0, %1 */",
1603 SYNTAX("movw %e0%0, %1");
1604 #line 847 "rl78-decode.opc"
1605 ID(mov
); W(); DM(B
, IMMU(2)); SR(AX
);
1611 /** 0101 1001 movw %0, %e1%1 */
1614 printf ("\033[33m%s\033[0m %02x\n",
1615 "/** 0101 1001 movw %0, %e1%1 */",
1618 SYNTAX("movw %0, %e1%1");
1619 #line 838 "rl78-decode.opc"
1620 ID(mov
); W(); DR(AX
); SM(B
, IMMU(2));
1626 /** 0101 1010 and %0, #%1 */
1629 printf ("\033[33m%s\033[0m %02x\n",
1630 "/** 0101 1010 and %0, #%1 */",
1633 SYNTAX("and %0, #%1");
1634 #line 291 "rl78-decode.opc"
1635 ID(and); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
1637 /*----------------------------------------------------------------------*/
1643 /** 0101 1011 and %0, %1 */
1646 printf ("\033[33m%s\033[0m %02x\n",
1647 "/** 0101 1011 and %0, %1 */",
1650 SYNTAX("and %0, %1");
1651 #line 288 "rl78-decode.opc"
1652 ID(and); DR(A
); SM(None
, SADDR
); Fz
;
1658 /** 0101 1100 and %0, #%1 */
1661 printf ("\033[33m%s\033[0m %02x\n",
1662 "/** 0101 1100 and %0, #%1 */",
1665 SYNTAX("and %0, #%1");
1666 #line 279 "rl78-decode.opc"
1667 ID(and); DR(A
); SC(IMMU(1)); Fz
;
1673 /** 0101 1101 and %0, %e1%1 */
1676 printf ("\033[33m%s\033[0m %02x\n",
1677 "/** 0101 1101 and %0, %e1%1 */",
1680 SYNTAX("and %0, %e1%1");
1681 #line 267 "rl78-decode.opc"
1682 ID(and); DR(A
); SM(HL
, 0); Fz
;
1688 /** 0101 1110 and %0, %e1%1 */
1691 printf ("\033[33m%s\033[0m %02x\n",
1692 "/** 0101 1110 and %0, %e1%1 */",
1695 SYNTAX("and %0, %e1%1");
1696 #line 273 "rl78-decode.opc"
1697 ID(and); DR(A
); SM(HL
, IMMU(1)); Fz
;
1703 /** 0101 1111 and %0, %e1%!1 */
1706 printf ("\033[33m%s\033[0m %02x\n",
1707 "/** 0101 1111 and %0, %e1%!1 */",
1710 SYNTAX("and %0, %e1%!1");
1711 #line 264 "rl78-decode.opc"
1712 ID(and); DR(A
); SM(None
, IMMU(2)); Fz
;
1724 /** 0110 0rba mov %0, %1 */
1725 #line 651 "rl78-decode.opc"
1726 int rba AU
= op
[0] & 0x07;
1729 printf ("\033[33m%s\033[0m %02x\n",
1730 "/** 0110 0rba mov %0, %1 */",
1732 printf (" rba = 0x%x\n", rba
);
1734 SYNTAX("mov %0, %1");
1735 #line 651 "rl78-decode.opc"
1736 ID(mov
); DR(A
); SRB(rba
);
1742 switch (op
[1] & 0xff)
1753 /** 0110 0001 0000 0reg add %0, %1 */
1754 #line 204 "rl78-decode.opc"
1755 int reg AU
= op
[1] & 0x07;
1758 printf ("\033[33m%s\033[0m %02x %02x\n",
1759 "/** 0110 0001 0000 0reg add %0, %1 */",
1761 printf (" reg = 0x%x\n", reg
);
1763 SYNTAX("add %0, %1");
1764 #line 204 "rl78-decode.opc"
1765 ID(add
); DRB(reg
); SR(A
); Fzac
;
1777 /** 0110 0001 0000 1rba add %0, %1 */
1778 #line 198 "rl78-decode.opc"
1779 int rba AU
= op
[1] & 0x07;
1782 printf ("\033[33m%s\033[0m %02x %02x\n",
1783 "/** 0110 0001 0000 1rba add %0, %1 */",
1785 printf (" rba = 0x%x\n", rba
);
1787 SYNTAX("add %0, %1");
1788 #line 198 "rl78-decode.opc"
1789 ID(add
); DR(A
); SRB(rba
); Fzac
;
1795 /** 0110 0001 0000 1001 addw %0, %e1%1 */
1798 printf ("\033[33m%s\033[0m %02x %02x\n",
1799 "/** 0110 0001 0000 1001 addw %0, %e1%1 */",
1802 SYNTAX("addw %0, %e1%1");
1803 #line 247 "rl78-decode.opc"
1804 ID(add
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1817 /** 0110 0001 0001 0reg addc %0, %1 */
1818 #line 233 "rl78-decode.opc"
1819 int reg AU
= op
[1] & 0x07;
1822 printf ("\033[33m%s\033[0m %02x %02x\n",
1823 "/** 0110 0001 0001 0reg addc %0, %1 */",
1825 printf (" reg = 0x%x\n", reg
);
1827 SYNTAX("addc %0, %1");
1828 #line 233 "rl78-decode.opc"
1829 ID(addc
); DRB(reg
); SR(A
); Fzac
;
1841 /** 0110 0001 0001 1rba addc %0, %1 */
1842 #line 230 "rl78-decode.opc"
1843 int rba AU
= op
[1] & 0x07;
1846 printf ("\033[33m%s\033[0m %02x %02x\n",
1847 "/** 0110 0001 0001 1rba addc %0, %1 */",
1849 printf (" rba = 0x%x\n", rba
);
1851 SYNTAX("addc %0, %1");
1852 #line 230 "rl78-decode.opc"
1853 ID(addc
); DR(A
); SRB(rba
); Fzac
;
1866 /** 0110 0001 0010 0reg sub %0, %1 */
1867 #line 1114 "rl78-decode.opc"
1868 int reg AU
= op
[1] & 0x07;
1871 printf ("\033[33m%s\033[0m %02x %02x\n",
1872 "/** 0110 0001 0010 0reg sub %0, %1 */",
1874 printf (" reg = 0x%x\n", reg
);
1876 SYNTAX("sub %0, %1");
1877 #line 1114 "rl78-decode.opc"
1878 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1890 /** 0110 0001 0010 1rba sub %0, %1 */
1891 #line 1108 "rl78-decode.opc"
1892 int rba AU
= op
[1] & 0x07;
1895 printf ("\033[33m%s\033[0m %02x %02x\n",
1896 "/** 0110 0001 0010 1rba sub %0, %1 */",
1898 printf (" rba = 0x%x\n", rba
);
1900 SYNTAX("sub %0, %1");
1901 #line 1108 "rl78-decode.opc"
1902 ID(sub
); DR(A
); SRB(rba
); Fzac
;
1908 /** 0110 0001 0010 1001 subw %0, %e1%1 */
1911 printf ("\033[33m%s\033[0m %02x %02x\n",
1912 "/** 0110 0001 0010 1001 subw %0, %e1%1 */",
1915 SYNTAX("subw %0, %e1%1");
1916 #line 1157 "rl78-decode.opc"
1917 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1930 /** 0110 0001 0011 0reg subc %0, %1 */
1931 #line 1143 "rl78-decode.opc"
1932 int reg AU
= op
[1] & 0x07;
1935 printf ("\033[33m%s\033[0m %02x %02x\n",
1936 "/** 0110 0001 0011 0reg subc %0, %1 */",
1938 printf (" reg = 0x%x\n", reg
);
1940 SYNTAX("subc %0, %1");
1941 #line 1143 "rl78-decode.opc"
1942 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1954 /** 0110 0001 0011 1rba subc %0, %1 */
1955 #line 1140 "rl78-decode.opc"
1956 int rba AU
= op
[1] & 0x07;
1959 printf ("\033[33m%s\033[0m %02x %02x\n",
1960 "/** 0110 0001 0011 1rba subc %0, %1 */",
1962 printf (" rba = 0x%x\n", rba
);
1964 SYNTAX("subc %0, %1");
1965 #line 1140 "rl78-decode.opc"
1966 ID(subc
); DR(A
); SRB(rba
); Fzac
;
1979 /** 0110 0001 0100 0reg cmp %0, %1 */
1980 #line 486 "rl78-decode.opc"
1981 int reg AU
= op
[1] & 0x07;
1984 printf ("\033[33m%s\033[0m %02x %02x\n",
1985 "/** 0110 0001 0100 0reg cmp %0, %1 */",
1987 printf (" reg = 0x%x\n", reg
);
1989 SYNTAX("cmp %0, %1");
1990 #line 486 "rl78-decode.opc"
1991 ID(cmp
); DRB(reg
); SR(A
); Fzac
;
2003 /** 0110 0001 0100 1rba cmp %0, %1 */
2004 #line 483 "rl78-decode.opc"
2005 int rba AU
= op
[1] & 0x07;
2008 printf ("\033[33m%s\033[0m %02x %02x\n",
2009 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2011 printf (" rba = 0x%x\n", rba
);
2013 SYNTAX("cmp %0, %1");
2014 #line 483 "rl78-decode.opc"
2015 ID(cmp
); DR(A
); SRB(rba
); Fzac
;
2021 /** 0110 0001 0100 1001 cmpw %0, %e1%1 */
2024 printf ("\033[33m%s\033[0m %02x %02x\n",
2025 "/** 0110 0001 0100 1001 cmpw %0, %e1%1 */",
2028 SYNTAX("cmpw %0, %e1%1");
2029 #line 513 "rl78-decode.opc"
2030 ID(cmp
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
2043 /** 0110 0001 0101 0reg and %0, %1 */
2044 #line 285 "rl78-decode.opc"
2045 int reg AU
= op
[1] & 0x07;
2048 printf ("\033[33m%s\033[0m %02x %02x\n",
2049 "/** 0110 0001 0101 0reg and %0, %1 */",
2051 printf (" reg = 0x%x\n", reg
);
2053 SYNTAX("and %0, %1");
2054 #line 285 "rl78-decode.opc"
2055 ID(and); DRB(reg
); SR(A
); Fz
;
2067 /** 0110 0001 0101 1rba and %0, %1 */
2068 #line 282 "rl78-decode.opc"
2069 int rba AU
= op
[1] & 0x07;
2072 printf ("\033[33m%s\033[0m %02x %02x\n",
2073 "/** 0110 0001 0101 1rba and %0, %1 */",
2075 printf (" rba = 0x%x\n", rba
);
2077 SYNTAX("and %0, %1");
2078 #line 282 "rl78-decode.opc"
2079 ID(and); DR(A
); SRB(rba
); Fz
;
2085 /** 0110 0001 0101 1001 inc %e0%0 */
2088 printf ("\033[33m%s\033[0m %02x %02x\n",
2089 "/** 0110 0001 0101 1001 inc %e0%0 */",
2092 SYNTAX("inc %e0%0");
2093 #line 563 "rl78-decode.opc"
2094 ID(add
); DM(HL
, IMMU(1)); SC(1); Fza
;
2107 /** 0110 0001 0110 0reg or %0, %1 */
2108 #line 932 "rl78-decode.opc"
2109 int reg AU
= op
[1] & 0x07;
2112 printf ("\033[33m%s\033[0m %02x %02x\n",
2113 "/** 0110 0001 0110 0reg or %0, %1 */",
2115 printf (" reg = 0x%x\n", reg
);
2117 SYNTAX("or %0, %1");
2118 #line 932 "rl78-decode.opc"
2119 ID(or); DRB(reg
); SR(A
); Fz
;
2131 /** 0110 0001 0110 1rba or %0, %1 */
2132 #line 929 "rl78-decode.opc"
2133 int rba AU
= op
[1] & 0x07;
2136 printf ("\033[33m%s\033[0m %02x %02x\n",
2137 "/** 0110 0001 0110 1rba or %0, %1 */",
2139 printf (" rba = 0x%x\n", rba
);
2141 SYNTAX("or %0, %1");
2142 #line 929 "rl78-decode.opc"
2143 ID(or); DR(A
); SRB(rba
); Fz
;
2149 /** 0110 0001 0110 1001 dec %e0%0 */
2152 printf ("\033[33m%s\033[0m %02x %02x\n",
2153 "/** 0110 0001 0110 1001 dec %e0%0 */",
2156 SYNTAX("dec %e0%0");
2157 #line 530 "rl78-decode.opc"
2158 ID(sub
); DM(HL
, IMMU(1)); SC(1); Fza
;
2171 /** 0110 0001 0111 0reg xor %0, %1 */
2172 #line 1236 "rl78-decode.opc"
2173 int reg AU
= op
[1] & 0x07;
2176 printf ("\033[33m%s\033[0m %02x %02x\n",
2177 "/** 0110 0001 0111 0reg xor %0, %1 */",
2179 printf (" reg = 0x%x\n", reg
);
2181 SYNTAX("xor %0, %1");
2182 #line 1236 "rl78-decode.opc"
2183 ID(xor); DRB(reg
); SR(A
); Fz
;
2195 /** 0110 0001 0111 1rba xor %0, %1 */
2196 #line 1233 "rl78-decode.opc"
2197 int rba AU
= op
[1] & 0x07;
2200 printf ("\033[33m%s\033[0m %02x %02x\n",
2201 "/** 0110 0001 0111 1rba xor %0, %1 */",
2203 printf (" rba = 0x%x\n", rba
);
2205 SYNTAX("xor %0, %1");
2206 #line 1233 "rl78-decode.opc"
2207 ID(xor); DR(A
); SRB(rba
); Fz
;
2213 /** 0110 0001 0111 1001 incw %e0%0 */
2216 printf ("\033[33m%s\033[0m %02x %02x\n",
2217 "/** 0110 0001 0111 1001 incw %e0%0 */",
2220 SYNTAX("incw %e0%0");
2221 #line 577 "rl78-decode.opc"
2222 ID(add
); W(); DM(HL
, IMMU(1)); SC(1);
2229 /** 0110 0001 1000 000 add %0, %e1%1 */
2232 printf ("\033[33m%s\033[0m %02x %02x\n",
2233 "/** 0110 0001 1000 000 add %0, %e1%1 */",
2236 SYNTAX("add %0, %e1%1");
2237 #line 186 "rl78-decode.opc"
2238 ID(add
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2244 /** 0110 0001 1000 0010 add %0, %e1%1 */
2247 printf ("\033[33m%s\033[0m %02x %02x\n",
2248 "/** 0110 0001 1000 0010 add %0, %e1%1 */",
2251 SYNTAX("add %0, %e1%1");
2252 #line 192 "rl78-decode.opc"
2253 ID(add
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2290 /** 0110 0001 1nnn 01mm callt [%x0] */
2291 #line 412 "rl78-decode.opc"
2292 int nnn AU
= (op
[1] >> 4) & 0x07;
2293 #line 412 "rl78-decode.opc"
2294 int mm AU
= op
[1] & 0x03;
2297 printf ("\033[33m%s\033[0m %02x %02x\n",
2298 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2300 printf (" nnn = 0x%x,", nnn
);
2301 printf (" mm = 0x%x\n", mm
);
2303 SYNTAX("callt [%x0]");
2304 #line 412 "rl78-decode.opc"
2305 ID(call
); DM(None
, 0x80 + mm
*16 + nnn
*2);
2307 /*----------------------------------------------------------------------*/
2319 /** 0110 0001 1000 1reg xch %0, %1 */
2320 #line 1195 "rl78-decode.opc"
2321 int reg AU
= op
[1] & 0x07;
2324 printf ("\033[33m%s\033[0m %02x %02x\n",
2325 "/** 0110 0001 1000 1reg xch %0, %1 */",
2327 printf (" reg = 0x%x\n", reg
);
2329 SYNTAX("xch %0, %1");
2330 #line 1195 "rl78-decode.opc"
2331 /* Note: DECW uses reg == X, so this must follow DECW */
2332 ID(xch
); DR(A
); SRB(reg
);
2338 /** 0110 0001 1000 1001 decw %e0%0 */
2341 printf ("\033[33m%s\033[0m %02x %02x\n",
2342 "/** 0110 0001 1000 1001 decw %e0%0 */",
2345 SYNTAX("decw %e0%0");
2346 #line 544 "rl78-decode.opc"
2347 ID(sub
); W(); DM(HL
, IMMU(1)); SC(1);
2353 /** 0110 0001 1001 0000 addc %0, %e1%1 */
2356 printf ("\033[33m%s\033[0m %02x %02x\n",
2357 "/** 0110 0001 1001 0000 addc %0, %e1%1 */",
2360 SYNTAX("addc %0, %e1%1");
2361 #line 218 "rl78-decode.opc"
2362 ID(addc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2368 /** 0110 0001 1001 0010 addc %0, %e1%1 */
2371 printf ("\033[33m%s\033[0m %02x %02x\n",
2372 "/** 0110 0001 1001 0010 addc %0, %e1%1 */",
2375 SYNTAX("addc %0, %e1%1");
2376 #line 221 "rl78-decode.opc"
2377 ID(addc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2384 /** 0110 0001 1010 000 sub %0, %e1%1 */
2387 printf ("\033[33m%s\033[0m %02x %02x\n",
2388 "/** 0110 0001 1010 000 sub %0, %e1%1 */",
2391 SYNTAX("sub %0, %e1%1");
2392 #line 1096 "rl78-decode.opc"
2393 ID(sub
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2399 /** 0110 0001 1010 0010 sub %0, %e1%1 */
2402 printf ("\033[33m%s\033[0m %02x %02x\n",
2403 "/** 0110 0001 1010 0010 sub %0, %e1%1 */",
2406 SYNTAX("sub %0, %e1%1");
2407 #line 1102 "rl78-decode.opc"
2408 ID(sub
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2414 /** 0110 0001 1010 1000 xch %0, %1 */
2417 printf ("\033[33m%s\033[0m %02x %02x\n",
2418 "/** 0110 0001 1010 1000 xch %0, %1 */",
2421 SYNTAX("xch %0, %1");
2422 #line 1199 "rl78-decode.opc"
2423 ID(xch
); DR(A
); SM(None
, SADDR
);
2429 /** 0110 0001 1010 1001 xch %0, %e1%1 */
2432 printf ("\033[33m%s\033[0m %02x %02x\n",
2433 "/** 0110 0001 1010 1001 xch %0, %e1%1 */",
2436 SYNTAX("xch %0, %e1%1");
2437 #line 1192 "rl78-decode.opc"
2438 ID(xch
); DR(A
); SM2(HL
, C
, 0);
2444 /** 0110 0001 1010 1010 xch %0, %e1%!1 */
2447 printf ("\033[33m%s\033[0m %02x %02x\n",
2448 "/** 0110 0001 1010 1010 xch %0, %e1%!1 */",
2451 SYNTAX("xch %0, %e1%!1");
2452 #line 1174 "rl78-decode.opc"
2453 ID(xch
); DR(A
); SM(None
, IMMU(2));
2459 /** 0110 0001 1010 1011 xch %0, %1 */
2462 printf ("\033[33m%s\033[0m %02x %02x\n",
2463 "/** 0110 0001 1010 1011 xch %0, %1 */",
2466 SYNTAX("xch %0, %1");
2467 #line 1202 "rl78-decode.opc"
2468 ID(xch
); DR(A
); SM(None
, SFR
);
2474 /** 0110 0001 1010 1100 xch %0, %e1%1 */
2477 printf ("\033[33m%s\033[0m %02x %02x\n",
2478 "/** 0110 0001 1010 1100 xch %0, %e1%1 */",
2481 SYNTAX("xch %0, %e1%1");
2482 #line 1183 "rl78-decode.opc"
2483 ID(xch
); DR(A
); SM(HL
, 0);
2489 /** 0110 0001 1010 1101 xch %0, %e1%1 */
2492 printf ("\033[33m%s\033[0m %02x %02x\n",
2493 "/** 0110 0001 1010 1101 xch %0, %e1%1 */",
2496 SYNTAX("xch %0, %e1%1");
2497 #line 1189 "rl78-decode.opc"
2498 ID(xch
); DR(A
); SM(HL
, IMMU(1));
2504 /** 0110 0001 1010 1110 xch %0, %e1%1 */
2507 printf ("\033[33m%s\033[0m %02x %02x\n",
2508 "/** 0110 0001 1010 1110 xch %0, %e1%1 */",
2511 SYNTAX("xch %0, %e1%1");
2512 #line 1177 "rl78-decode.opc"
2513 ID(xch
); DR(A
); SM(DE
, 0);
2519 /** 0110 0001 1010 1111 xch %0, %e1%1 */
2522 printf ("\033[33m%s\033[0m %02x %02x\n",
2523 "/** 0110 0001 1010 1111 xch %0, %e1%1 */",
2526 SYNTAX("xch %0, %e1%1");
2527 #line 1180 "rl78-decode.opc"
2528 ID(xch
); DR(A
); SM(DE
, IMMU(1));
2534 /** 0110 0001 1011 0000 subc %0, %e1%1 */
2537 printf ("\033[33m%s\033[0m %02x %02x\n",
2538 "/** 0110 0001 1011 0000 subc %0, %e1%1 */",
2541 SYNTAX("subc %0, %e1%1");
2542 #line 1128 "rl78-decode.opc"
2543 ID(subc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2549 /** 0110 0001 1011 0010 subc %0, %e1%1 */
2552 printf ("\033[33m%s\033[0m %02x %02x\n",
2553 "/** 0110 0001 1011 0010 subc %0, %e1%1 */",
2556 SYNTAX("subc %0, %e1%1");
2557 #line 1131 "rl78-decode.opc"
2558 ID(subc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2564 /** 0110 0001 1011 1000 mov %0, %1 */
2567 printf ("\033[33m%s\033[0m %02x %02x\n",
2568 "/** 0110 0001 1011 1000 mov %0, %1 */",
2571 SYNTAX("mov %0, %1");
2572 #line 702 "rl78-decode.opc"
2573 ID(mov
); DR(ES
); SM(None
, SADDR
);
2579 /** 0110 0001 1011 1001 xch %0, %e1%1 */
2582 printf ("\033[33m%s\033[0m %02x %02x\n",
2583 "/** 0110 0001 1011 1001 xch %0, %e1%1 */",
2586 SYNTAX("xch %0, %e1%1");
2587 #line 1186 "rl78-decode.opc"
2588 ID(xch
); DR(A
); SM2(HL
, B
, 0);
2594 /** 0110 0001 1100 0000 cmp %0, %e1%1 */
2597 printf ("\033[33m%s\033[0m %02x %02x\n",
2598 "/** 0110 0001 1100 0000 cmp %0, %e1%1 */",
2601 SYNTAX("cmp %0, %e1%1");
2602 #line 471 "rl78-decode.opc"
2603 ID(cmp
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2609 /** 0110 0001 1100 0010 cmp %0, %e1%1 */
2612 printf ("\033[33m%s\033[0m %02x %02x\n",
2613 "/** 0110 0001 1100 0010 cmp %0, %e1%1 */",
2616 SYNTAX("cmp %0, %e1%1");
2617 #line 474 "rl78-decode.opc"
2618 ID(cmp
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2624 /** 0110 0001 1100 0011 bh $%a0 */
2627 printf ("\033[33m%s\033[0m %02x %02x\n",
2628 "/** 0110 0001 1100 0011 bh $%a0 */",
2632 #line 319 "rl78-decode.opc"
2633 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(H
);
2639 /** 0110 0001 1100 1000 sk%c1 */
2642 printf ("\033[33m%s\033[0m %02x %02x\n",
2643 "/** 0110 0001 1100 1000 sk%c1 */",
2647 #line 1065 "rl78-decode.opc"
2654 /** 0110 0001 1100 1001 mov %0, %e1%1 */
2657 printf ("\033[33m%s\033[0m %02x %02x\n",
2658 "/** 0110 0001 1100 1001 mov %0, %e1%1 */",
2661 SYNTAX("mov %0, %e1%1");
2662 #line 639 "rl78-decode.opc"
2663 ID(mov
); DR(A
); SM2(HL
, B
, 0);
2672 /** 0110 0001 11rg 1010 call %0 */
2673 #line 409 "rl78-decode.opc"
2674 int rg AU
= (op
[1] >> 4) & 0x03;
2677 printf ("\033[33m%s\033[0m %02x %02x\n",
2678 "/** 0110 0001 11rg 1010 call %0 */",
2680 printf (" rg = 0x%x\n", rg
);
2683 #line 409 "rl78-decode.opc"
2690 /** 0110 0001 1100 1011 br ax */
2693 printf ("\033[33m%s\033[0m %02x %02x\n",
2694 "/** 0110 0001 1100 1011 br ax */",
2698 #line 359 "rl78-decode.opc"
2701 /*----------------------------------------------------------------------*/
2707 /** 0110 0001 1100 1100 brk */
2710 printf ("\033[33m%s\033[0m %02x %02x\n",
2711 "/** 0110 0001 1100 1100 brk */",
2715 #line 367 "rl78-decode.opc"
2718 /*----------------------------------------------------------------------*/
2724 /** 0110 0001 1100 1101 pop %s0 */
2727 printf ("\033[33m%s\033[0m %02x %02x\n",
2728 "/** 0110 0001 1100 1101 pop %s0 */",
2732 #line 960 "rl78-decode.opc"
2733 ID(mov
); W(); DR(PSW
); SPOP();
2735 /*----------------------------------------------------------------------*/
2741 /** 0110 0001 1100 1110 movs %e0%0, %1 */
2744 printf ("\033[33m%s\033[0m %02x %02x\n",
2745 "/** 0110 0001 1100 1110 movs %e0%0, %1 */",
2748 SYNTAX("movs %e0%0, %1");
2749 #line 787 "rl78-decode.opc"
2750 ID(mov
); DM(HL
, IMMU(1)); SR(X
); Fzc
;
2752 /*----------------------------------------------------------------------*/
2761 /** 0110 0001 11rb 1111 sel rb%1 */
2762 #line 1012 "rl78-decode.opc"
2763 int rb AU
= (op
[1] >> 4) & 0x03;
2766 printf ("\033[33m%s\033[0m %02x %02x\n",
2767 "/** 0110 0001 11rb 1111 sel rb%1 */",
2769 printf (" rb = 0x%x\n", rb
);
2772 #line 1012 "rl78-decode.opc"
2775 /*----------------------------------------------------------------------*/
2781 /** 0110 0001 1101 0000 and %0, %e1%1 */
2784 printf ("\033[33m%s\033[0m %02x %02x\n",
2785 "/** 0110 0001 1101 0000 and %0, %e1%1 */",
2788 SYNTAX("and %0, %e1%1");
2789 #line 270 "rl78-decode.opc"
2790 ID(and); DR(A
); SM2(HL
, B
, 0); Fz
;
2796 /** 0110 0001 1101 0010 and %0, %e1%1 */
2799 printf ("\033[33m%s\033[0m %02x %02x\n",
2800 "/** 0110 0001 1101 0010 and %0, %e1%1 */",
2803 SYNTAX("and %0, %e1%1");
2804 #line 276 "rl78-decode.opc"
2805 ID(and); DR(A
); SM2(HL
, C
, 0); Fz
;
2811 /** 0110 0001 1101 0011 bnh $%a0 */
2814 printf ("\033[33m%s\033[0m %02x %02x\n",
2815 "/** 0110 0001 1101 0011 bnh $%a0 */",
2819 #line 322 "rl78-decode.opc"
2820 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(NH
);
2826 /** 0110 0001 1101 1000 sk%c1 */
2829 printf ("\033[33m%s\033[0m %02x %02x\n",
2830 "/** 0110 0001 1101 1000 sk%c1 */",
2834 #line 1071 "rl78-decode.opc"
2841 /** 0110 0001 1101 1001 mov %e0%0, %1 */
2844 printf ("\033[33m%s\033[0m %02x %02x\n",
2845 "/** 0110 0001 1101 1001 mov %e0%0, %1 */",
2848 SYNTAX("mov %e0%0, %1");
2849 #line 606 "rl78-decode.opc"
2850 ID(mov
); DM2(HL
, B
, 0); SR(A
);
2856 /** 0110 0001 1101 1011 ror %0, %1 */
2859 printf ("\033[33m%s\033[0m %02x %02x\n",
2860 "/** 0110 0001 1101 1011 ror %0, %1 */",
2863 SYNTAX("ror %0, %1");
2864 #line 993 "rl78-decode.opc"
2865 ID(ror
); DR(A
); SC(1);
2871 /** 0110 0001 1101 1100 rolc %0, %1 */
2874 printf ("\033[33m%s\033[0m %02x %02x\n",
2875 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2878 SYNTAX("rolc %0, %1");
2879 #line 987 "rl78-decode.opc"
2880 ID(rolc
); DR(A
); SC(1);
2886 /** 0110 0001 1101 1101 push %s1 */
2889 printf ("\033[33m%s\033[0m %02x %02x\n",
2890 "/** 0110 0001 1101 1101 push %s1 */",
2894 #line 968 "rl78-decode.opc"
2895 ID(mov
); W(); DPUSH(); SR(PSW
);
2897 /*----------------------------------------------------------------------*/
2903 /** 0110 0001 1101 1110 cmps %0, %e1%1 */
2906 printf ("\033[33m%s\033[0m %02x %02x\n",
2907 "/** 0110 0001 1101 1110 cmps %0, %e1%1 */",
2910 SYNTAX("cmps %0, %e1%1");
2911 #line 505 "rl78-decode.opc"
2912 ID(cmp
); DR(X
); SM(HL
, IMMU(1)); Fzac
;
2914 /*----------------------------------------------------------------------*/
2920 /** 0110 0001 1110 0000 or %0, %e1%1 */
2923 printf ("\033[33m%s\033[0m %02x %02x\n",
2924 "/** 0110 0001 1110 0000 or %0, %e1%1 */",
2927 SYNTAX("or %0, %e1%1");
2928 #line 917 "rl78-decode.opc"
2929 ID(or); DR(A
); SM2(HL
, B
, 0); Fz
;
2935 /** 0110 0001 1110 0010 or %0, %e1%1 */
2938 printf ("\033[33m%s\033[0m %02x %02x\n",
2939 "/** 0110 0001 1110 0010 or %0, %e1%1 */",
2942 SYNTAX("or %0, %e1%1");
2943 #line 923 "rl78-decode.opc"
2944 ID(or); DR(A
); SM2(HL
, C
, 0); Fz
;
2950 /** 0110 0001 1110 0011 sk%c1 */
2953 printf ("\033[33m%s\033[0m %02x %02x\n",
2954 "/** 0110 0001 1110 0011 sk%c1 */",
2958 #line 1068 "rl78-decode.opc"
2965 /** 0110 0001 1110 1000 sk%c1 */
2968 printf ("\033[33m%s\033[0m %02x %02x\n",
2969 "/** 0110 0001 1110 1000 sk%c1 */",
2973 #line 1080 "rl78-decode.opc"
2976 /*----------------------------------------------------------------------*/
2982 /** 0110 0001 1110 1001 mov %0, %e1%1 */
2985 printf ("\033[33m%s\033[0m %02x %02x\n",
2986 "/** 0110 0001 1110 1001 mov %0, %e1%1 */",
2989 SYNTAX("mov %0, %e1%1");
2990 #line 642 "rl78-decode.opc"
2991 ID(mov
); DR(A
); SM2(HL
, C
, 0);
2997 /** 0110 0001 1110 1011 rol %0, %1 */
3000 printf ("\033[33m%s\033[0m %02x %02x\n",
3001 "/** 0110 0001 1110 1011 rol %0, %1 */",
3004 SYNTAX("rol %0, %1");
3005 #line 984 "rl78-decode.opc"
3006 ID(rol
); DR(A
); SC(1);
3012 /** 0110 0001 1110 1100 retb */
3015 printf ("\033[33m%s\033[0m %02x %02x\n",
3016 "/** 0110 0001 1110 1100 retb */",
3020 #line 979 "rl78-decode.opc"
3023 /*----------------------------------------------------------------------*/
3029 /** 0110 0001 1110 1101 halt */
3032 printf ("\033[33m%s\033[0m %02x %02x\n",
3033 "/** 0110 0001 1110 1101 halt */",
3037 #line 555 "rl78-decode.opc"
3040 /*----------------------------------------------------------------------*/
3047 /** 0110 0001 111r 1110 rolwc %0, %1 */
3048 #line 990 "rl78-decode.opc"
3049 int r AU
= (op
[1] >> 4) & 0x01;
3052 printf ("\033[33m%s\033[0m %02x %02x\n",
3053 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3055 printf (" r = 0x%x\n", r
);
3057 SYNTAX("rolwc %0, %1");
3058 #line 990 "rl78-decode.opc"
3059 ID(rolc
); W(); DRW(r
); SC(1);
3065 /** 0110 0001 1111 0000 xor %0, %e1%1 */
3068 printf ("\033[33m%s\033[0m %02x %02x\n",
3069 "/** 0110 0001 1111 0000 xor %0, %e1%1 */",
3072 SYNTAX("xor %0, %e1%1");
3073 #line 1221 "rl78-decode.opc"
3074 ID(xor); DR(A
); SM2(HL
, B
, 0); Fz
;
3080 /** 0110 0001 1111 0010 xor %0, %e1%1 */
3083 printf ("\033[33m%s\033[0m %02x %02x\n",
3084 "/** 0110 0001 1111 0010 xor %0, %e1%1 */",
3087 SYNTAX("xor %0, %e1%1");
3088 #line 1227 "rl78-decode.opc"
3089 ID(xor); DR(A
); SM2(HL
, C
, 0); Fz
;
3095 /** 0110 0001 1111 0011 sk%c1 */
3098 printf ("\033[33m%s\033[0m %02x %02x\n",
3099 "/** 0110 0001 1111 0011 sk%c1 */",
3103 #line 1074 "rl78-decode.opc"
3110 /** 0110 0001 1111 1000 sk%c1 */
3113 printf ("\033[33m%s\033[0m %02x %02x\n",
3114 "/** 0110 0001 1111 1000 sk%c1 */",
3118 #line 1077 "rl78-decode.opc"
3125 /** 0110 0001 1111 1001 mov %e0%0, %1 */
3128 printf ("\033[33m%s\033[0m %02x %02x\n",
3129 "/** 0110 0001 1111 1001 mov %e0%0, %1 */",
3132 SYNTAX("mov %e0%0, %1");
3133 #line 615 "rl78-decode.opc"
3134 ID(mov
); DM2(HL
, C
, 0); SR(A
);
3140 /** 0110 0001 1111 1011 rorc %0, %1 */
3143 printf ("\033[33m%s\033[0m %02x %02x\n",
3144 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3147 SYNTAX("rorc %0, %1");
3148 #line 996 "rl78-decode.opc"
3149 ID(rorc
); DR(A
); SC(1);
3151 /*----------------------------------------------------------------------*/
3153 /* Note that the branch insns need to be listed before the shift
3154 ones, as "shift count of zero" means "branch insn" */
3160 /** 0110 0001 1111 1100 reti */
3163 printf ("\033[33m%s\033[0m %02x %02x\n",
3164 "/** 0110 0001 1111 1100 reti */",
3168 #line 976 "rl78-decode.opc"
3175 /** 0110 0001 1111 1101 stop */
3178 printf ("\033[33m%s\033[0m %02x %02x\n",
3179 "/** 0110 0001 1111 1101 stop */",
3183 #line 1085 "rl78-decode.opc"
3186 /*----------------------------------------------------------------------*/
3190 default: UNSUPPORTED(); break;
3195 /** 0110 1000 movw %e0%0, %1 */
3198 printf ("\033[33m%s\033[0m %02x\n",
3199 "/** 0110 1000 movw %e0%0, %1 */",
3202 SYNTAX("movw %e0%0, %1");
3203 #line 850 "rl78-decode.opc"
3204 ID(mov
); W(); DM(C
, IMMU(2)); SR(AX
);
3210 /** 0110 1001 movw %0, %e1%1 */
3213 printf ("\033[33m%s\033[0m %02x\n",
3214 "/** 0110 1001 movw %0, %e1%1 */",
3217 SYNTAX("movw %0, %e1%1");
3218 #line 841 "rl78-decode.opc"
3219 ID(mov
); W(); DR(AX
); SM(C
, IMMU(2));
3225 /** 0110 1010 or %0, #%1 */
3228 printf ("\033[33m%s\033[0m %02x\n",
3229 "/** 0110 1010 or %0, #%1 */",
3232 SYNTAX("or %0, #%1");
3233 #line 938 "rl78-decode.opc"
3234 ID(or); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
3236 /*----------------------------------------------------------------------*/
3242 /** 0110 1011 or %0, %1 */
3245 printf ("\033[33m%s\033[0m %02x\n",
3246 "/** 0110 1011 or %0, %1 */",
3249 SYNTAX("or %0, %1");
3250 #line 935 "rl78-decode.opc"
3251 ID(or); DR(A
); SM(None
, SADDR
); Fz
;
3257 /** 0110 1100 or %0, #%1 */
3260 printf ("\033[33m%s\033[0m %02x\n",
3261 "/** 0110 1100 or %0, #%1 */",
3264 SYNTAX("or %0, #%1");
3265 #line 926 "rl78-decode.opc"
3266 ID(or); DR(A
); SC(IMMU(1)); Fz
;
3272 /** 0110 1101 or %0, %e1%1 */
3275 printf ("\033[33m%s\033[0m %02x\n",
3276 "/** 0110 1101 or %0, %e1%1 */",
3279 SYNTAX("or %0, %e1%1");
3280 #line 914 "rl78-decode.opc"
3281 ID(or); DR(A
); SM(HL
, 0); Fz
;
3287 /** 0110 1110 or %0, %e1%1 */
3290 printf ("\033[33m%s\033[0m %02x\n",
3291 "/** 0110 1110 or %0, %e1%1 */",
3294 SYNTAX("or %0, %e1%1");
3295 #line 920 "rl78-decode.opc"
3296 ID(or); DR(A
); SM(HL
, IMMU(1)); Fz
;
3302 /** 0110 1111 or %0, %e1%!1 */
3305 printf ("\033[33m%s\033[0m %02x\n",
3306 "/** 0110 1111 or %0, %e1%!1 */",
3309 SYNTAX("or %0, %e1%!1");
3310 #line 911 "rl78-decode.opc"
3311 ID(or); DR(A
); SM(None
, IMMU(2)); Fz
;
3323 /** 0111 0rba mov %0, %1 */
3324 #line 675 "rl78-decode.opc"
3325 int rba AU
= op
[0] & 0x07;
3328 printf ("\033[33m%s\033[0m %02x\n",
3329 "/** 0111 0rba mov %0, %1 */",
3331 printf (" rba = 0x%x\n", rba
);
3333 SYNTAX("mov %0, %1");
3334 #line 675 "rl78-decode.opc"
3335 ID(mov
); DRB(rba
); SR(A
);
3341 switch (op
[1] & 0xff)
3352 /** 0111 0001 0bit 0000 set1 %e0%!0 */
3353 #line 1017 "rl78-decode.opc"
3354 int bit AU
= (op
[1] >> 4) & 0x07;
3357 printf ("\033[33m%s\033[0m %02x %02x\n",
3358 "/** 0111 0001 0bit 0000 set1 %e0%!0 */",
3360 printf (" bit = 0x%x\n", bit
);
3362 SYNTAX("set1 %e0%!0");
3363 #line 1017 "rl78-decode.opc"
3364 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(1);
3377 /** 0111 0001 0bit 0001 mov1 %0, cy */
3378 #line 779 "rl78-decode.opc"
3379 int bit AU
= (op
[1] >> 4) & 0x07;
3382 printf ("\033[33m%s\033[0m %02x %02x\n",
3383 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3385 printf (" bit = 0x%x\n", bit
);
3387 SYNTAX("mov1 %0, cy");
3388 #line 779 "rl78-decode.opc"
3389 ID(mov
); DM(None
, SADDR
); DB(bit
); SCY();
3402 /** 0111 0001 0bit 0010 set1 %0 */
3403 #line 1035 "rl78-decode.opc"
3404 int bit AU
= (op
[1] >> 4) & 0x07;
3407 printf ("\033[33m%s\033[0m %02x %02x\n",
3408 "/** 0111 0001 0bit 0010 set1 %0 */",
3410 printf (" bit = 0x%x\n", bit
);
3413 #line 1035 "rl78-decode.opc"
3414 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(1);
3416 /*----------------------------------------------------------------------*/
3429 /** 0111 0001 0bit 0011 clr1 %0 */
3430 #line 435 "rl78-decode.opc"
3431 int bit AU
= (op
[1] >> 4) & 0x07;
3434 printf ("\033[33m%s\033[0m %02x %02x\n",
3435 "/** 0111 0001 0bit 0011 clr1 %0 */",
3437 printf (" bit = 0x%x\n", bit
);
3440 #line 435 "rl78-decode.opc"
3441 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(0);
3443 /*----------------------------------------------------------------------*/
3456 /** 0111 0001 0bit 0100 mov1 cy, %1 */
3457 #line 773 "rl78-decode.opc"
3458 int bit AU
= (op
[1] >> 4) & 0x07;
3461 printf ("\033[33m%s\033[0m %02x %02x\n",
3462 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3464 printf (" bit = 0x%x\n", bit
);
3466 SYNTAX("mov1 cy, %1");
3467 #line 773 "rl78-decode.opc"
3468 ID(mov
); DCY(); SM(None
, SADDR
); SB(bit
);
3481 /** 0111 0001 0bit 0101 and1 cy, %s1 */
3482 #line 305 "rl78-decode.opc"
3483 int bit AU
= (op
[1] >> 4) & 0x07;
3486 printf ("\033[33m%s\033[0m %02x %02x\n",
3487 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3489 printf (" bit = 0x%x\n", bit
);
3491 SYNTAX("and1 cy, %s1");
3492 #line 305 "rl78-decode.opc"
3493 ID(and); DCY(); SM(None
, SADDR
); SB(bit
);
3495 /*----------------------------------------------------------------------*/
3497 /* Note that the branch insns need to be listed before the shift
3498 ones, as "shift count of zero" means "branch insn" */
3511 /** 0111 0001 0bit 0110 or1 cy, %s1 */
3512 #line 952 "rl78-decode.opc"
3513 int bit AU
= (op
[1] >> 4) & 0x07;
3516 printf ("\033[33m%s\033[0m %02x %02x\n",
3517 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3519 printf (" bit = 0x%x\n", bit
);
3521 SYNTAX("or1 cy, %s1");
3522 #line 952 "rl78-decode.opc"
3523 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3525 /*----------------------------------------------------------------------*/
3538 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3539 #line 1256 "rl78-decode.opc"
3540 int bit AU
= (op
[1] >> 4) & 0x07;
3543 printf ("\033[33m%s\033[0m %02x %02x\n",
3544 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3546 printf (" bit = 0x%x\n", bit
);
3548 SYNTAX("xor1 cy, %s1");
3549 #line 1256 "rl78-decode.opc"
3550 ID(xor); DCY(); SM(None
, SADDR
); SB(bit
);
3552 /*----------------------------------------------------------------------*/
3565 /** 0111 0001 0bit 1000 clr1 %e0%!0 */
3566 #line 417 "rl78-decode.opc"
3567 int bit AU
= (op
[1] >> 4) & 0x07;
3570 printf ("\033[33m%s\033[0m %02x %02x\n",
3571 "/** 0111 0001 0bit 1000 clr1 %e0%!0 */",
3573 printf (" bit = 0x%x\n", bit
);
3575 SYNTAX("clr1 %e0%!0");
3576 #line 417 "rl78-decode.opc"
3577 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(0);
3590 /** 0111 0001 0bit 1001 mov1 %s0, cy */
3591 #line 782 "rl78-decode.opc"
3592 int bit AU
= (op
[1] >> 4) & 0x07;
3595 printf ("\033[33m%s\033[0m %02x %02x\n",
3596 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3598 printf (" bit = 0x%x\n", bit
);
3600 SYNTAX("mov1 %s0, cy");
3601 #line 782 "rl78-decode.opc"
3602 ID(mov
); DM(None
, SFR
); DB(bit
); SCY();
3604 /*----------------------------------------------------------------------*/
3617 /** 0111 0001 0bit 1010 set1 %s0 */
3618 #line 1029 "rl78-decode.opc"
3619 int bit AU
= (op
[1] >> 4) & 0x07;
3622 printf ("\033[33m%s\033[0m %02x %02x\n",
3623 "/** 0111 0001 0bit 1010 set1 %s0 */",
3625 printf (" bit = 0x%x\n", bit
);
3628 #line 1029 "rl78-decode.opc"
3630 ID(mov
); DM(None
, op0
); DB(bit
); SC(1);
3631 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3632 rl78
->syntax
= "ei";
3645 /** 0111 0001 0bit 1011 clr1 %s0 */
3646 #line 429 "rl78-decode.opc"
3647 int bit AU
= (op
[1] >> 4) & 0x07;
3650 printf ("\033[33m%s\033[0m %02x %02x\n",
3651 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3653 printf (" bit = 0x%x\n", bit
);
3656 #line 429 "rl78-decode.opc"
3658 ID(mov
); DM(None
, op0
); DB(bit
); SC(0);
3659 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3660 rl78
->syntax
= "di";
3673 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
3674 #line 776 "rl78-decode.opc"
3675 int bit AU
= (op
[1] >> 4) & 0x07;
3678 printf ("\033[33m%s\033[0m %02x %02x\n",
3679 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3681 printf (" bit = 0x%x\n", bit
);
3683 SYNTAX("mov1 cy, %s1");
3684 #line 776 "rl78-decode.opc"
3685 ID(mov
); DCY(); SM(None
, SFR
); SB(bit
);
3698 /** 0111 0001 0bit 1101 and1 cy, %s1 */
3699 #line 302 "rl78-decode.opc"
3700 int bit AU
= (op
[1] >> 4) & 0x07;
3703 printf ("\033[33m%s\033[0m %02x %02x\n",
3704 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3706 printf (" bit = 0x%x\n", bit
);
3708 SYNTAX("and1 cy, %s1");
3709 #line 302 "rl78-decode.opc"
3710 ID(and); DCY(); SM(None
, SFR
); SB(bit
);
3723 /** 0111 0001 0bit 1110 or1 cy, %s1 */
3724 #line 949 "rl78-decode.opc"
3725 int bit AU
= (op
[1] >> 4) & 0x07;
3728 printf ("\033[33m%s\033[0m %02x %02x\n",
3729 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3731 printf (" bit = 0x%x\n", bit
);
3733 SYNTAX("or1 cy, %s1");
3734 #line 949 "rl78-decode.opc"
3735 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3748 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3749 #line 1253 "rl78-decode.opc"
3750 int bit AU
= (op
[1] >> 4) & 0x07;
3753 printf ("\033[33m%s\033[0m %02x %02x\n",
3754 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3756 printf (" bit = 0x%x\n", bit
);
3758 SYNTAX("xor1 cy, %s1");
3759 #line 1253 "rl78-decode.opc"
3760 ID(xor); DCY(); SM(None
, SFR
); SB(bit
);
3766 /** 0111 0001 1000 0000 set1 cy */
3769 printf ("\033[33m%s\033[0m %02x %02x\n",
3770 "/** 0111 0001 1000 0000 set1 cy */",
3774 #line 1026 "rl78-decode.opc"
3775 ID(mov
); DCY(); SC(1);
3788 /** 0111 0001 1bit 0001 mov1 %e0%0, cy */
3789 #line 761 "rl78-decode.opc"
3790 int bit AU
= (op
[1] >> 4) & 0x07;
3793 printf ("\033[33m%s\033[0m %02x %02x\n",
3794 "/** 0111 0001 1bit 0001 mov1 %e0%0, cy */",
3796 printf (" bit = 0x%x\n", bit
);
3798 SYNTAX("mov1 %e0%0, cy");
3799 #line 761 "rl78-decode.opc"
3800 ID(mov
); DM(HL
, 0); DB(bit
); SCY();
3813 /** 0111 0001 1bit 0010 set1 %e0%0 */
3814 #line 1020 "rl78-decode.opc"
3815 int bit AU
= (op
[1] >> 4) & 0x07;
3818 printf ("\033[33m%s\033[0m %02x %02x\n",
3819 "/** 0111 0001 1bit 0010 set1 %e0%0 */",
3821 printf (" bit = 0x%x\n", bit
);
3823 SYNTAX("set1 %e0%0");
3824 #line 1020 "rl78-decode.opc"
3825 ID(mov
); DM(HL
, 0); DB(bit
); SC(1);
3838 /** 0111 0001 1bit 0011 clr1 %e0%0 */
3839 #line 420 "rl78-decode.opc"
3840 int bit AU
= (op
[1] >> 4) & 0x07;
3843 printf ("\033[33m%s\033[0m %02x %02x\n",
3844 "/** 0111 0001 1bit 0011 clr1 %e0%0 */",
3846 printf (" bit = 0x%x\n", bit
);
3848 SYNTAX("clr1 %e0%0");
3849 #line 420 "rl78-decode.opc"
3850 ID(mov
); DM(HL
, 0); DB(bit
); SC(0);
3863 /** 0111 0001 1bit 0100 mov1 cy, %e1%1 */
3864 #line 767 "rl78-decode.opc"
3865 int bit AU
= (op
[1] >> 4) & 0x07;
3868 printf ("\033[33m%s\033[0m %02x %02x\n",
3869 "/** 0111 0001 1bit 0100 mov1 cy, %e1%1 */",
3871 printf (" bit = 0x%x\n", bit
);
3873 SYNTAX("mov1 cy, %e1%1");
3874 #line 767 "rl78-decode.opc"
3875 ID(mov
); DCY(); SM(HL
, 0); SB(bit
);
3888 /** 0111 0001 1bit 0101 and1 cy, %e1%1 */
3889 #line 296 "rl78-decode.opc"
3890 int bit AU
= (op
[1] >> 4) & 0x07;
3893 printf ("\033[33m%s\033[0m %02x %02x\n",
3894 "/** 0111 0001 1bit 0101 and1 cy, %e1%1 */",
3896 printf (" bit = 0x%x\n", bit
);
3898 SYNTAX("and1 cy, %e1%1");
3899 #line 296 "rl78-decode.opc"
3900 ID(and); DCY(); SM(HL
, 0); SB(bit
);
3913 /** 0111 0001 1bit 0110 or1 cy, %e1%1 */
3914 #line 943 "rl78-decode.opc"
3915 int bit AU
= (op
[1] >> 4) & 0x07;
3918 printf ("\033[33m%s\033[0m %02x %02x\n",
3919 "/** 0111 0001 1bit 0110 or1 cy, %e1%1 */",
3921 printf (" bit = 0x%x\n", bit
);
3923 SYNTAX("or1 cy, %e1%1");
3924 #line 943 "rl78-decode.opc"
3925 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3938 /** 0111 0001 1bit 0111 xor1 cy, %e1%1 */
3939 #line 1247 "rl78-decode.opc"
3940 int bit AU
= (op
[1] >> 4) & 0x07;
3943 printf ("\033[33m%s\033[0m %02x %02x\n",
3944 "/** 0111 0001 1bit 0111 xor1 cy, %e1%1 */",
3946 printf (" bit = 0x%x\n", bit
);
3948 SYNTAX("xor1 cy, %e1%1");
3949 #line 1247 "rl78-decode.opc"
3950 ID(xor); DCY(); SM(HL
, 0); SB(bit
);
3956 /** 0111 0001 1000 1000 clr1 cy */
3959 printf ("\033[33m%s\033[0m %02x %02x\n",
3960 "/** 0111 0001 1000 1000 clr1 cy */",
3964 #line 426 "rl78-decode.opc"
3965 ID(mov
); DCY(); SC(0);
3978 /** 0111 0001 1bit 1001 mov1 %e0%0, cy */
3979 #line 764 "rl78-decode.opc"
3980 int bit AU
= (op
[1] >> 4) & 0x07;
3983 printf ("\033[33m%s\033[0m %02x %02x\n",
3984 "/** 0111 0001 1bit 1001 mov1 %e0%0, cy */",
3986 printf (" bit = 0x%x\n", bit
);
3988 SYNTAX("mov1 %e0%0, cy");
3989 #line 764 "rl78-decode.opc"
3990 ID(mov
); DR(A
); DB(bit
); SCY();
4003 /** 0111 0001 1bit 1010 set1 %0 */
4004 #line 1023 "rl78-decode.opc"
4005 int bit AU
= (op
[1] >> 4) & 0x07;
4008 printf ("\033[33m%s\033[0m %02x %02x\n",
4009 "/** 0111 0001 1bit 1010 set1 %0 */",
4011 printf (" bit = 0x%x\n", bit
);
4014 #line 1023 "rl78-decode.opc"
4015 ID(mov
); DR(A
); DB(bit
); SC(1);
4028 /** 0111 0001 1bit 1011 clr1 %0 */
4029 #line 423 "rl78-decode.opc"
4030 int bit AU
= (op
[1] >> 4) & 0x07;
4033 printf ("\033[33m%s\033[0m %02x %02x\n",
4034 "/** 0111 0001 1bit 1011 clr1 %0 */",
4036 printf (" bit = 0x%x\n", bit
);
4039 #line 423 "rl78-decode.opc"
4040 ID(mov
); DR(A
); DB(bit
); SC(0);
4053 /** 0111 0001 1bit 1100 mov1 cy, %e1%1 */
4054 #line 770 "rl78-decode.opc"
4055 int bit AU
= (op
[1] >> 4) & 0x07;
4058 printf ("\033[33m%s\033[0m %02x %02x\n",
4059 "/** 0111 0001 1bit 1100 mov1 cy, %e1%1 */",
4061 printf (" bit = 0x%x\n", bit
);
4063 SYNTAX("mov1 cy, %e1%1");
4064 #line 770 "rl78-decode.opc"
4065 ID(mov
); DCY(); SR(A
); SB(bit
);
4078 /** 0111 0001 1bit 1101 and1 cy, %1 */
4079 #line 299 "rl78-decode.opc"
4080 int bit AU
= (op
[1] >> 4) & 0x07;
4083 printf ("\033[33m%s\033[0m %02x %02x\n",
4084 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4086 printf (" bit = 0x%x\n", bit
);
4088 SYNTAX("and1 cy, %1");
4089 #line 299 "rl78-decode.opc"
4090 ID(and); DCY(); SR(A
); SB(bit
);
4103 /** 0111 0001 1bit 1110 or1 cy, %1 */
4104 #line 946 "rl78-decode.opc"
4105 int bit AU
= (op
[1] >> 4) & 0x07;
4108 printf ("\033[33m%s\033[0m %02x %02x\n",
4109 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4111 printf (" bit = 0x%x\n", bit
);
4113 SYNTAX("or1 cy, %1");
4114 #line 946 "rl78-decode.opc"
4115 ID(or); DCY(); SR(A
); SB(bit
);
4128 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4129 #line 1250 "rl78-decode.opc"
4130 int bit AU
= (op
[1] >> 4) & 0x07;
4133 printf ("\033[33m%s\033[0m %02x %02x\n",
4134 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4136 printf (" bit = 0x%x\n", bit
);
4138 SYNTAX("xor1 cy, %1");
4139 #line 1250 "rl78-decode.opc"
4140 ID(xor); DCY(); SR(A
); SB(bit
);
4144 default: UNSUPPORTED(); break;
4149 /** 0111 1000 movw %e0%0, %1 */
4152 printf ("\033[33m%s\033[0m %02x\n",
4153 "/** 0111 1000 movw %e0%0, %1 */",
4156 SYNTAX("movw %e0%0, %1");
4157 #line 853 "rl78-decode.opc"
4158 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4164 /** 0111 1001 movw %0, %e1%1 */
4167 printf ("\033[33m%s\033[0m %02x\n",
4168 "/** 0111 1001 movw %0, %e1%1 */",
4171 SYNTAX("movw %0, %e1%1");
4172 #line 844 "rl78-decode.opc"
4173 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4179 /** 0111 1010 xor %0, #%1 */
4182 printf ("\033[33m%s\033[0m %02x\n",
4183 "/** 0111 1010 xor %0, #%1 */",
4186 SYNTAX("xor %0, #%1");
4187 #line 1242 "rl78-decode.opc"
4188 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4190 /*----------------------------------------------------------------------*/
4196 /** 0111 1011 xor %0, %1 */
4199 printf ("\033[33m%s\033[0m %02x\n",
4200 "/** 0111 1011 xor %0, %1 */",
4203 SYNTAX("xor %0, %1");
4204 #line 1239 "rl78-decode.opc"
4205 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4211 /** 0111 1100 xor %0, #%1 */
4214 printf ("\033[33m%s\033[0m %02x\n",
4215 "/** 0111 1100 xor %0, #%1 */",
4218 SYNTAX("xor %0, #%1");
4219 #line 1230 "rl78-decode.opc"
4220 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4226 /** 0111 1101 xor %0, %e1%1 */
4229 printf ("\033[33m%s\033[0m %02x\n",
4230 "/** 0111 1101 xor %0, %e1%1 */",
4233 SYNTAX("xor %0, %e1%1");
4234 #line 1218 "rl78-decode.opc"
4235 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4241 /** 0111 1110 xor %0, %e1%1 */
4244 printf ("\033[33m%s\033[0m %02x\n",
4245 "/** 0111 1110 xor %0, %e1%1 */",
4248 SYNTAX("xor %0, %e1%1");
4249 #line 1224 "rl78-decode.opc"
4250 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4256 /** 0111 1111 xor %0, %e1%!1 */
4259 printf ("\033[33m%s\033[0m %02x\n",
4260 "/** 0111 1111 xor %0, %e1%!1 */",
4263 SYNTAX("xor %0, %e1%!1");
4264 #line 1215 "rl78-decode.opc"
4265 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4278 /** 1000 0reg inc %0 */
4279 #line 566 "rl78-decode.opc"
4280 int reg AU
= op
[0] & 0x07;
4283 printf ("\033[33m%s\033[0m %02x\n",
4284 "/** 1000 0reg inc %0 */",
4286 printf (" reg = 0x%x\n", reg
);
4289 #line 566 "rl78-decode.opc"
4290 ID(add
); DRB(reg
); SC(1); Fza
;
4296 /** 1000 1000 mov %0, %e1%1 */
4299 printf ("\033[33m%s\033[0m %02x\n",
4300 "/** 1000 1000 mov %0, %e1%1 */",
4303 SYNTAX("mov %0, %e1%1");
4304 #line 645 "rl78-decode.opc"
4305 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4311 /** 1000 1001 mov %0, %e1%1 */
4314 printf ("\033[33m%s\033[0m %02x\n",
4315 "/** 1000 1001 mov %0, %e1%1 */",
4318 SYNTAX("mov %0, %e1%1");
4319 #line 627 "rl78-decode.opc"
4320 ID(mov
); DR(A
); SM(DE
, 0);
4326 /** 1000 1010 mov %0, %e1%1 */
4329 printf ("\033[33m%s\033[0m %02x\n",
4330 "/** 1000 1010 mov %0, %e1%1 */",
4333 SYNTAX("mov %0, %e1%1");
4334 #line 630 "rl78-decode.opc"
4335 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4341 /** 1000 1011 mov %0, %e1%1 */
4344 printf ("\033[33m%s\033[0m %02x\n",
4345 "/** 1000 1011 mov %0, %e1%1 */",
4348 SYNTAX("mov %0, %e1%1");
4349 #line 633 "rl78-decode.opc"
4350 ID(mov
); DR(A
); SM(HL
, 0);
4356 /** 1000 1100 mov %0, %e1%1 */
4359 printf ("\033[33m%s\033[0m %02x\n",
4360 "/** 1000 1100 mov %0, %e1%1 */",
4363 SYNTAX("mov %0, %e1%1");
4364 #line 636 "rl78-decode.opc"
4365 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4371 /** 1000 1101 mov %0, %1 */
4374 printf ("\033[33m%s\033[0m %02x\n",
4375 "/** 1000 1101 mov %0, %1 */",
4378 SYNTAX("mov %0, %1");
4379 #line 669 "rl78-decode.opc"
4380 ID(mov
); DR(A
); SM(None
, SADDR
);
4386 /** 1000 1110 mov %0, %s1 */
4389 printf ("\033[33m%s\033[0m %02x\n",
4390 "/** 1000 1110 mov %0, %s1 */",
4393 SYNTAX("mov %0, %s1");
4394 #line 666 "rl78-decode.opc"
4395 ID(mov
); DR(A
); SM(None
, SFR
);
4401 /** 1000 1111 mov %0, %e1%!1 */
4404 printf ("\033[33m%s\033[0m %02x\n",
4405 "/** 1000 1111 mov %0, %e1%!1 */",
4408 SYNTAX("mov %0, %e1%!1");
4409 #line 624 "rl78-decode.opc"
4410 ID(mov
); DR(A
); SM(None
, IMMU(2));
4423 /** 1001 0reg dec %0 */
4424 #line 533 "rl78-decode.opc"
4425 int reg AU
= op
[0] & 0x07;
4428 printf ("\033[33m%s\033[0m %02x\n",
4429 "/** 1001 0reg dec %0 */",
4431 printf (" reg = 0x%x\n", reg
);
4434 #line 533 "rl78-decode.opc"
4435 ID(sub
); DRB(reg
); SC(1); Fza
;
4441 /** 1001 1000 mov %0, %1 */
4444 printf ("\033[33m%s\033[0m %02x\n",
4445 "/** 1001 1000 mov %0, %1 */",
4448 SYNTAX("mov %0, %1");
4449 #line 621 "rl78-decode.opc"
4450 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4456 /** 1001 1001 mov %e0%0,%1 */
4459 printf ("\033[33m%s\033[0m %02x\n",
4460 "/** 1001 1001 mov %e0%0,%1 */",
4463 SYNTAX("mov %e0%0,%1");
4464 #line 594 "rl78-decode.opc"
4465 ID(mov
); DM(DE
, 0); SR(A
);
4471 /** 1001 1010 mov %e0%0, %1 */
4474 printf ("\033[33m%s\033[0m %02x\n",
4475 "/** 1001 1010 mov %e0%0, %1 */",
4478 SYNTAX("mov %e0%0, %1");
4479 #line 600 "rl78-decode.opc"
4480 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4486 /** 1001 1011 mov %e0%0,%1 */
4489 printf ("\033[33m%s\033[0m %02x\n",
4490 "/** 1001 1011 mov %e0%0,%1 */",
4493 SYNTAX("mov %e0%0,%1");
4494 #line 603 "rl78-decode.opc"
4495 ID(mov
); DM(HL
, 0); SR(A
);
4501 /** 1001 1100 mov %e0%0, %1 */
4504 printf ("\033[33m%s\033[0m %02x\n",
4505 "/** 1001 1100 mov %e0%0, %1 */",
4508 SYNTAX("mov %e0%0, %1");
4509 #line 612 "rl78-decode.opc"
4510 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4516 /** 1001 1101 mov %0, %1 */
4519 printf ("\033[33m%s\033[0m %02x\n",
4520 "/** 1001 1101 mov %0, %1 */",
4523 SYNTAX("mov %0, %1");
4524 #line 726 "rl78-decode.opc"
4525 ID(mov
); DM(None
, SADDR
); SR(A
);
4531 /** 1001 1110 mov %0, %1 */
4534 printf ("\033[33m%s\033[0m %02x\n",
4535 "/** 1001 1110 mov %0, %1 */",
4538 SYNTAX("mov %0, %1");
4539 #line 756 "rl78-decode.opc"
4540 ID(mov
); DM(None
, SFR
); SR(A
);
4542 /*----------------------------------------------------------------------*/
4548 /** 1001 1111 mov %e0%!0, %1 */
4551 printf ("\033[33m%s\033[0m %02x\n",
4552 "/** 1001 1111 mov %e0%!0, %1 */",
4555 SYNTAX("mov %e0%!0, %1");
4556 #line 591 "rl78-decode.opc"
4557 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4563 /** 1010 0000 inc %e0%!0 */
4566 printf ("\033[33m%s\033[0m %02x\n",
4567 "/** 1010 0000 inc %e0%!0 */",
4570 SYNTAX("inc %e0%!0");
4571 #line 560 "rl78-decode.opc"
4572 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4581 /** 1010 0rg1 incw %0 */
4582 #line 580 "rl78-decode.opc"
4583 int rg AU
= (op
[0] >> 1) & 0x03;
4586 printf ("\033[33m%s\033[0m %02x\n",
4587 "/** 1010 0rg1 incw %0 */",
4589 printf (" rg = 0x%x\n", rg
);
4592 #line 580 "rl78-decode.opc"
4593 ID(add
); W(); DRW(rg
); SC(1);
4599 /** 1010 0010 incw %e0%!0 */
4602 printf ("\033[33m%s\033[0m %02x\n",
4603 "/** 1010 0010 incw %e0%!0 */",
4606 SYNTAX("incw %e0%!0");
4607 #line 574 "rl78-decode.opc"
4608 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4614 /** 1010 0100 inc %0 */
4617 printf ("\033[33m%s\033[0m %02x\n",
4618 "/** 1010 0100 inc %0 */",
4622 #line 569 "rl78-decode.opc"
4623 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4625 /*----------------------------------------------------------------------*/
4631 /** 1010 0110 incw %0 */
4634 printf ("\033[33m%s\033[0m %02x\n",
4635 "/** 1010 0110 incw %0 */",
4639 #line 583 "rl78-decode.opc"
4640 ID(add
); W(); DM(None
, SADDR
); SC(1);
4642 /*----------------------------------------------------------------------*/
4648 /** 1010 1000 movw %0, %1 */
4651 printf ("\033[33m%s\033[0m %02x\n",
4652 "/** 1010 1000 movw %0, %1 */",
4655 SYNTAX("movw %0, %1");
4656 #line 826 "rl78-decode.opc"
4657 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4663 /** 1010 1001 movw %0, %e1%1 */
4666 printf ("\033[33m%s\033[0m %02x\n",
4667 "/** 1010 1001 movw %0, %e1%1 */",
4670 SYNTAX("movw %0, %e1%1");
4671 #line 814 "rl78-decode.opc"
4672 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4678 /** 1010 1010 movw %0, %e1%1 */
4681 printf ("\033[33m%s\033[0m %02x\n",
4682 "/** 1010 1010 movw %0, %e1%1 */",
4685 SYNTAX("movw %0, %e1%1");
4686 #line 817 "rl78-decode.opc"
4687 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4693 /** 1010 1011 movw %0, %e1%1 */
4696 printf ("\033[33m%s\033[0m %02x\n",
4697 "/** 1010 1011 movw %0, %e1%1 */",
4700 SYNTAX("movw %0, %e1%1");
4701 #line 820 "rl78-decode.opc"
4702 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4708 /** 1010 1100 movw %0, %e1%1 */
4711 printf ("\033[33m%s\033[0m %02x\n",
4712 "/** 1010 1100 movw %0, %e1%1 */",
4715 SYNTAX("movw %0, %e1%1");
4716 #line 823 "rl78-decode.opc"
4717 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4723 /** 1010 1101 movw %0, %1 */
4726 printf ("\033[33m%s\033[0m %02x\n",
4727 "/** 1010 1101 movw %0, %1 */",
4730 SYNTAX("movw %0, %1");
4731 #line 856 "rl78-decode.opc"
4732 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4738 /** 1010 1110 movw %0, %s1 */
4741 printf ("\033[33m%s\033[0m %02x\n",
4742 "/** 1010 1110 movw %0, %s1 */",
4745 SYNTAX("movw %0, %s1");
4746 #line 859 "rl78-decode.opc"
4747 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4753 /** 1010 1111 movw %0, %e1%!1 */
4756 printf ("\033[33m%s\033[0m %02x\n",
4757 "/** 1010 1111 movw %0, %e1%!1 */",
4760 SYNTAX("movw %0, %e1%!1");
4761 #line 810 "rl78-decode.opc"
4762 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4769 /** 1011 0000 dec %e0%!0 */
4772 printf ("\033[33m%s\033[0m %02x\n",
4773 "/** 1011 0000 dec %e0%!0 */",
4776 SYNTAX("dec %e0%!0");
4777 #line 527 "rl78-decode.opc"
4778 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4787 /** 1011 0rg1 decw %0 */
4788 #line 547 "rl78-decode.opc"
4789 int rg AU
= (op
[0] >> 1) & 0x03;
4792 printf ("\033[33m%s\033[0m %02x\n",
4793 "/** 1011 0rg1 decw %0 */",
4795 printf (" rg = 0x%x\n", rg
);
4798 #line 547 "rl78-decode.opc"
4799 ID(sub
); W(); DRW(rg
); SC(1);
4805 /** 1011 0010 decw %e0%!0 */
4808 printf ("\033[33m%s\033[0m %02x\n",
4809 "/** 1011 0010 decw %e0%!0 */",
4812 SYNTAX("decw %e0%!0");
4813 #line 541 "rl78-decode.opc"
4814 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4820 /** 1011 0100 dec %0 */
4823 printf ("\033[33m%s\033[0m %02x\n",
4824 "/** 1011 0100 dec %0 */",
4828 #line 536 "rl78-decode.opc"
4829 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4831 /*----------------------------------------------------------------------*/
4837 /** 1011 0110 decw %0 */
4840 printf ("\033[33m%s\033[0m %02x\n",
4841 "/** 1011 0110 decw %0 */",
4845 #line 550 "rl78-decode.opc"
4846 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4848 /*----------------------------------------------------------------------*/
4854 /** 1011 1000 movw %0, %1 */
4857 printf ("\033[33m%s\033[0m %02x\n",
4858 "/** 1011 1000 movw %0, %1 */",
4861 SYNTAX("movw %0, %1");
4862 #line 807 "rl78-decode.opc"
4863 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4869 /** 1011 1001 movw %e0%0, %1 */
4872 printf ("\033[33m%s\033[0m %02x\n",
4873 "/** 1011 1001 movw %e0%0, %1 */",
4876 SYNTAX("movw %e0%0, %1");
4877 #line 795 "rl78-decode.opc"
4878 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4884 /** 1011 1010 movw %e0%0, %1 */
4887 printf ("\033[33m%s\033[0m %02x\n",
4888 "/** 1011 1010 movw %e0%0, %1 */",
4891 SYNTAX("movw %e0%0, %1");
4892 #line 798 "rl78-decode.opc"
4893 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4899 /** 1011 1011 movw %e0%0, %1 */
4902 printf ("\033[33m%s\033[0m %02x\n",
4903 "/** 1011 1011 movw %e0%0, %1 */",
4906 SYNTAX("movw %e0%0, %1");
4907 #line 801 "rl78-decode.opc"
4908 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4914 /** 1011 1100 movw %e0%0, %1 */
4917 printf ("\033[33m%s\033[0m %02x\n",
4918 "/** 1011 1100 movw %e0%0, %1 */",
4921 SYNTAX("movw %e0%0, %1");
4922 #line 804 "rl78-decode.opc"
4923 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4929 /** 1011 1101 movw %0, %1 */
4932 printf ("\033[33m%s\033[0m %02x\n",
4933 "/** 1011 1101 movw %0, %1 */",
4936 SYNTAX("movw %0, %1");
4937 #line 871 "rl78-decode.opc"
4938 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4944 /** 1011 1110 movw %0, %1 */
4947 printf ("\033[33m%s\033[0m %02x\n",
4948 "/** 1011 1110 movw %0, %1 */",
4951 SYNTAX("movw %0, %1");
4952 #line 877 "rl78-decode.opc"
4953 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4955 /*----------------------------------------------------------------------*/
4961 /** 1011 1111 movw %e0%!0, %1 */
4964 printf ("\033[33m%s\033[0m %02x\n",
4965 "/** 1011 1111 movw %e0%!0, %1 */",
4968 SYNTAX("movw %e0%!0, %1");
4969 #line 792 "rl78-decode.opc"
4970 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
4979 /** 1100 0rg0 pop %0 */
4980 #line 957 "rl78-decode.opc"
4981 int rg AU
= (op
[0] >> 1) & 0x03;
4984 printf ("\033[33m%s\033[0m %02x\n",
4985 "/** 1100 0rg0 pop %0 */",
4987 printf (" rg = 0x%x\n", rg
);
4990 #line 957 "rl78-decode.opc"
4991 ID(mov
); W(); DRW(rg
); SPOP();
5000 /** 1100 0rg1 push %1 */
5001 #line 965 "rl78-decode.opc"
5002 int rg AU
= (op
[0] >> 1) & 0x03;
5005 printf ("\033[33m%s\033[0m %02x\n",
5006 "/** 1100 0rg1 push %1 */",
5008 printf (" rg = 0x%x\n", rg
);
5011 #line 965 "rl78-decode.opc"
5012 ID(mov
); W(); DPUSH(); SRW(rg
);
5018 /** 1100 1000 mov %0, #%1 */
5021 printf ("\033[33m%s\033[0m %02x\n",
5022 "/** 1100 1000 mov %0, #%1 */",
5025 SYNTAX("mov %0, #%1");
5026 #line 618 "rl78-decode.opc"
5027 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5033 /** 1100 1001 movw %0, #%1 */
5036 printf ("\033[33m%s\033[0m %02x\n",
5037 "/** 1100 1001 movw %0, #%1 */",
5040 SYNTAX("movw %0, #%1");
5041 #line 868 "rl78-decode.opc"
5042 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5048 /** 1100 1010 mov %e0%0, #%1 */
5051 printf ("\033[33m%s\033[0m %02x\n",
5052 "/** 1100 1010 mov %e0%0, #%1 */",
5055 SYNTAX("mov %e0%0, #%1");
5056 #line 597 "rl78-decode.opc"
5057 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5063 /** 1100 1011 movw %0, #%1 */
5066 printf ("\033[33m%s\033[0m %02x\n",
5067 "/** 1100 1011 movw %0, #%1 */",
5070 SYNTAX("movw %0, #%1");
5071 #line 874 "rl78-decode.opc"
5072 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5078 /** 1100 1100 mov %e0%0, #%1 */
5081 printf ("\033[33m%s\033[0m %02x\n",
5082 "/** 1100 1100 mov %e0%0, #%1 */",
5085 SYNTAX("mov %e0%0, #%1");
5086 #line 609 "rl78-decode.opc"
5087 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5093 /** 1100 1101 mov %0, #%1 */
5096 printf ("\033[33m%s\033[0m %02x\n",
5097 "/** 1100 1101 mov %0, #%1 */",
5100 SYNTAX("mov %0, #%1");
5101 #line 723 "rl78-decode.opc"
5102 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5108 /** 1100 1110 mov %s0, #%1 */
5111 printf ("\033[33m%s\033[0m %02x\n",
5112 "/** 1100 1110 mov %s0, #%1 */",
5115 SYNTAX("mov %s0, #%1");
5116 #line 729 "rl78-decode.opc"
5119 ID(mov
); DM(None
, op0
); SC(op1
);
5124 rl78
->syntax
= "mulhu"; ID(mulhu
);
5127 rl78
->syntax
= "mulh"; ID(mulh
);
5130 rl78
->syntax
= "divhu"; ID(divhu
);
5133 rl78
->syntax
= "divwu"; ID(divwu
);
5136 rl78
->syntax
= "machu"; ID(machu
);
5139 rl78
->syntax
= "mach"; ID(mach
);
5147 /** 1100 1111 mov %e0%!0, #%1 */
5150 printf ("\033[33m%s\033[0m %02x\n",
5151 "/** 1100 1111 mov %e0%!0, #%1 */",
5154 SYNTAX("mov %e0%!0, #%1");
5155 #line 588 "rl78-decode.opc"
5156 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5165 /** 1101 00rg cmp0 %0 */
5166 #line 497 "rl78-decode.opc"
5167 int rg AU
= op
[0] & 0x03;
5170 printf ("\033[33m%s\033[0m %02x\n",
5171 "/** 1101 00rg cmp0 %0 */",
5173 printf (" rg = 0x%x\n", rg
);
5176 #line 497 "rl78-decode.opc"
5177 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5183 /** 1101 0100 cmp0 %0 */
5186 printf ("\033[33m%s\033[0m %02x\n",
5187 "/** 1101 0100 cmp0 %0 */",
5191 #line 500 "rl78-decode.opc"
5192 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5194 /*----------------------------------------------------------------------*/
5200 /** 1101 0101 cmp0 %e0%!0 */
5203 printf ("\033[33m%s\033[0m %02x\n",
5204 "/** 1101 0101 cmp0 %e0%!0 */",
5207 SYNTAX("cmp0 %e0%!0");
5208 #line 494 "rl78-decode.opc"
5209 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5215 /** 1101 0110 mulu x */
5218 printf ("\033[33m%s\033[0m %02x\n",
5219 "/** 1101 0110 mulu x */",
5223 #line 882 "rl78-decode.opc"
5226 /*----------------------------------------------------------------------*/
5232 /** 1101 0111 ret */
5235 printf ("\033[33m%s\033[0m %02x\n",
5236 "/** 1101 0111 ret */",
5240 #line 973 "rl78-decode.opc"
5247 /** 1101 1000 mov %0, %1 */
5250 printf ("\033[33m%s\033[0m %02x\n",
5251 "/** 1101 1000 mov %0, %1 */",
5254 SYNTAX("mov %0, %1");
5255 #line 690 "rl78-decode.opc"
5256 ID(mov
); DR(X
); SM(None
, SADDR
);
5262 /** 1101 1001 mov %0, %e1%!1 */
5265 printf ("\033[33m%s\033[0m %02x\n",
5266 "/** 1101 1001 mov %0, %e1%!1 */",
5269 SYNTAX("mov %0, %e1%!1");
5270 #line 687 "rl78-decode.opc"
5271 ID(mov
); DR(X
); SM(None
, IMMU(2));
5279 /** 11ra 1010 movw %0, %1 */
5280 #line 865 "rl78-decode.opc"
5281 int ra AU
= (op
[0] >> 4) & 0x03;
5284 printf ("\033[33m%s\033[0m %02x\n",
5285 "/** 11ra 1010 movw %0, %1 */",
5287 printf (" ra = 0x%x\n", ra
);
5289 SYNTAX("movw %0, %1");
5290 #line 865 "rl78-decode.opc"
5291 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5299 /** 11ra 1011 movw %0, %e1%!1 */
5300 #line 862 "rl78-decode.opc"
5301 int ra AU
= (op
[0] >> 4) & 0x03;
5304 printf ("\033[33m%s\033[0m %02x\n",
5305 "/** 11ra 1011 movw %0, %e1%!1 */",
5307 printf (" ra = 0x%x\n", ra
);
5309 SYNTAX("movw %0, %e1%!1");
5310 #line 862 "rl78-decode.opc"
5311 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5317 /** 1101 1100 bc $%a0 */
5320 printf ("\033[33m%s\033[0m %02x\n",
5321 "/** 1101 1100 bc $%a0 */",
5325 #line 313 "rl78-decode.opc"
5326 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5332 /** 1101 1101 bz $%a0 */
5335 printf ("\033[33m%s\033[0m %02x\n",
5336 "/** 1101 1101 bz $%a0 */",
5340 #line 325 "rl78-decode.opc"
5341 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5347 /** 1101 1110 bnc $%a0 */
5350 printf ("\033[33m%s\033[0m %02x\n",
5351 "/** 1101 1110 bnc $%a0 */",
5355 #line 316 "rl78-decode.opc"
5356 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5362 /** 1101 1111 bnz $%a0 */
5365 printf ("\033[33m%s\033[0m %02x\n",
5366 "/** 1101 1111 bnz $%a0 */",
5370 #line 328 "rl78-decode.opc"
5371 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5373 /*----------------------------------------------------------------------*/
5382 /** 1110 00rg oneb %0 */
5383 #line 895 "rl78-decode.opc"
5384 int rg AU
= op
[0] & 0x03;
5387 printf ("\033[33m%s\033[0m %02x\n",
5388 "/** 1110 00rg oneb %0 */",
5390 printf (" rg = 0x%x\n", rg
);
5393 #line 895 "rl78-decode.opc"
5394 ID(mov
); DRB(rg
); SC(1);
5400 /** 1110 0100 oneb %0 */
5403 printf ("\033[33m%s\033[0m %02x\n",
5404 "/** 1110 0100 oneb %0 */",
5408 #line 898 "rl78-decode.opc"
5409 ID(mov
); DM(None
, SADDR
); SC(1);
5411 /*----------------------------------------------------------------------*/
5417 /** 1110 0101 oneb %e0%!0 */
5420 printf ("\033[33m%s\033[0m %02x\n",
5421 "/** 1110 0101 oneb %e0%!0 */",
5424 SYNTAX("oneb %e0%!0");
5425 #line 892 "rl78-decode.opc"
5426 ID(mov
); DM(None
, IMMU(2)); SC(1);
5432 /** 1110 0110 onew %0 */
5435 printf ("\033[33m%s\033[0m %02x\n",
5436 "/** 1110 0110 onew %0 */",
5440 #line 903 "rl78-decode.opc"
5441 ID(mov
); DR(AX
); SC(1);
5447 /** 1110 0111 onew %0 */
5450 printf ("\033[33m%s\033[0m %02x\n",
5451 "/** 1110 0111 onew %0 */",
5455 #line 906 "rl78-decode.opc"
5456 ID(mov
); DR(BC
); SC(1);
5458 /*----------------------------------------------------------------------*/
5464 /** 1110 1000 mov %0, %1 */
5467 printf ("\033[33m%s\033[0m %02x\n",
5468 "/** 1110 1000 mov %0, %1 */",
5471 SYNTAX("mov %0, %1");
5472 #line 678 "rl78-decode.opc"
5473 ID(mov
); DR(B
); SM(None
, SADDR
);
5479 /** 1110 1001 mov %0, %e1%!1 */
5482 printf ("\033[33m%s\033[0m %02x\n",
5483 "/** 1110 1001 mov %0, %e1%!1 */",
5486 SYNTAX("mov %0, %e1%!1");
5487 #line 672 "rl78-decode.opc"
5488 ID(mov
); DR(B
); SM(None
, IMMU(2));
5494 /** 1110 1100 br !%!a0 */
5497 printf ("\033[33m%s\033[0m %02x\n",
5498 "/** 1110 1100 br !%!a0 */",
5502 #line 347 "rl78-decode.opc"
5503 ID(branch
); DC(IMMU(3));
5509 /** 1110 1101 br %!a0 */
5512 printf ("\033[33m%s\033[0m %02x\n",
5513 "/** 1110 1101 br %!a0 */",
5517 #line 350 "rl78-decode.opc"
5518 ID(branch
); DC(IMMU(2));
5524 /** 1110 1110 br $%!a0 */
5527 printf ("\033[33m%s\033[0m %02x\n",
5528 "/** 1110 1110 br $%!a0 */",
5532 #line 353 "rl78-decode.opc"
5533 ID(branch
); DC(pc
+IMMS(2)+3);
5539 /** 1110 1111 br $%a0 */
5542 printf ("\033[33m%s\033[0m %02x\n",
5543 "/** 1110 1111 br $%a0 */",
5547 #line 356 "rl78-decode.opc"
5548 ID(branch
); DC(pc
+IMMS(1)+2);
5557 /** 1111 00rg clrb %0 */
5558 #line 443 "rl78-decode.opc"
5559 int rg AU
= op
[0] & 0x03;
5562 printf ("\033[33m%s\033[0m %02x\n",
5563 "/** 1111 00rg clrb %0 */",
5565 printf (" rg = 0x%x\n", rg
);
5568 #line 443 "rl78-decode.opc"
5569 ID(mov
); DRB(rg
); SC(0);
5575 /** 1111 0100 clrb %0 */
5578 printf ("\033[33m%s\033[0m %02x\n",
5579 "/** 1111 0100 clrb %0 */",
5583 #line 446 "rl78-decode.opc"
5584 ID(mov
); DM(None
, SADDR
); SC(0);
5586 /*----------------------------------------------------------------------*/
5592 /** 1111 0101 clrb %e0%!0 */
5595 printf ("\033[33m%s\033[0m %02x\n",
5596 "/** 1111 0101 clrb %e0%!0 */",
5599 SYNTAX("clrb %e0%!0");
5600 #line 440 "rl78-decode.opc"
5601 ID(mov
); DM(None
, IMMU(2)); SC(0);
5607 /** 1111 0110 clrw %0 */
5610 printf ("\033[33m%s\033[0m %02x\n",
5611 "/** 1111 0110 clrw %0 */",
5615 #line 451 "rl78-decode.opc"
5616 ID(mov
); DR(AX
); SC(0);
5622 /** 1111 0111 clrw %0 */
5625 printf ("\033[33m%s\033[0m %02x\n",
5626 "/** 1111 0111 clrw %0 */",
5630 #line 454 "rl78-decode.opc"
5631 ID(mov
); DR(BC
); SC(0);
5633 /*----------------------------------------------------------------------*/
5639 /** 1111 1000 mov %0, %1 */
5642 printf ("\033[33m%s\033[0m %02x\n",
5643 "/** 1111 1000 mov %0, %1 */",
5646 SYNTAX("mov %0, %1");
5647 #line 684 "rl78-decode.opc"
5648 ID(mov
); DR(C
); SM(None
, SADDR
);
5654 /** 1111 1001 mov %0, %e1%!1 */
5657 printf ("\033[33m%s\033[0m %02x\n",
5658 "/** 1111 1001 mov %0, %e1%!1 */",
5661 SYNTAX("mov %0, %e1%!1");
5662 #line 681 "rl78-decode.opc"
5663 ID(mov
); DR(C
); SM(None
, IMMU(2));
5669 /** 1111 1100 call !%!a0 */
5672 printf ("\033[33m%s\033[0m %02x\n",
5673 "/** 1111 1100 call !%!a0 */",
5676 SYNTAX("call !%!a0");
5677 #line 400 "rl78-decode.opc"
5678 ID(call
); DC(IMMU(3));
5684 /** 1111 1101 call %!a0 */
5687 printf ("\033[33m%s\033[0m %02x\n",
5688 "/** 1111 1101 call %!a0 */",
5691 SYNTAX("call %!a0");
5692 #line 403 "rl78-decode.opc"
5693 ID(call
); DC(IMMU(2));
5699 /** 1111 1110 call $%!a0 */
5702 printf ("\033[33m%s\033[0m %02x\n",
5703 "/** 1111 1110 call $%!a0 */",
5706 SYNTAX("call $%!a0");
5707 #line 406 "rl78-decode.opc"
5708 ID(call
); DC(pc
+IMMS(2)+3);
5714 /** 1111 1111 brk1 */
5717 printf ("\033[33m%s\033[0m %02x\n",
5718 "/** 1111 1111 brk1 */",
5722 #line 364 "rl78-decode.opc"
5728 #line 1261 "rl78-decode.opc"
5730 return rl78
->n_bytes
;