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 1210 "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 1174 "rl78-decode.opc"
590 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
592 /*----------------------------------------------------------------------*/
601 /** 0010 0rw1 subw %0, %1 */
602 #line 1168 "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 1168 "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 1159 "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 1165 "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 1171 "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 1122 "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 1116 "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 1110 "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 1098 "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 1104 "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 1095 "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 1051 "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 1051 "rl78-decode.opc"
937 ID(shl
); DR(C
); SC(cnt
);
943 /** 0011 0001 0cnt 1000 shl %0, %1 */
944 #line 1048 "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 1048 "rl78-decode.opc"
955 ID(shl
); DR(B
); SC(cnt
);
961 /** 0011 0001 0cnt 1001 shl %0, %1 */
962 #line 1045 "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 1045 "rl78-decode.opc"
973 ID(shl
); DR(A
); SC(cnt
);
979 /** 0011 0001 0cnt 1010 shr %0, %1 */
980 #line 1062 "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 1062 "rl78-decode.opc"
991 ID(shr
); DR(A
); SC(cnt
);
997 /** 0011 0001 0cnt 1011 sar %0, %1 */
998 #line 1009 "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 1009 "rl78-decode.opc"
1009 ID(sar
); DR(A
); SC(cnt
);
1016 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1017 #line 1057 "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 1057 "rl78-decode.opc"
1028 ID(shl
); W(); DR(BC
); SC(wcnt
);
1030 /*----------------------------------------------------------------------*/
1037 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1038 #line 1054 "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 1054 "rl78-decode.opc"
1049 ID(shl
); W(); DR(AX
); SC(wcnt
);
1056 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1057 #line 1065 "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 1065 "rl78-decode.opc"
1068 ID(shr
); W(); DR(AX
); SC(wcnt
);
1070 /*----------------------------------------------------------------------*/
1077 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1078 #line 1012 "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 1012 "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 1215 "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 1215 "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 1154 "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 1151 "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 1142 "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 1130 "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 1139 "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 1127 "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 1119 "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 1119 "rl78-decode.opc"
1878 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1890 /** 0110 0001 0010 1rba sub %0, %1 */
1891 #line 1113 "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 1113 "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 1162 "rl78-decode.opc"
1917 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1930 /** 0110 0001 0011 0reg subc %0, %1 */
1931 #line 1148 "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 1148 "rl78-decode.opc"
1942 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1954 /** 0110 0001 0011 1rba subc %0, %1 */
1955 #line 1145 "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 1145 "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 937 "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 937 "rl78-decode.opc"
2119 ID(or); DRB(reg
); SR(A
); Fz
;
2131 /** 0110 0001 0110 1rba or %0, %1 */
2132 #line 934 "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 934 "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 1241 "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 1241 "rl78-decode.opc"
2183 ID(xor); DRB(reg
); SR(A
); Fz
;
2195 /** 0110 0001 0111 1rba xor %0, %1 */
2196 #line 1238 "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 1238 "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 1200 "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 1200 "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 1101 "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 1107 "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 1204 "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 1197 "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 1179 "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 1207 "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 1188 "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 1194 "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 1182 "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 1185 "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 1133 "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 1136 "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 1191 "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 1070 "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 965 "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 1017 "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 1017 "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 1076 "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 998 "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 992 "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 973 "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 922 "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 928 "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 1073 "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 1085 "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 989 "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 984 "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 995 "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 995 "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 1226 "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 1232 "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 1079 "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 1082 "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 1001 "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 981 "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 1090 "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 943 "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 940 "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 931 "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 919 "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 925 "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 916 "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 1022 "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 1022 "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 1040 "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 1040 "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 957 "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 957 "rl78-decode.opc"
3523 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3525 /*----------------------------------------------------------------------*/
3538 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3539 #line 1261 "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 1261 "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 1034 "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 1034 "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 954 "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 954 "rl78-decode.opc"
3735 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3748 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3749 #line 1258 "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 1258 "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 1031 "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 1025 "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 1025 "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 948 "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 948 "rl78-decode.opc"
3925 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3938 /** 0111 0001 1bit 0111 xor1 cy, %e1%1 */
3939 #line 1252 "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 1252 "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 1028 "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 1028 "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 951 "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 951 "rl78-decode.opc"
4115 ID(or); DCY(); SR(A
); SB(bit
);
4128 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4129 #line 1255 "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 1255 "rl78-decode.opc"
4140 ID(xor); DCY(); SR(A
); SB(bit
);
4146 /** 0111 0001 1100 0000 not1 cy */
4149 printf ("\033[33m%s\033[0m %02x %02x\n",
4150 "/** 0111 0001 1100 0000 not1 cy */",
4154 #line 892 "rl78-decode.opc"
4155 ID(xor); DCY(); SC(1);
4157 /*----------------------------------------------------------------------*/
4161 default: UNSUPPORTED(); break;
4166 /** 0111 1000 movw %e0%0, %1 */
4169 printf ("\033[33m%s\033[0m %02x\n",
4170 "/** 0111 1000 movw %e0%0, %1 */",
4173 SYNTAX("movw %e0%0, %1");
4174 #line 853 "rl78-decode.opc"
4175 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4181 /** 0111 1001 movw %0, %e1%1 */
4184 printf ("\033[33m%s\033[0m %02x\n",
4185 "/** 0111 1001 movw %0, %e1%1 */",
4188 SYNTAX("movw %0, %e1%1");
4189 #line 844 "rl78-decode.opc"
4190 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4196 /** 0111 1010 xor %0, #%1 */
4199 printf ("\033[33m%s\033[0m %02x\n",
4200 "/** 0111 1010 xor %0, #%1 */",
4203 SYNTAX("xor %0, #%1");
4204 #line 1247 "rl78-decode.opc"
4205 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4207 /*----------------------------------------------------------------------*/
4213 /** 0111 1011 xor %0, %1 */
4216 printf ("\033[33m%s\033[0m %02x\n",
4217 "/** 0111 1011 xor %0, %1 */",
4220 SYNTAX("xor %0, %1");
4221 #line 1244 "rl78-decode.opc"
4222 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4228 /** 0111 1100 xor %0, #%1 */
4231 printf ("\033[33m%s\033[0m %02x\n",
4232 "/** 0111 1100 xor %0, #%1 */",
4235 SYNTAX("xor %0, #%1");
4236 #line 1235 "rl78-decode.opc"
4237 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4243 /** 0111 1101 xor %0, %e1%1 */
4246 printf ("\033[33m%s\033[0m %02x\n",
4247 "/** 0111 1101 xor %0, %e1%1 */",
4250 SYNTAX("xor %0, %e1%1");
4251 #line 1223 "rl78-decode.opc"
4252 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4258 /** 0111 1110 xor %0, %e1%1 */
4261 printf ("\033[33m%s\033[0m %02x\n",
4262 "/** 0111 1110 xor %0, %e1%1 */",
4265 SYNTAX("xor %0, %e1%1");
4266 #line 1229 "rl78-decode.opc"
4267 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4273 /** 0111 1111 xor %0, %e1%!1 */
4276 printf ("\033[33m%s\033[0m %02x\n",
4277 "/** 0111 1111 xor %0, %e1%!1 */",
4280 SYNTAX("xor %0, %e1%!1");
4281 #line 1220 "rl78-decode.opc"
4282 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4295 /** 1000 0reg inc %0 */
4296 #line 566 "rl78-decode.opc"
4297 int reg AU
= op
[0] & 0x07;
4300 printf ("\033[33m%s\033[0m %02x\n",
4301 "/** 1000 0reg inc %0 */",
4303 printf (" reg = 0x%x\n", reg
);
4306 #line 566 "rl78-decode.opc"
4307 ID(add
); DRB(reg
); SC(1); Fza
;
4313 /** 1000 1000 mov %0, %e1%1 */
4316 printf ("\033[33m%s\033[0m %02x\n",
4317 "/** 1000 1000 mov %0, %e1%1 */",
4320 SYNTAX("mov %0, %e1%1");
4321 #line 645 "rl78-decode.opc"
4322 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4328 /** 1000 1001 mov %0, %e1%1 */
4331 printf ("\033[33m%s\033[0m %02x\n",
4332 "/** 1000 1001 mov %0, %e1%1 */",
4335 SYNTAX("mov %0, %e1%1");
4336 #line 627 "rl78-decode.opc"
4337 ID(mov
); DR(A
); SM(DE
, 0);
4343 /** 1000 1010 mov %0, %e1%1 */
4346 printf ("\033[33m%s\033[0m %02x\n",
4347 "/** 1000 1010 mov %0, %e1%1 */",
4350 SYNTAX("mov %0, %e1%1");
4351 #line 630 "rl78-decode.opc"
4352 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4358 /** 1000 1011 mov %0, %e1%1 */
4361 printf ("\033[33m%s\033[0m %02x\n",
4362 "/** 1000 1011 mov %0, %e1%1 */",
4365 SYNTAX("mov %0, %e1%1");
4366 #line 633 "rl78-decode.opc"
4367 ID(mov
); DR(A
); SM(HL
, 0);
4373 /** 1000 1100 mov %0, %e1%1 */
4376 printf ("\033[33m%s\033[0m %02x\n",
4377 "/** 1000 1100 mov %0, %e1%1 */",
4380 SYNTAX("mov %0, %e1%1");
4381 #line 636 "rl78-decode.opc"
4382 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4388 /** 1000 1101 mov %0, %1 */
4391 printf ("\033[33m%s\033[0m %02x\n",
4392 "/** 1000 1101 mov %0, %1 */",
4395 SYNTAX("mov %0, %1");
4396 #line 669 "rl78-decode.opc"
4397 ID(mov
); DR(A
); SM(None
, SADDR
);
4403 /** 1000 1110 mov %0, %s1 */
4406 printf ("\033[33m%s\033[0m %02x\n",
4407 "/** 1000 1110 mov %0, %s1 */",
4410 SYNTAX("mov %0, %s1");
4411 #line 666 "rl78-decode.opc"
4412 ID(mov
); DR(A
); SM(None
, SFR
);
4418 /** 1000 1111 mov %0, %e1%!1 */
4421 printf ("\033[33m%s\033[0m %02x\n",
4422 "/** 1000 1111 mov %0, %e1%!1 */",
4425 SYNTAX("mov %0, %e1%!1");
4426 #line 624 "rl78-decode.opc"
4427 ID(mov
); DR(A
); SM(None
, IMMU(2));
4440 /** 1001 0reg dec %0 */
4441 #line 533 "rl78-decode.opc"
4442 int reg AU
= op
[0] & 0x07;
4445 printf ("\033[33m%s\033[0m %02x\n",
4446 "/** 1001 0reg dec %0 */",
4448 printf (" reg = 0x%x\n", reg
);
4451 #line 533 "rl78-decode.opc"
4452 ID(sub
); DRB(reg
); SC(1); Fza
;
4458 /** 1001 1000 mov %0, %1 */
4461 printf ("\033[33m%s\033[0m %02x\n",
4462 "/** 1001 1000 mov %0, %1 */",
4465 SYNTAX("mov %0, %1");
4466 #line 621 "rl78-decode.opc"
4467 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4473 /** 1001 1001 mov %e0%0,%1 */
4476 printf ("\033[33m%s\033[0m %02x\n",
4477 "/** 1001 1001 mov %e0%0,%1 */",
4480 SYNTAX("mov %e0%0,%1");
4481 #line 594 "rl78-decode.opc"
4482 ID(mov
); DM(DE
, 0); SR(A
);
4488 /** 1001 1010 mov %e0%0, %1 */
4491 printf ("\033[33m%s\033[0m %02x\n",
4492 "/** 1001 1010 mov %e0%0, %1 */",
4495 SYNTAX("mov %e0%0, %1");
4496 #line 600 "rl78-decode.opc"
4497 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4503 /** 1001 1011 mov %e0%0,%1 */
4506 printf ("\033[33m%s\033[0m %02x\n",
4507 "/** 1001 1011 mov %e0%0,%1 */",
4510 SYNTAX("mov %e0%0,%1");
4511 #line 603 "rl78-decode.opc"
4512 ID(mov
); DM(HL
, 0); SR(A
);
4518 /** 1001 1100 mov %e0%0, %1 */
4521 printf ("\033[33m%s\033[0m %02x\n",
4522 "/** 1001 1100 mov %e0%0, %1 */",
4525 SYNTAX("mov %e0%0, %1");
4526 #line 612 "rl78-decode.opc"
4527 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4533 /** 1001 1101 mov %0, %1 */
4536 printf ("\033[33m%s\033[0m %02x\n",
4537 "/** 1001 1101 mov %0, %1 */",
4540 SYNTAX("mov %0, %1");
4541 #line 726 "rl78-decode.opc"
4542 ID(mov
); DM(None
, SADDR
); SR(A
);
4548 /** 1001 1110 mov %0, %1 */
4551 printf ("\033[33m%s\033[0m %02x\n",
4552 "/** 1001 1110 mov %0, %1 */",
4555 SYNTAX("mov %0, %1");
4556 #line 756 "rl78-decode.opc"
4557 ID(mov
); DM(None
, SFR
); SR(A
);
4559 /*----------------------------------------------------------------------*/
4565 /** 1001 1111 mov %e0%!0, %1 */
4568 printf ("\033[33m%s\033[0m %02x\n",
4569 "/** 1001 1111 mov %e0%!0, %1 */",
4572 SYNTAX("mov %e0%!0, %1");
4573 #line 591 "rl78-decode.opc"
4574 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4580 /** 1010 0000 inc %e0%!0 */
4583 printf ("\033[33m%s\033[0m %02x\n",
4584 "/** 1010 0000 inc %e0%!0 */",
4587 SYNTAX("inc %e0%!0");
4588 #line 560 "rl78-decode.opc"
4589 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4598 /** 1010 0rg1 incw %0 */
4599 #line 580 "rl78-decode.opc"
4600 int rg AU
= (op
[0] >> 1) & 0x03;
4603 printf ("\033[33m%s\033[0m %02x\n",
4604 "/** 1010 0rg1 incw %0 */",
4606 printf (" rg = 0x%x\n", rg
);
4609 #line 580 "rl78-decode.opc"
4610 ID(add
); W(); DRW(rg
); SC(1);
4616 /** 1010 0010 incw %e0%!0 */
4619 printf ("\033[33m%s\033[0m %02x\n",
4620 "/** 1010 0010 incw %e0%!0 */",
4623 SYNTAX("incw %e0%!0");
4624 #line 574 "rl78-decode.opc"
4625 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4631 /** 1010 0100 inc %0 */
4634 printf ("\033[33m%s\033[0m %02x\n",
4635 "/** 1010 0100 inc %0 */",
4639 #line 569 "rl78-decode.opc"
4640 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4642 /*----------------------------------------------------------------------*/
4648 /** 1010 0110 incw %0 */
4651 printf ("\033[33m%s\033[0m %02x\n",
4652 "/** 1010 0110 incw %0 */",
4656 #line 583 "rl78-decode.opc"
4657 ID(add
); W(); DM(None
, SADDR
); SC(1);
4659 /*----------------------------------------------------------------------*/
4665 /** 1010 1000 movw %0, %1 */
4668 printf ("\033[33m%s\033[0m %02x\n",
4669 "/** 1010 1000 movw %0, %1 */",
4672 SYNTAX("movw %0, %1");
4673 #line 826 "rl78-decode.opc"
4674 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4680 /** 1010 1001 movw %0, %e1%1 */
4683 printf ("\033[33m%s\033[0m %02x\n",
4684 "/** 1010 1001 movw %0, %e1%1 */",
4687 SYNTAX("movw %0, %e1%1");
4688 #line 814 "rl78-decode.opc"
4689 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4695 /** 1010 1010 movw %0, %e1%1 */
4698 printf ("\033[33m%s\033[0m %02x\n",
4699 "/** 1010 1010 movw %0, %e1%1 */",
4702 SYNTAX("movw %0, %e1%1");
4703 #line 817 "rl78-decode.opc"
4704 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4710 /** 1010 1011 movw %0, %e1%1 */
4713 printf ("\033[33m%s\033[0m %02x\n",
4714 "/** 1010 1011 movw %0, %e1%1 */",
4717 SYNTAX("movw %0, %e1%1");
4718 #line 820 "rl78-decode.opc"
4719 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4725 /** 1010 1100 movw %0, %e1%1 */
4728 printf ("\033[33m%s\033[0m %02x\n",
4729 "/** 1010 1100 movw %0, %e1%1 */",
4732 SYNTAX("movw %0, %e1%1");
4733 #line 823 "rl78-decode.opc"
4734 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4740 /** 1010 1101 movw %0, %1 */
4743 printf ("\033[33m%s\033[0m %02x\n",
4744 "/** 1010 1101 movw %0, %1 */",
4747 SYNTAX("movw %0, %1");
4748 #line 856 "rl78-decode.opc"
4749 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4755 /** 1010 1110 movw %0, %s1 */
4758 printf ("\033[33m%s\033[0m %02x\n",
4759 "/** 1010 1110 movw %0, %s1 */",
4762 SYNTAX("movw %0, %s1");
4763 #line 859 "rl78-decode.opc"
4764 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4770 /** 1010 1111 movw %0, %e1%!1 */
4773 printf ("\033[33m%s\033[0m %02x\n",
4774 "/** 1010 1111 movw %0, %e1%!1 */",
4777 SYNTAX("movw %0, %e1%!1");
4778 #line 810 "rl78-decode.opc"
4779 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4786 /** 1011 0000 dec %e0%!0 */
4789 printf ("\033[33m%s\033[0m %02x\n",
4790 "/** 1011 0000 dec %e0%!0 */",
4793 SYNTAX("dec %e0%!0");
4794 #line 527 "rl78-decode.opc"
4795 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4804 /** 1011 0rg1 decw %0 */
4805 #line 547 "rl78-decode.opc"
4806 int rg AU
= (op
[0] >> 1) & 0x03;
4809 printf ("\033[33m%s\033[0m %02x\n",
4810 "/** 1011 0rg1 decw %0 */",
4812 printf (" rg = 0x%x\n", rg
);
4815 #line 547 "rl78-decode.opc"
4816 ID(sub
); W(); DRW(rg
); SC(1);
4822 /** 1011 0010 decw %e0%!0 */
4825 printf ("\033[33m%s\033[0m %02x\n",
4826 "/** 1011 0010 decw %e0%!0 */",
4829 SYNTAX("decw %e0%!0");
4830 #line 541 "rl78-decode.opc"
4831 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4837 /** 1011 0100 dec %0 */
4840 printf ("\033[33m%s\033[0m %02x\n",
4841 "/** 1011 0100 dec %0 */",
4845 #line 536 "rl78-decode.opc"
4846 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4848 /*----------------------------------------------------------------------*/
4854 /** 1011 0110 decw %0 */
4857 printf ("\033[33m%s\033[0m %02x\n",
4858 "/** 1011 0110 decw %0 */",
4862 #line 550 "rl78-decode.opc"
4863 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4865 /*----------------------------------------------------------------------*/
4871 /** 1011 1000 movw %0, %1 */
4874 printf ("\033[33m%s\033[0m %02x\n",
4875 "/** 1011 1000 movw %0, %1 */",
4878 SYNTAX("movw %0, %1");
4879 #line 807 "rl78-decode.opc"
4880 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4886 /** 1011 1001 movw %e0%0, %1 */
4889 printf ("\033[33m%s\033[0m %02x\n",
4890 "/** 1011 1001 movw %e0%0, %1 */",
4893 SYNTAX("movw %e0%0, %1");
4894 #line 795 "rl78-decode.opc"
4895 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4901 /** 1011 1010 movw %e0%0, %1 */
4904 printf ("\033[33m%s\033[0m %02x\n",
4905 "/** 1011 1010 movw %e0%0, %1 */",
4908 SYNTAX("movw %e0%0, %1");
4909 #line 798 "rl78-decode.opc"
4910 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4916 /** 1011 1011 movw %e0%0, %1 */
4919 printf ("\033[33m%s\033[0m %02x\n",
4920 "/** 1011 1011 movw %e0%0, %1 */",
4923 SYNTAX("movw %e0%0, %1");
4924 #line 801 "rl78-decode.opc"
4925 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4931 /** 1011 1100 movw %e0%0, %1 */
4934 printf ("\033[33m%s\033[0m %02x\n",
4935 "/** 1011 1100 movw %e0%0, %1 */",
4938 SYNTAX("movw %e0%0, %1");
4939 #line 804 "rl78-decode.opc"
4940 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4946 /** 1011 1101 movw %0, %1 */
4949 printf ("\033[33m%s\033[0m %02x\n",
4950 "/** 1011 1101 movw %0, %1 */",
4953 SYNTAX("movw %0, %1");
4954 #line 871 "rl78-decode.opc"
4955 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4961 /** 1011 1110 movw %0, %1 */
4964 printf ("\033[33m%s\033[0m %02x\n",
4965 "/** 1011 1110 movw %0, %1 */",
4968 SYNTAX("movw %0, %1");
4969 #line 877 "rl78-decode.opc"
4970 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4972 /*----------------------------------------------------------------------*/
4978 /** 1011 1111 movw %e0%!0, %1 */
4981 printf ("\033[33m%s\033[0m %02x\n",
4982 "/** 1011 1111 movw %e0%!0, %1 */",
4985 SYNTAX("movw %e0%!0, %1");
4986 #line 792 "rl78-decode.opc"
4987 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
4996 /** 1100 0rg0 pop %0 */
4997 #line 962 "rl78-decode.opc"
4998 int rg AU
= (op
[0] >> 1) & 0x03;
5001 printf ("\033[33m%s\033[0m %02x\n",
5002 "/** 1100 0rg0 pop %0 */",
5004 printf (" rg = 0x%x\n", rg
);
5007 #line 962 "rl78-decode.opc"
5008 ID(mov
); W(); DRW(rg
); SPOP();
5017 /** 1100 0rg1 push %1 */
5018 #line 970 "rl78-decode.opc"
5019 int rg AU
= (op
[0] >> 1) & 0x03;
5022 printf ("\033[33m%s\033[0m %02x\n",
5023 "/** 1100 0rg1 push %1 */",
5025 printf (" rg = 0x%x\n", rg
);
5028 #line 970 "rl78-decode.opc"
5029 ID(mov
); W(); DPUSH(); SRW(rg
);
5035 /** 1100 1000 mov %0, #%1 */
5038 printf ("\033[33m%s\033[0m %02x\n",
5039 "/** 1100 1000 mov %0, #%1 */",
5042 SYNTAX("mov %0, #%1");
5043 #line 618 "rl78-decode.opc"
5044 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5050 /** 1100 1001 movw %0, #%1 */
5053 printf ("\033[33m%s\033[0m %02x\n",
5054 "/** 1100 1001 movw %0, #%1 */",
5057 SYNTAX("movw %0, #%1");
5058 #line 868 "rl78-decode.opc"
5059 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5065 /** 1100 1010 mov %e0%0, #%1 */
5068 printf ("\033[33m%s\033[0m %02x\n",
5069 "/** 1100 1010 mov %e0%0, #%1 */",
5072 SYNTAX("mov %e0%0, #%1");
5073 #line 597 "rl78-decode.opc"
5074 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5080 /** 1100 1011 movw %0, #%1 */
5083 printf ("\033[33m%s\033[0m %02x\n",
5084 "/** 1100 1011 movw %0, #%1 */",
5087 SYNTAX("movw %0, #%1");
5088 #line 874 "rl78-decode.opc"
5089 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5095 /** 1100 1100 mov %e0%0, #%1 */
5098 printf ("\033[33m%s\033[0m %02x\n",
5099 "/** 1100 1100 mov %e0%0, #%1 */",
5102 SYNTAX("mov %e0%0, #%1");
5103 #line 609 "rl78-decode.opc"
5104 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5110 /** 1100 1101 mov %0, #%1 */
5113 printf ("\033[33m%s\033[0m %02x\n",
5114 "/** 1100 1101 mov %0, #%1 */",
5117 SYNTAX("mov %0, #%1");
5118 #line 723 "rl78-decode.opc"
5119 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5125 /** 1100 1110 mov %s0, #%1 */
5128 printf ("\033[33m%s\033[0m %02x\n",
5129 "/** 1100 1110 mov %s0, #%1 */",
5132 SYNTAX("mov %s0, #%1");
5133 #line 729 "rl78-decode.opc"
5136 ID(mov
); DM(None
, op0
); SC(op1
);
5141 rl78
->syntax
= "mulhu"; ID(mulhu
);
5144 rl78
->syntax
= "mulh"; ID(mulh
);
5147 rl78
->syntax
= "divhu"; ID(divhu
);
5150 rl78
->syntax
= "divwu"; ID(divwu
);
5153 rl78
->syntax
= "machu"; ID(machu
);
5156 rl78
->syntax
= "mach"; ID(mach
);
5164 /** 1100 1111 mov %e0%!0, #%1 */
5167 printf ("\033[33m%s\033[0m %02x\n",
5168 "/** 1100 1111 mov %e0%!0, #%1 */",
5171 SYNTAX("mov %e0%!0, #%1");
5172 #line 588 "rl78-decode.opc"
5173 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5182 /** 1101 00rg cmp0 %0 */
5183 #line 497 "rl78-decode.opc"
5184 int rg AU
= op
[0] & 0x03;
5187 printf ("\033[33m%s\033[0m %02x\n",
5188 "/** 1101 00rg cmp0 %0 */",
5190 printf (" rg = 0x%x\n", rg
);
5193 #line 497 "rl78-decode.opc"
5194 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5200 /** 1101 0100 cmp0 %0 */
5203 printf ("\033[33m%s\033[0m %02x\n",
5204 "/** 1101 0100 cmp0 %0 */",
5208 #line 500 "rl78-decode.opc"
5209 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5211 /*----------------------------------------------------------------------*/
5217 /** 1101 0101 cmp0 %e0%!0 */
5220 printf ("\033[33m%s\033[0m %02x\n",
5221 "/** 1101 0101 cmp0 %e0%!0 */",
5224 SYNTAX("cmp0 %e0%!0");
5225 #line 494 "rl78-decode.opc"
5226 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5232 /** 1101 0110 mulu x */
5235 printf ("\033[33m%s\033[0m %02x\n",
5236 "/** 1101 0110 mulu x */",
5240 #line 882 "rl78-decode.opc"
5243 /*----------------------------------------------------------------------*/
5249 /** 1101 0111 ret */
5252 printf ("\033[33m%s\033[0m %02x\n",
5253 "/** 1101 0111 ret */",
5257 #line 978 "rl78-decode.opc"
5264 /** 1101 1000 mov %0, %1 */
5267 printf ("\033[33m%s\033[0m %02x\n",
5268 "/** 1101 1000 mov %0, %1 */",
5271 SYNTAX("mov %0, %1");
5272 #line 690 "rl78-decode.opc"
5273 ID(mov
); DR(X
); SM(None
, SADDR
);
5279 /** 1101 1001 mov %0, %e1%!1 */
5282 printf ("\033[33m%s\033[0m %02x\n",
5283 "/** 1101 1001 mov %0, %e1%!1 */",
5286 SYNTAX("mov %0, %e1%!1");
5287 #line 687 "rl78-decode.opc"
5288 ID(mov
); DR(X
); SM(None
, IMMU(2));
5296 /** 11ra 1010 movw %0, %1 */
5297 #line 865 "rl78-decode.opc"
5298 int ra AU
= (op
[0] >> 4) & 0x03;
5301 printf ("\033[33m%s\033[0m %02x\n",
5302 "/** 11ra 1010 movw %0, %1 */",
5304 printf (" ra = 0x%x\n", ra
);
5306 SYNTAX("movw %0, %1");
5307 #line 865 "rl78-decode.opc"
5308 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5316 /** 11ra 1011 movw %0, %e1%!1 */
5317 #line 862 "rl78-decode.opc"
5318 int ra AU
= (op
[0] >> 4) & 0x03;
5321 printf ("\033[33m%s\033[0m %02x\n",
5322 "/** 11ra 1011 movw %0, %e1%!1 */",
5324 printf (" ra = 0x%x\n", ra
);
5326 SYNTAX("movw %0, %e1%!1");
5327 #line 862 "rl78-decode.opc"
5328 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5334 /** 1101 1100 bc $%a0 */
5337 printf ("\033[33m%s\033[0m %02x\n",
5338 "/** 1101 1100 bc $%a0 */",
5342 #line 313 "rl78-decode.opc"
5343 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5349 /** 1101 1101 bz $%a0 */
5352 printf ("\033[33m%s\033[0m %02x\n",
5353 "/** 1101 1101 bz $%a0 */",
5357 #line 325 "rl78-decode.opc"
5358 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5364 /** 1101 1110 bnc $%a0 */
5367 printf ("\033[33m%s\033[0m %02x\n",
5368 "/** 1101 1110 bnc $%a0 */",
5372 #line 316 "rl78-decode.opc"
5373 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5379 /** 1101 1111 bnz $%a0 */
5382 printf ("\033[33m%s\033[0m %02x\n",
5383 "/** 1101 1111 bnz $%a0 */",
5387 #line 328 "rl78-decode.opc"
5388 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5390 /*----------------------------------------------------------------------*/
5399 /** 1110 00rg oneb %0 */
5400 #line 900 "rl78-decode.opc"
5401 int rg AU
= op
[0] & 0x03;
5404 printf ("\033[33m%s\033[0m %02x\n",
5405 "/** 1110 00rg oneb %0 */",
5407 printf (" rg = 0x%x\n", rg
);
5410 #line 900 "rl78-decode.opc"
5411 ID(mov
); DRB(rg
); SC(1);
5417 /** 1110 0100 oneb %0 */
5420 printf ("\033[33m%s\033[0m %02x\n",
5421 "/** 1110 0100 oneb %0 */",
5425 #line 903 "rl78-decode.opc"
5426 ID(mov
); DM(None
, SADDR
); SC(1);
5428 /*----------------------------------------------------------------------*/
5434 /** 1110 0101 oneb %e0%!0 */
5437 printf ("\033[33m%s\033[0m %02x\n",
5438 "/** 1110 0101 oneb %e0%!0 */",
5441 SYNTAX("oneb %e0%!0");
5442 #line 897 "rl78-decode.opc"
5443 ID(mov
); DM(None
, IMMU(2)); SC(1);
5449 /** 1110 0110 onew %0 */
5452 printf ("\033[33m%s\033[0m %02x\n",
5453 "/** 1110 0110 onew %0 */",
5457 #line 908 "rl78-decode.opc"
5458 ID(mov
); DR(AX
); SC(1);
5464 /** 1110 0111 onew %0 */
5467 printf ("\033[33m%s\033[0m %02x\n",
5468 "/** 1110 0111 onew %0 */",
5472 #line 911 "rl78-decode.opc"
5473 ID(mov
); DR(BC
); SC(1);
5475 /*----------------------------------------------------------------------*/
5481 /** 1110 1000 mov %0, %1 */
5484 printf ("\033[33m%s\033[0m %02x\n",
5485 "/** 1110 1000 mov %0, %1 */",
5488 SYNTAX("mov %0, %1");
5489 #line 678 "rl78-decode.opc"
5490 ID(mov
); DR(B
); SM(None
, SADDR
);
5496 /** 1110 1001 mov %0, %e1%!1 */
5499 printf ("\033[33m%s\033[0m %02x\n",
5500 "/** 1110 1001 mov %0, %e1%!1 */",
5503 SYNTAX("mov %0, %e1%!1");
5504 #line 672 "rl78-decode.opc"
5505 ID(mov
); DR(B
); SM(None
, IMMU(2));
5511 /** 1110 1100 br !%!a0 */
5514 printf ("\033[33m%s\033[0m %02x\n",
5515 "/** 1110 1100 br !%!a0 */",
5519 #line 347 "rl78-decode.opc"
5520 ID(branch
); DC(IMMU(3));
5526 /** 1110 1101 br %!a0 */
5529 printf ("\033[33m%s\033[0m %02x\n",
5530 "/** 1110 1101 br %!a0 */",
5534 #line 350 "rl78-decode.opc"
5535 ID(branch
); DC(IMMU(2));
5541 /** 1110 1110 br $%!a0 */
5544 printf ("\033[33m%s\033[0m %02x\n",
5545 "/** 1110 1110 br $%!a0 */",
5549 #line 353 "rl78-decode.opc"
5550 ID(branch
); DC(pc
+IMMS(2)+3);
5556 /** 1110 1111 br $%a0 */
5559 printf ("\033[33m%s\033[0m %02x\n",
5560 "/** 1110 1111 br $%a0 */",
5564 #line 356 "rl78-decode.opc"
5565 ID(branch
); DC(pc
+IMMS(1)+2);
5574 /** 1111 00rg clrb %0 */
5575 #line 443 "rl78-decode.opc"
5576 int rg AU
= op
[0] & 0x03;
5579 printf ("\033[33m%s\033[0m %02x\n",
5580 "/** 1111 00rg clrb %0 */",
5582 printf (" rg = 0x%x\n", rg
);
5585 #line 443 "rl78-decode.opc"
5586 ID(mov
); DRB(rg
); SC(0);
5592 /** 1111 0100 clrb %0 */
5595 printf ("\033[33m%s\033[0m %02x\n",
5596 "/** 1111 0100 clrb %0 */",
5600 #line 446 "rl78-decode.opc"
5601 ID(mov
); DM(None
, SADDR
); SC(0);
5603 /*----------------------------------------------------------------------*/
5609 /** 1111 0101 clrb %e0%!0 */
5612 printf ("\033[33m%s\033[0m %02x\n",
5613 "/** 1111 0101 clrb %e0%!0 */",
5616 SYNTAX("clrb %e0%!0");
5617 #line 440 "rl78-decode.opc"
5618 ID(mov
); DM(None
, IMMU(2)); SC(0);
5624 /** 1111 0110 clrw %0 */
5627 printf ("\033[33m%s\033[0m %02x\n",
5628 "/** 1111 0110 clrw %0 */",
5632 #line 451 "rl78-decode.opc"
5633 ID(mov
); DR(AX
); SC(0);
5639 /** 1111 0111 clrw %0 */
5642 printf ("\033[33m%s\033[0m %02x\n",
5643 "/** 1111 0111 clrw %0 */",
5647 #line 454 "rl78-decode.opc"
5648 ID(mov
); DR(BC
); SC(0);
5650 /*----------------------------------------------------------------------*/
5656 /** 1111 1000 mov %0, %1 */
5659 printf ("\033[33m%s\033[0m %02x\n",
5660 "/** 1111 1000 mov %0, %1 */",
5663 SYNTAX("mov %0, %1");
5664 #line 684 "rl78-decode.opc"
5665 ID(mov
); DR(C
); SM(None
, SADDR
);
5671 /** 1111 1001 mov %0, %e1%!1 */
5674 printf ("\033[33m%s\033[0m %02x\n",
5675 "/** 1111 1001 mov %0, %e1%!1 */",
5678 SYNTAX("mov %0, %e1%!1");
5679 #line 681 "rl78-decode.opc"
5680 ID(mov
); DR(C
); SM(None
, IMMU(2));
5686 /** 1111 1100 call !%!a0 */
5689 printf ("\033[33m%s\033[0m %02x\n",
5690 "/** 1111 1100 call !%!a0 */",
5693 SYNTAX("call !%!a0");
5694 #line 400 "rl78-decode.opc"
5695 ID(call
); DC(IMMU(3));
5701 /** 1111 1101 call %!a0 */
5704 printf ("\033[33m%s\033[0m %02x\n",
5705 "/** 1111 1101 call %!a0 */",
5708 SYNTAX("call %!a0");
5709 #line 403 "rl78-decode.opc"
5710 ID(call
); DC(IMMU(2));
5716 /** 1111 1110 call $%!a0 */
5719 printf ("\033[33m%s\033[0m %02x\n",
5720 "/** 1111 1110 call $%!a0 */",
5723 SYNTAX("call $%!a0");
5724 #line 406 "rl78-decode.opc"
5725 ID(call
); DC(pc
+IMMS(2)+3);
5731 /** 1111 1111 brk1 */
5734 printf ("\033[33m%s\033[0m %02x\n",
5735 "/** 1111 1111 brk1 */",
5739 #line 364 "rl78-decode.opc"
5745 #line 1266 "rl78-decode.opc"
5747 return rl78
->n_bytes
;
This page took 0.151541 seconds and 4 git commands to generate.