1 #line 1 "rl78-decode.opc"
3 /* Copyright 2012-2013 Free Software Foundation, Inc.
4 Contributed by Red Hat.
7 This file is part of the GNU opcodes library.
9 This library is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 MA 02110-1301, USA. */
29 #include "opcode/rl78.h"
35 RL78_Opcode_Decoded
* rl78
;
36 int (* getbyte
)(void *);
41 #define ID(x) rl78->id = RLO_##x, rl78->lineno = __LINE__
42 #define OP(n,t,r,a) (rl78->op[n].type = t, \
43 rl78->op[n].reg = r, \
44 rl78->op[n].addend = a )
45 #define OPX(n,t,r1,r2,a) \
46 (rl78->op[n].type = t, \
47 rl78->op[n].reg = r1, \
48 rl78->op[n].reg2 = r2, \
49 rl78->op[n].addend = a )
51 #define W() rl78->size = RL78_Word
53 #define AU ATTRIBUTE_UNUSED
54 #define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
55 #define B ((unsigned long) GETBYTE())
57 #define SYNTAX(x) rl78->syntax = x
59 #define UNSUPPORTED() \
60 rl78->syntax = "*unknown*"
62 #define RB(x) ((x)+RL78_Reg_X)
63 #define RW(x) ((x)+RL78_Reg_AX)
65 #define Fz rl78->flags = RL78_PSW_Z
66 #define Fza rl78->flags = RL78_PSW_Z | RL78_PSW_AC
67 #define Fzc rl78->flags = RL78_PSW_Z | RL78_PSW_CY
68 #define Fzac rl78->flags = RL78_PSW_Z | RL78_PSW_AC | RL78_PSW_CY
69 #define Fa rl78->flags = RL78_PSW_AC
70 #define Fc rl78->flags = RL78_PSW_CY
71 #define Fac rl78->flags = RL78_PSW_AC | RL78_PSW_CY
73 #define IMMU(bytes) immediate (bytes, 0, ld)
74 #define IMMS(bytes) immediate (bytes, 1, ld)
77 immediate (int bytes
, int sign_extend
, LocalData
* ld
)
85 if (sign_extend
&& (i
& 0x80))
91 if (sign_extend
&& (i
& 0x8000))
98 if (sign_extend
&& (i
& 0x800000))
102 fprintf (stderr
, "Programmer error: immediate() called with invalid byte count %d\n", bytes
);
108 #define DC(c) OP (0, RL78_Operand_Immediate, 0, c)
109 #define DR(r) OP (0, RL78_Operand_Register, RL78_Reg_##r, 0)
110 #define DRB(r) OP (0, RL78_Operand_Register, RB(r), 0)
111 #define DRW(r) OP (0, RL78_Operand_Register, RW(r), 0)
112 #define DM(r,a) OP (0, RL78_Operand_Indirect, RL78_Reg_##r, a)
113 #define DM2(r1,r2,a) OPX (0, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
114 #define DE() rl78->op[0].use_es = 1
115 #define DB(b) set_bit (rl78->op, b)
116 #define DCY() DR(PSW); DB(0)
117 #define DPUSH() OP (0, RL78_Operand_PreDec, RL78_Reg_SP, 0);
119 #define SC(c) OP (1, RL78_Operand_Immediate, 0, c)
120 #define SR(r) OP (1, RL78_Operand_Register, RL78_Reg_##r, 0)
121 #define SRB(r) OP (1, RL78_Operand_Register, RB(r), 0)
122 #define SRW(r) OP (1, RL78_Operand_Register, RW(r), 0)
123 #define SM(r,a) OP (1, RL78_Operand_Indirect, RL78_Reg_##r, a)
124 #define SM2(r1,r2,a) OPX (1, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
125 #define SE() rl78->op[1].use_es = 1
126 #define SB(b) set_bit (rl78->op+1, b)
127 #define SCY() SR(PSW); SB(0)
128 #define COND(c) rl78->op[1].condition = RL78_Condition_##c
129 #define SPOP() OP (1, RL78_Operand_PostInc, RL78_Reg_SP, 0);
132 set_bit (RL78_Opcode_Operand
*op
, int bit
)
134 op
->bit_number
= bit
;
136 case RL78_Operand_Register
:
137 op
->type
= RL78_Operand_Bit
;
139 case RL78_Operand_Indirect
:
140 op
->type
= RL78_Operand_BitIndirect
;
161 #define SADDR saddr (IMMU (1))
162 #define SFR sfr (IMMU (1))
165 rl78_decode_opcode (unsigned long pc AU
,
166 RL78_Opcode_Decoded
* rl78
,
167 int (* getbyte
)(void *),
170 LocalData lds
, * ld
= &lds
;
171 unsigned char op_buf
[20] = {0};
172 unsigned char *op
= op_buf
;
176 lds
.getbyte
= getbyte
;
180 memset (rl78
, 0, sizeof (*rl78
));
184 /* Byte registers, not including A. */
185 /* Word registers, not including AX. */
187 /*----------------------------------------------------------------------*/
191 switch (op
[0] & 0xff)
198 printf ("\033[33m%s\033[0m %02x\n",
199 "/** 0000 0000 nop */",
203 #line 910 "rl78-decode.opc"
206 /*----------------------------------------------------------------------*/
215 /** 0000 0rw1 addw %0, %1 */
216 #line 273 "rl78-decode.opc"
217 int rw AU
= (op
[0] >> 1) & 0x03;
220 printf ("\033[33m%s\033[0m %02x\n",
221 "/** 0000 0rw1 addw %0, %1 */",
223 printf (" rw = 0x%x\n", rw
);
225 SYNTAX("addw %0, %1");
226 #line 273 "rl78-decode.opc"
227 ID(add
); W(); DR(AX
); SRW(rw
); Fzac
;
233 /** 0000 0010 addw %0, %e!1 */
236 printf ("\033[33m%s\033[0m %02x\n",
237 "/** 0000 0010 addw %0, %e!1 */",
240 SYNTAX("addw %0, %e!1");
241 #line 264 "rl78-decode.opc"
242 ID(add
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
248 /** 0000 0100 addw %0, #%1 */
251 printf ("\033[33m%s\033[0m %02x\n",
252 "/** 0000 0100 addw %0, #%1 */",
255 SYNTAX("addw %0, #%1");
256 #line 270 "rl78-decode.opc"
257 ID(add
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
263 /** 0000 0110 addw %0, %1 */
266 printf ("\033[33m%s\033[0m %02x\n",
267 "/** 0000 0110 addw %0, %1 */",
270 SYNTAX("addw %0, %1");
271 #line 276 "rl78-decode.opc"
272 ID(add
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
278 /** 0000 1000 xch a, x */
281 printf ("\033[33m%s\033[0m %02x\n",
282 "/** 0000 1000 xch a, x */",
286 #line 1233 "rl78-decode.opc"
287 ID(xch
); DR(A
); SR(X
);
289 /*----------------------------------------------------------------------*/
295 /** 0000 1001 mov %0, %e1 */
298 printf ("\033[33m%s\033[0m %02x\n",
299 "/** 0000 1001 mov %0, %e1 */",
302 SYNTAX("mov %0, %e1");
303 #line 677 "rl78-decode.opc"
304 ID(mov
); DR(A
); SM(B
, IMMU(2));
310 /** 0000 1010 add %0, #%1 */
313 printf ("\033[33m%s\033[0m %02x\n",
314 "/** 0000 1010 add %0, #%1 */",
317 SYNTAX("add %0, #%1");
318 #line 227 "rl78-decode.opc"
319 ID(add
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
321 /*----------------------------------------------------------------------*/
327 /** 0000 1011 add %0, %1 */
330 printf ("\033[33m%s\033[0m %02x\n",
331 "/** 0000 1011 add %0, %1 */",
334 SYNTAX("add %0, %1");
335 #line 221 "rl78-decode.opc"
336 ID(add
); DR(A
); SM(None
, SADDR
); Fzac
;
342 /** 0000 1100 add %0, #%1 */
345 printf ("\033[33m%s\033[0m %02x\n",
346 "/** 0000 1100 add %0, #%1 */",
349 SYNTAX("add %0, #%1");
350 #line 215 "rl78-decode.opc"
351 ID(add
); DR(A
); SC(IMMU(1)); Fzac
;
357 /** 0000 1101 add %0, %e1 */
360 printf ("\033[33m%s\033[0m %02x\n",
361 "/** 0000 1101 add %0, %e1 */",
364 SYNTAX("add %0, %e1");
365 #line 203 "rl78-decode.opc"
366 ID(add
); DR(A
); SM(HL
, 0); Fzac
;
372 /** 0000 1110 add %0, %e1 */
375 printf ("\033[33m%s\033[0m %02x\n",
376 "/** 0000 1110 add %0, %e1 */",
379 SYNTAX("add %0, %e1");
380 #line 209 "rl78-decode.opc"
381 ID(add
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
387 /** 0000 1111 add %0, %e!1 */
390 printf ("\033[33m%s\033[0m %02x\n",
391 "/** 0000 1111 add %0, %e!1 */",
394 SYNTAX("add %0, %e!1");
395 #line 200 "rl78-decode.opc"
396 ID(add
); DR(A
); SM(None
, IMMU(2)); Fzac
;
402 /** 0001 0000 addw %0, #%1 */
405 printf ("\033[33m%s\033[0m %02x\n",
406 "/** 0001 0000 addw %0, #%1 */",
409 SYNTAX("addw %0, #%1");
410 #line 279 "rl78-decode.opc"
411 ID(add
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
413 /*----------------------------------------------------------------------*/
422 printf ("\033[33m%s\033[0m %02x\n",
423 "/** 0001 0001 es: */",
427 #line 192 "rl78-decode.opc"
433 /*----------------------------------------------------------------------*/
441 /** 0001 0ra0 movw %0, %1 */
442 #line 858 "rl78-decode.opc"
443 int ra AU
= (op
[0] >> 1) & 0x03;
446 printf ("\033[33m%s\033[0m %02x\n",
447 "/** 0001 0ra0 movw %0, %1 */",
449 printf (" ra = 0x%x\n", ra
);
451 SYNTAX("movw %0, %1");
452 #line 858 "rl78-decode.opc"
453 ID(mov
); W(); DRW(ra
); SR(AX
);
461 /** 0001 0ra1 movw %0, %1 */
462 #line 855 "rl78-decode.opc"
463 int ra AU
= (op
[0] >> 1) & 0x03;
466 printf ("\033[33m%s\033[0m %02x\n",
467 "/** 0001 0ra1 movw %0, %1 */",
469 printf (" ra = 0x%x\n", ra
);
471 SYNTAX("movw %0, %1");
472 #line 855 "rl78-decode.opc"
473 ID(mov
); W(); DR(AX
); SRW(ra
);
479 /** 0001 1000 mov %e0, %1 */
482 printf ("\033[33m%s\033[0m %02x\n",
483 "/** 0001 1000 mov %e0, %1 */",
486 SYNTAX("mov %e0, %1");
487 #line 728 "rl78-decode.opc"
488 ID(mov
); DM(B
, IMMU(2)); SR(A
);
494 /** 0001 1001 mov %e0, #%1 */
497 printf ("\033[33m%s\033[0m %02x\n",
498 "/** 0001 1001 mov %e0, #%1 */",
501 SYNTAX("mov %e0, #%1");
502 #line 725 "rl78-decode.opc"
503 ID(mov
); DM(B
, IMMU(2)); SC(IMMU(1));
509 /** 0001 1010 addc %0, #%1 */
512 printf ("\033[33m%s\033[0m %02x\n",
513 "/** 0001 1010 addc %0, #%1 */",
516 SYNTAX("addc %0, #%1");
517 #line 259 "rl78-decode.opc"
518 ID(addc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
520 /*----------------------------------------------------------------------*/
526 /** 0001 1011 addc %0, %1 */
529 printf ("\033[33m%s\033[0m %02x\n",
530 "/** 0001 1011 addc %0, %1 */",
533 SYNTAX("addc %0, %1");
534 #line 256 "rl78-decode.opc"
535 ID(addc
); DR(A
); SM(None
, SADDR
); Fzac
;
541 /** 0001 1100 addc %0, #%1 */
544 printf ("\033[33m%s\033[0m %02x\n",
545 "/** 0001 1100 addc %0, #%1 */",
548 SYNTAX("addc %0, #%1");
549 #line 247 "rl78-decode.opc"
550 ID(addc
); DR(A
); SC(IMMU(1)); Fzac
;
556 /** 0001 1101 addc %0, %e1 */
559 printf ("\033[33m%s\033[0m %02x\n",
560 "/** 0001 1101 addc %0, %e1 */",
563 SYNTAX("addc %0, %e1");
564 #line 235 "rl78-decode.opc"
565 ID(addc
); DR(A
); SM(HL
, 0); Fzac
;
571 /** 0001 1110 addc %0, %e1 */
574 printf ("\033[33m%s\033[0m %02x\n",
575 "/** 0001 1110 addc %0, %e1 */",
578 SYNTAX("addc %0, %e1");
579 #line 244 "rl78-decode.opc"
580 ID(addc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
586 /** 0001 1111 addc %0, %e!1 */
589 printf ("\033[33m%s\033[0m %02x\n",
590 "/** 0001 1111 addc %0, %e!1 */",
593 SYNTAX("addc %0, %e!1");
594 #line 232 "rl78-decode.opc"
595 ID(addc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
601 /** 0010 0000 subw %0, #%1 */
604 printf ("\033[33m%s\033[0m %02x\n",
605 "/** 0010 0000 subw %0, #%1 */",
608 SYNTAX("subw %0, #%1");
609 #line 1197 "rl78-decode.opc"
610 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
612 /*----------------------------------------------------------------------*/
621 /** 0010 0rw1 subw %0, %1 */
622 #line 1191 "rl78-decode.opc"
623 int rw AU
= (op
[0] >> 1) & 0x03;
626 printf ("\033[33m%s\033[0m %02x\n",
627 "/** 0010 0rw1 subw %0, %1 */",
629 printf (" rw = 0x%x\n", rw
);
631 SYNTAX("subw %0, %1");
632 #line 1191 "rl78-decode.opc"
633 ID(sub
); W(); DR(AX
); SRW(rw
); Fzac
;
639 /** 0010 0010 subw %0, %e!1 */
642 printf ("\033[33m%s\033[0m %02x\n",
643 "/** 0010 0010 subw %0, %e!1 */",
646 SYNTAX("subw %0, %e!1");
647 #line 1182 "rl78-decode.opc"
648 ID(sub
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
654 /** 0010 0100 subw %0, #%1 */
657 printf ("\033[33m%s\033[0m %02x\n",
658 "/** 0010 0100 subw %0, #%1 */",
661 SYNTAX("subw %0, #%1");
662 #line 1188 "rl78-decode.opc"
663 ID(sub
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
669 /** 0010 0110 subw %0, %1 */
672 printf ("\033[33m%s\033[0m %02x\n",
673 "/** 0010 0110 subw %0, %1 */",
676 SYNTAX("subw %0, %1");
677 #line 1194 "rl78-decode.opc"
678 ID(sub
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
684 /** 0010 1000 mov %e0, %1 */
687 printf ("\033[33m%s\033[0m %02x\n",
688 "/** 0010 1000 mov %e0, %1 */",
691 SYNTAX("mov %e0, %1");
692 #line 740 "rl78-decode.opc"
693 ID(mov
); DM(C
, IMMU(2)); SR(A
);
699 /** 0010 1001 mov %0, %e1 */
702 printf ("\033[33m%s\033[0m %02x\n",
703 "/** 0010 1001 mov %0, %e1 */",
706 SYNTAX("mov %0, %e1");
707 #line 683 "rl78-decode.opc"
708 ID(mov
); DR(A
); SM(C
, IMMU(2));
714 /** 0010 1010 sub %0, #%1 */
717 printf ("\033[33m%s\033[0m %02x\n",
718 "/** 0010 1010 sub %0, #%1 */",
721 SYNTAX("sub %0, #%1");
722 #line 1145 "rl78-decode.opc"
723 ID(sub
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
725 /*----------------------------------------------------------------------*/
731 /** 0010 1011 sub %0, %1 */
734 printf ("\033[33m%s\033[0m %02x\n",
735 "/** 0010 1011 sub %0, %1 */",
738 SYNTAX("sub %0, %1");
739 #line 1139 "rl78-decode.opc"
740 ID(sub
); DR(A
); SM(None
, SADDR
); Fzac
;
746 /** 0010 1100 sub %0, #%1 */
749 printf ("\033[33m%s\033[0m %02x\n",
750 "/** 0010 1100 sub %0, #%1 */",
753 SYNTAX("sub %0, #%1");
754 #line 1133 "rl78-decode.opc"
755 ID(sub
); DR(A
); SC(IMMU(1)); Fzac
;
761 /** 0010 1101 sub %0, %e1 */
764 printf ("\033[33m%s\033[0m %02x\n",
765 "/** 0010 1101 sub %0, %e1 */",
768 SYNTAX("sub %0, %e1");
769 #line 1121 "rl78-decode.opc"
770 ID(sub
); DR(A
); SM(HL
, 0); Fzac
;
776 /** 0010 1110 sub %0, %e1 */
779 printf ("\033[33m%s\033[0m %02x\n",
780 "/** 0010 1110 sub %0, %e1 */",
783 SYNTAX("sub %0, %e1");
784 #line 1127 "rl78-decode.opc"
785 ID(sub
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
791 /** 0010 1111 sub %0, %e!1 */
794 printf ("\033[33m%s\033[0m %02x\n",
795 "/** 0010 1111 sub %0, %e!1 */",
798 SYNTAX("sub %0, %e!1");
799 #line 1118 "rl78-decode.opc"
800 ID(sub
); DR(A
); SM(None
, IMMU(2)); Fzac
;
809 /** 0011 0rg0 movw %0, #%1 */
810 #line 852 "rl78-decode.opc"
811 int rg AU
= (op
[0] >> 1) & 0x03;
814 printf ("\033[33m%s\033[0m %02x\n",
815 "/** 0011 0rg0 movw %0, #%1 */",
817 printf (" rg = 0x%x\n", rg
);
819 SYNTAX("movw %0, #%1");
820 #line 852 "rl78-decode.opc"
821 ID(mov
); W(); DRW(rg
); SC(IMMU(2));
827 switch (op
[1] & 0x8f)
831 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
832 #line 415 "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 0000 btclr %s1, $%a0 */",
839 printf (" bit = 0x%x\n", bit
);
841 SYNTAX("btclr %s1, $%a0");
842 #line 415 "rl78-decode.opc"
843 ID(branch_cond_clear
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
845 /*----------------------------------------------------------------------*/
851 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
852 #line 409 "rl78-decode.opc"
853 int bit AU
= (op
[1] >> 4) & 0x07;
856 printf ("\033[33m%s\033[0m %02x %02x\n",
857 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
859 printf (" bit = 0x%x\n", bit
);
861 SYNTAX("btclr %1, $%a0");
862 #line 409 "rl78-decode.opc"
863 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
869 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
870 #line 401 "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 0010 bt %s1, $%a0 */",
877 printf (" bit = 0x%x\n", bit
);
879 SYNTAX("bt %s1, $%a0");
880 #line 401 "rl78-decode.opc"
881 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
883 /*----------------------------------------------------------------------*/
889 /** 0011 0001 0bit 0011 bt %1, $%a0 */
890 #line 395 "rl78-decode.opc"
891 int bit AU
= (op
[1] >> 4) & 0x07;
894 printf ("\033[33m%s\033[0m %02x %02x\n",
895 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
897 printf (" bit = 0x%x\n", bit
);
899 SYNTAX("bt %1, $%a0");
900 #line 395 "rl78-decode.opc"
901 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
907 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
908 #line 362 "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 0100 bf %s1, $%a0 */",
915 printf (" bit = 0x%x\n", bit
);
917 SYNTAX("bf %s1, $%a0");
918 #line 362 "rl78-decode.opc"
919 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
921 /*----------------------------------------------------------------------*/
927 /** 0011 0001 0bit 0101 bf %1, $%a0 */
928 #line 356 "rl78-decode.opc"
929 int bit AU
= (op
[1] >> 4) & 0x07;
932 printf ("\033[33m%s\033[0m %02x %02x\n",
933 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
935 printf (" bit = 0x%x\n", bit
);
937 SYNTAX("bf %1, $%a0");
938 #line 356 "rl78-decode.opc"
939 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(F
);
945 /** 0011 0001 0cnt 0111 shl %0, %1 */
946 #line 1074 "rl78-decode.opc"
947 int cnt AU
= (op
[1] >> 4) & 0x07;
950 printf ("\033[33m%s\033[0m %02x %02x\n",
951 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
953 printf (" cnt = 0x%x\n", cnt
);
955 SYNTAX("shl %0, %1");
956 #line 1074 "rl78-decode.opc"
957 ID(shl
); DR(C
); SC(cnt
);
963 /** 0011 0001 0cnt 1000 shl %0, %1 */
964 #line 1071 "rl78-decode.opc"
965 int cnt AU
= (op
[1] >> 4) & 0x07;
968 printf ("\033[33m%s\033[0m %02x %02x\n",
969 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
971 printf (" cnt = 0x%x\n", cnt
);
973 SYNTAX("shl %0, %1");
974 #line 1071 "rl78-decode.opc"
975 ID(shl
); DR(B
); SC(cnt
);
981 /** 0011 0001 0cnt 1001 shl %0, %1 */
982 #line 1068 "rl78-decode.opc"
983 int cnt AU
= (op
[1] >> 4) & 0x07;
986 printf ("\033[33m%s\033[0m %02x %02x\n",
987 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
989 printf (" cnt = 0x%x\n", cnt
);
991 SYNTAX("shl %0, %1");
992 #line 1068 "rl78-decode.opc"
993 ID(shl
); DR(A
); SC(cnt
);
999 /** 0011 0001 0cnt 1010 shr %0, %1 */
1000 #line 1085 "rl78-decode.opc"
1001 int cnt AU
= (op
[1] >> 4) & 0x07;
1004 printf ("\033[33m%s\033[0m %02x %02x\n",
1005 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
1007 printf (" cnt = 0x%x\n", cnt
);
1009 SYNTAX("shr %0, %1");
1010 #line 1085 "rl78-decode.opc"
1011 ID(shr
); DR(A
); SC(cnt
);
1017 /** 0011 0001 0cnt 1011 sar %0, %1 */
1018 #line 1032 "rl78-decode.opc"
1019 int cnt AU
= (op
[1] >> 4) & 0x07;
1022 printf ("\033[33m%s\033[0m %02x %02x\n",
1023 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1025 printf (" cnt = 0x%x\n", cnt
);
1027 SYNTAX("sar %0, %1");
1028 #line 1032 "rl78-decode.opc"
1029 ID(sar
); DR(A
); SC(cnt
);
1036 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1037 #line 1080 "rl78-decode.opc"
1038 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1041 printf ("\033[33m%s\033[0m %02x %02x\n",
1042 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1044 printf (" wcnt = 0x%x\n", wcnt
);
1046 SYNTAX("shlw %0, %1");
1047 #line 1080 "rl78-decode.opc"
1048 ID(shl
); W(); DR(BC
); SC(wcnt
);
1050 /*----------------------------------------------------------------------*/
1057 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1058 #line 1077 "rl78-decode.opc"
1059 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1062 printf ("\033[33m%s\033[0m %02x %02x\n",
1063 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1065 printf (" wcnt = 0x%x\n", wcnt
);
1067 SYNTAX("shlw %0, %1");
1068 #line 1077 "rl78-decode.opc"
1069 ID(shl
); W(); DR(AX
); SC(wcnt
);
1076 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1077 #line 1088 "rl78-decode.opc"
1078 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1081 printf ("\033[33m%s\033[0m %02x %02x\n",
1082 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1084 printf (" wcnt = 0x%x\n", wcnt
);
1086 SYNTAX("shrw %0, %1");
1087 #line 1088 "rl78-decode.opc"
1088 ID(shr
); W(); DR(AX
); SC(wcnt
);
1090 /*----------------------------------------------------------------------*/
1097 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1098 #line 1035 "rl78-decode.opc"
1099 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1102 printf ("\033[33m%s\033[0m %02x %02x\n",
1103 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1105 printf (" wcnt = 0x%x\n", wcnt
);
1107 SYNTAX("sarw %0, %1");
1108 #line 1035 "rl78-decode.opc"
1109 ID(sar
); W(); DR(AX
); SC(wcnt
);
1111 /*----------------------------------------------------------------------*/
1117 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
1118 #line 412 "rl78-decode.opc"
1119 int bit AU
= (op
[1] >> 4) & 0x07;
1122 printf ("\033[33m%s\033[0m %02x %02x\n",
1123 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1125 printf (" bit = 0x%x\n", bit
);
1127 SYNTAX("btclr %s1, $%a0");
1128 #line 412 "rl78-decode.opc"
1129 ID(branch_cond_clear
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1135 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
1136 #line 406 "rl78-decode.opc"
1137 int bit AU
= (op
[1] >> 4) & 0x07;
1140 printf ("\033[33m%s\033[0m %02x %02x\n",
1141 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
1143 printf (" bit = 0x%x\n", bit
);
1145 SYNTAX("btclr %e1, $%a0");
1146 #line 406 "rl78-decode.opc"
1147 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1153 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
1154 #line 398 "rl78-decode.opc"
1155 int bit AU
= (op
[1] >> 4) & 0x07;
1158 printf ("\033[33m%s\033[0m %02x %02x\n",
1159 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1161 printf (" bit = 0x%x\n", bit
);
1163 SYNTAX("bt %s1, $%a0");
1164 #line 398 "rl78-decode.opc"
1165 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1171 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
1172 #line 392 "rl78-decode.opc"
1173 int bit AU
= (op
[1] >> 4) & 0x07;
1176 printf ("\033[33m%s\033[0m %02x %02x\n",
1177 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
1179 printf (" bit = 0x%x\n", bit
);
1181 SYNTAX("bt %e1, $%a0");
1182 #line 392 "rl78-decode.opc"
1183 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1189 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
1190 #line 359 "rl78-decode.opc"
1191 int bit AU
= (op
[1] >> 4) & 0x07;
1194 printf ("\033[33m%s\033[0m %02x %02x\n",
1195 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1197 printf (" bit = 0x%x\n", bit
);
1199 SYNTAX("bf %s1, $%a0");
1200 #line 359 "rl78-decode.opc"
1201 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
1207 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
1208 #line 353 "rl78-decode.opc"
1209 int bit AU
= (op
[1] >> 4) & 0x07;
1212 printf ("\033[33m%s\033[0m %02x %02x\n",
1213 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
1215 printf (" bit = 0x%x\n", bit
);
1217 SYNTAX("bf %e1, $%a0");
1218 #line 353 "rl78-decode.opc"
1219 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(F
);
1223 default: UNSUPPORTED(); break;
1230 /** 0011 0ra1 xchw %0, %1 */
1231 #line 1238 "rl78-decode.opc"
1232 int ra AU
= (op
[0] >> 1) & 0x03;
1235 printf ("\033[33m%s\033[0m %02x\n",
1236 "/** 0011 0ra1 xchw %0, %1 */",
1238 printf (" ra = 0x%x\n", ra
);
1240 SYNTAX("xchw %0, %1");
1241 #line 1238 "rl78-decode.opc"
1242 ID(xch
); W(); DR(AX
); SRW(ra
);
1244 /*----------------------------------------------------------------------*/
1250 /** 0011 1000 mov %e0, #%1 */
1253 printf ("\033[33m%s\033[0m %02x\n",
1254 "/** 0011 1000 mov %e0, #%1 */",
1257 SYNTAX("mov %e0, #%1");
1258 #line 737 "rl78-decode.opc"
1259 ID(mov
); DM(C
, IMMU(2)); SC(IMMU(1));
1265 /** 0011 1001 mov %e0, #%1 */
1268 printf ("\033[33m%s\033[0m %02x\n",
1269 "/** 0011 1001 mov %e0, #%1 */",
1272 SYNTAX("mov %e0, #%1");
1273 #line 731 "rl78-decode.opc"
1274 ID(mov
); DM(BC
, IMMU(2)); SC(IMMU(1));
1280 /** 0011 1010 subc %0, #%1 */
1283 printf ("\033[33m%s\033[0m %02x\n",
1284 "/** 0011 1010 subc %0, #%1 */",
1287 SYNTAX("subc %0, #%1");
1288 #line 1177 "rl78-decode.opc"
1289 ID(subc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1291 /*----------------------------------------------------------------------*/
1297 /** 0011 1011 subc %0, %1 */
1300 printf ("\033[33m%s\033[0m %02x\n",
1301 "/** 0011 1011 subc %0, %1 */",
1304 SYNTAX("subc %0, %1");
1305 #line 1174 "rl78-decode.opc"
1306 ID(subc
); DR(A
); SM(None
, SADDR
); Fzac
;
1312 /** 0011 1100 subc %0, #%1 */
1315 printf ("\033[33m%s\033[0m %02x\n",
1316 "/** 0011 1100 subc %0, #%1 */",
1319 SYNTAX("subc %0, #%1");
1320 #line 1165 "rl78-decode.opc"
1321 ID(subc
); DR(A
); SC(IMMU(1)); Fzac
;
1327 /** 0011 1101 subc %0, %e1 */
1330 printf ("\033[33m%s\033[0m %02x\n",
1331 "/** 0011 1101 subc %0, %e1 */",
1334 SYNTAX("subc %0, %e1");
1335 #line 1153 "rl78-decode.opc"
1336 ID(subc
); DR(A
); SM(HL
, 0); Fzac
;
1342 /** 0011 1110 subc %0, %e1 */
1345 printf ("\033[33m%s\033[0m %02x\n",
1346 "/** 0011 1110 subc %0, %e1 */",
1349 SYNTAX("subc %0, %e1");
1350 #line 1162 "rl78-decode.opc"
1351 ID(subc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1357 /** 0011 1111 subc %0, %e!1 */
1360 printf ("\033[33m%s\033[0m %02x\n",
1361 "/** 0011 1111 subc %0, %e!1 */",
1364 SYNTAX("subc %0, %e!1");
1365 #line 1150 "rl78-decode.opc"
1366 ID(subc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1372 /** 0100 0000 cmp %e!0, #%1 */
1375 printf ("\033[33m%s\033[0m %02x\n",
1376 "/** 0100 0000 cmp %e!0, #%1 */",
1379 SYNTAX("cmp %e!0, #%1");
1380 #line 479 "rl78-decode.opc"
1381 ID(cmp
); DM(None
, IMMU(2)); SC(IMMU(1)); Fzac
;
1387 /** 0100 0001 mov %0, #%1 */
1390 printf ("\033[33m%s\033[0m %02x\n",
1391 "/** 0100 0001 mov %0, #%1 */",
1394 SYNTAX("mov %0, #%1");
1395 #line 716 "rl78-decode.opc"
1396 ID(mov
); DR(ES
); SC(IMMU(1));
1402 /** 0100 0010 cmpw %0, %e!1 */
1405 printf ("\033[33m%s\033[0m %02x\n",
1406 "/** 0100 0010 cmpw %0, %e!1 */",
1409 SYNTAX("cmpw %0, %e!1");
1410 #line 530 "rl78-decode.opc"
1411 ID(cmp
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
1419 /** 0100 0ra1 cmpw %0, %1 */
1420 #line 539 "rl78-decode.opc"
1421 int ra AU
= (op
[0] >> 1) & 0x03;
1424 printf ("\033[33m%s\033[0m %02x\n",
1425 "/** 0100 0ra1 cmpw %0, %1 */",
1427 printf (" ra = 0x%x\n", ra
);
1429 SYNTAX("cmpw %0, %1");
1430 #line 539 "rl78-decode.opc"
1431 ID(cmp
); W(); DR(AX
); SRW(ra
); Fzac
;
1437 /** 0100 0100 cmpw %0, #%1 */
1440 printf ("\033[33m%s\033[0m %02x\n",
1441 "/** 0100 0100 cmpw %0, #%1 */",
1444 SYNTAX("cmpw %0, #%1");
1445 #line 536 "rl78-decode.opc"
1446 ID(cmp
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
1452 /** 0100 0110 cmpw %0, %1 */
1455 printf ("\033[33m%s\033[0m %02x\n",
1456 "/** 0100 0110 cmpw %0, %1 */",
1459 SYNTAX("cmpw %0, %1");
1460 #line 542 "rl78-decode.opc"
1461 ID(cmp
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
1463 /*----------------------------------------------------------------------*/
1469 /** 0100 1000 mov %e0, %1 */
1472 printf ("\033[33m%s\033[0m %02x\n",
1473 "/** 0100 1000 mov %e0, %1 */",
1476 SYNTAX("mov %e0, %1");
1477 #line 734 "rl78-decode.opc"
1478 ID(mov
); DM(BC
, IMMU(2)); SR(A
);
1484 /** 0100 1001 mov %0, %e1 */
1487 printf ("\033[33m%s\033[0m %02x\n",
1488 "/** 0100 1001 mov %0, %e1 */",
1491 SYNTAX("mov %0, %e1");
1492 #line 680 "rl78-decode.opc"
1493 ID(mov
); DR(A
); SM(BC
, IMMU(2));
1499 /** 0100 1010 cmp %0, #%1 */
1502 printf ("\033[33m%s\033[0m %02x\n",
1503 "/** 0100 1010 cmp %0, #%1 */",
1506 SYNTAX("cmp %0, #%1");
1507 #line 482 "rl78-decode.opc"
1508 ID(cmp
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1514 /** 0100 1011 cmp %0, %1 */
1517 printf ("\033[33m%s\033[0m %02x\n",
1518 "/** 0100 1011 cmp %0, %1 */",
1521 SYNTAX("cmp %0, %1");
1522 #line 509 "rl78-decode.opc"
1523 ID(cmp
); DR(A
); SM(None
, SADDR
); Fzac
;
1525 /*----------------------------------------------------------------------*/
1531 /** 0100 1100 cmp %0, #%1 */
1534 printf ("\033[33m%s\033[0m %02x\n",
1535 "/** 0100 1100 cmp %0, #%1 */",
1538 SYNTAX("cmp %0, #%1");
1539 #line 500 "rl78-decode.opc"
1540 ID(cmp
); DR(A
); SC(IMMU(1)); Fzac
;
1546 /** 0100 1101 cmp %0, %e1 */
1549 printf ("\033[33m%s\033[0m %02x\n",
1550 "/** 0100 1101 cmp %0, %e1 */",
1553 SYNTAX("cmp %0, %e1");
1554 #line 488 "rl78-decode.opc"
1555 ID(cmp
); DR(A
); SM(HL
, 0); Fzac
;
1561 /** 0100 1110 cmp %0, %e1 */
1564 printf ("\033[33m%s\033[0m %02x\n",
1565 "/** 0100 1110 cmp %0, %e1 */",
1568 SYNTAX("cmp %0, %e1");
1569 #line 497 "rl78-decode.opc"
1570 ID(cmp
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1576 /** 0100 1111 cmp %0, %e!1 */
1579 printf ("\033[33m%s\033[0m %02x\n",
1580 "/** 0100 1111 cmp %0, %e!1 */",
1583 SYNTAX("cmp %0, %e!1");
1584 #line 485 "rl78-decode.opc"
1585 ID(cmp
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1598 /** 0101 0reg mov %0, #%1 */
1599 #line 668 "rl78-decode.opc"
1600 int reg AU
= op
[0] & 0x07;
1603 printf ("\033[33m%s\033[0m %02x\n",
1604 "/** 0101 0reg mov %0, #%1 */",
1606 printf (" reg = 0x%x\n", reg
);
1608 SYNTAX("mov %0, #%1");
1609 #line 668 "rl78-decode.opc"
1610 ID(mov
); DRB(reg
); SC(IMMU(1));
1616 /** 0101 1000 movw %e0, %1 */
1619 printf ("\033[33m%s\033[0m %02x\n",
1620 "/** 0101 1000 movw %e0, %1 */",
1623 SYNTAX("movw %e0, %1");
1624 #line 870 "rl78-decode.opc"
1625 ID(mov
); W(); DM(B
, IMMU(2)); SR(AX
);
1631 /** 0101 1001 movw %0, %e1 */
1634 printf ("\033[33m%s\033[0m %02x\n",
1635 "/** 0101 1001 movw %0, %e1 */",
1638 SYNTAX("movw %0, %e1");
1639 #line 861 "rl78-decode.opc"
1640 ID(mov
); W(); DR(AX
); SM(B
, IMMU(2));
1646 /** 0101 1010 and %0, #%1 */
1649 printf ("\033[33m%s\033[0m %02x\n",
1650 "/** 0101 1010 and %0, #%1 */",
1653 SYNTAX("and %0, #%1");
1654 #line 311 "rl78-decode.opc"
1655 ID(and); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
1657 /*----------------------------------------------------------------------*/
1663 /** 0101 1011 and %0, %1 */
1666 printf ("\033[33m%s\033[0m %02x\n",
1667 "/** 0101 1011 and %0, %1 */",
1670 SYNTAX("and %0, %1");
1671 #line 308 "rl78-decode.opc"
1672 ID(and); DR(A
); SM(None
, SADDR
); Fz
;
1678 /** 0101 1100 and %0, #%1 */
1681 printf ("\033[33m%s\033[0m %02x\n",
1682 "/** 0101 1100 and %0, #%1 */",
1685 SYNTAX("and %0, #%1");
1686 #line 299 "rl78-decode.opc"
1687 ID(and); DR(A
); SC(IMMU(1)); Fz
;
1693 /** 0101 1101 and %0, %e1 */
1696 printf ("\033[33m%s\033[0m %02x\n",
1697 "/** 0101 1101 and %0, %e1 */",
1700 SYNTAX("and %0, %e1");
1701 #line 287 "rl78-decode.opc"
1702 ID(and); DR(A
); SM(HL
, 0); Fz
;
1708 /** 0101 1110 and %0, %e1 */
1711 printf ("\033[33m%s\033[0m %02x\n",
1712 "/** 0101 1110 and %0, %e1 */",
1715 SYNTAX("and %0, %e1");
1716 #line 293 "rl78-decode.opc"
1717 ID(and); DR(A
); SM(HL
, IMMU(1)); Fz
;
1723 /** 0101 1111 and %0, %e!1 */
1726 printf ("\033[33m%s\033[0m %02x\n",
1727 "/** 0101 1111 and %0, %e!1 */",
1730 SYNTAX("and %0, %e!1");
1731 #line 284 "rl78-decode.opc"
1732 ID(and); DR(A
); SM(None
, IMMU(2)); Fz
;
1744 /** 0110 0rba mov %0, %1 */
1745 #line 671 "rl78-decode.opc"
1746 int rba AU
= op
[0] & 0x07;
1749 printf ("\033[33m%s\033[0m %02x\n",
1750 "/** 0110 0rba mov %0, %1 */",
1752 printf (" rba = 0x%x\n", rba
);
1754 SYNTAX("mov %0, %1");
1755 #line 671 "rl78-decode.opc"
1756 ID(mov
); DR(A
); SRB(rba
);
1762 switch (op
[1] & 0xff)
1773 /** 0110 0001 0000 0reg add %0, %1 */
1774 #line 224 "rl78-decode.opc"
1775 int reg AU
= op
[1] & 0x07;
1778 printf ("\033[33m%s\033[0m %02x %02x\n",
1779 "/** 0110 0001 0000 0reg add %0, %1 */",
1781 printf (" reg = 0x%x\n", reg
);
1783 SYNTAX("add %0, %1");
1784 #line 224 "rl78-decode.opc"
1785 ID(add
); DRB(reg
); SR(A
); Fzac
;
1797 /** 0110 0001 0000 1rba add %0, %1 */
1798 #line 218 "rl78-decode.opc"
1799 int rba AU
= op
[1] & 0x07;
1802 printf ("\033[33m%s\033[0m %02x %02x\n",
1803 "/** 0110 0001 0000 1rba add %0, %1 */",
1805 printf (" rba = 0x%x\n", rba
);
1807 SYNTAX("add %0, %1");
1808 #line 218 "rl78-decode.opc"
1809 ID(add
); DR(A
); SRB(rba
); Fzac
;
1815 /** 0110 0001 0000 1001 addw %0, %e1 */
1818 printf ("\033[33m%s\033[0m %02x %02x\n",
1819 "/** 0110 0001 0000 1001 addw %0, %e1 */",
1822 SYNTAX("addw %0, %e1");
1823 #line 267 "rl78-decode.opc"
1824 ID(add
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1837 /** 0110 0001 0001 0reg addc %0, %1 */
1838 #line 253 "rl78-decode.opc"
1839 int reg AU
= op
[1] & 0x07;
1842 printf ("\033[33m%s\033[0m %02x %02x\n",
1843 "/** 0110 0001 0001 0reg addc %0, %1 */",
1845 printf (" reg = 0x%x\n", reg
);
1847 SYNTAX("addc %0, %1");
1848 #line 253 "rl78-decode.opc"
1849 ID(addc
); DRB(reg
); SR(A
); Fzac
;
1861 /** 0110 0001 0001 1rba addc %0, %1 */
1862 #line 250 "rl78-decode.opc"
1863 int rba AU
= op
[1] & 0x07;
1866 printf ("\033[33m%s\033[0m %02x %02x\n",
1867 "/** 0110 0001 0001 1rba addc %0, %1 */",
1869 printf (" rba = 0x%x\n", rba
);
1871 SYNTAX("addc %0, %1");
1872 #line 250 "rl78-decode.opc"
1873 ID(addc
); DR(A
); SRB(rba
); Fzac
;
1886 /** 0110 0001 0010 0reg sub %0, %1 */
1887 #line 1142 "rl78-decode.opc"
1888 int reg AU
= op
[1] & 0x07;
1891 printf ("\033[33m%s\033[0m %02x %02x\n",
1892 "/** 0110 0001 0010 0reg sub %0, %1 */",
1894 printf (" reg = 0x%x\n", reg
);
1896 SYNTAX("sub %0, %1");
1897 #line 1142 "rl78-decode.opc"
1898 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1910 /** 0110 0001 0010 1rba sub %0, %1 */
1911 #line 1136 "rl78-decode.opc"
1912 int rba AU
= op
[1] & 0x07;
1915 printf ("\033[33m%s\033[0m %02x %02x\n",
1916 "/** 0110 0001 0010 1rba sub %0, %1 */",
1918 printf (" rba = 0x%x\n", rba
);
1920 SYNTAX("sub %0, %1");
1921 #line 1136 "rl78-decode.opc"
1922 ID(sub
); DR(A
); SRB(rba
); Fzac
;
1928 /** 0110 0001 0010 1001 subw %0, %e1 */
1931 printf ("\033[33m%s\033[0m %02x %02x\n",
1932 "/** 0110 0001 0010 1001 subw %0, %e1 */",
1935 SYNTAX("subw %0, %e1");
1936 #line 1185 "rl78-decode.opc"
1937 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1950 /** 0110 0001 0011 0reg subc %0, %1 */
1951 #line 1171 "rl78-decode.opc"
1952 int reg AU
= op
[1] & 0x07;
1955 printf ("\033[33m%s\033[0m %02x %02x\n",
1956 "/** 0110 0001 0011 0reg subc %0, %1 */",
1958 printf (" reg = 0x%x\n", reg
);
1960 SYNTAX("subc %0, %1");
1961 #line 1171 "rl78-decode.opc"
1962 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1974 /** 0110 0001 0011 1rba subc %0, %1 */
1975 #line 1168 "rl78-decode.opc"
1976 int rba AU
= op
[1] & 0x07;
1979 printf ("\033[33m%s\033[0m %02x %02x\n",
1980 "/** 0110 0001 0011 1rba subc %0, %1 */",
1982 printf (" rba = 0x%x\n", rba
);
1984 SYNTAX("subc %0, %1");
1985 #line 1168 "rl78-decode.opc"
1986 ID(subc
); DR(A
); SRB(rba
); Fzac
;
1999 /** 0110 0001 0100 0reg cmp %0, %1 */
2000 #line 506 "rl78-decode.opc"
2001 int reg AU
= op
[1] & 0x07;
2004 printf ("\033[33m%s\033[0m %02x %02x\n",
2005 "/** 0110 0001 0100 0reg cmp %0, %1 */",
2007 printf (" reg = 0x%x\n", reg
);
2009 SYNTAX("cmp %0, %1");
2010 #line 506 "rl78-decode.opc"
2011 ID(cmp
); DRB(reg
); SR(A
); Fzac
;
2023 /** 0110 0001 0100 1rba cmp %0, %1 */
2024 #line 503 "rl78-decode.opc"
2025 int rba AU
= op
[1] & 0x07;
2028 printf ("\033[33m%s\033[0m %02x %02x\n",
2029 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2031 printf (" rba = 0x%x\n", rba
);
2033 SYNTAX("cmp %0, %1");
2034 #line 503 "rl78-decode.opc"
2035 ID(cmp
); DR(A
); SRB(rba
); Fzac
;
2041 /** 0110 0001 0100 1001 cmpw %0, %e1 */
2044 printf ("\033[33m%s\033[0m %02x %02x\n",
2045 "/** 0110 0001 0100 1001 cmpw %0, %e1 */",
2048 SYNTAX("cmpw %0, %e1");
2049 #line 533 "rl78-decode.opc"
2050 ID(cmp
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
2063 /** 0110 0001 0101 0reg and %0, %1 */
2064 #line 305 "rl78-decode.opc"
2065 int reg AU
= op
[1] & 0x07;
2068 printf ("\033[33m%s\033[0m %02x %02x\n",
2069 "/** 0110 0001 0101 0reg and %0, %1 */",
2071 printf (" reg = 0x%x\n", reg
);
2073 SYNTAX("and %0, %1");
2074 #line 305 "rl78-decode.opc"
2075 ID(and); DRB(reg
); SR(A
); Fz
;
2087 /** 0110 0001 0101 1rba and %0, %1 */
2088 #line 302 "rl78-decode.opc"
2089 int rba AU
= op
[1] & 0x07;
2092 printf ("\033[33m%s\033[0m %02x %02x\n",
2093 "/** 0110 0001 0101 1rba and %0, %1 */",
2095 printf (" rba = 0x%x\n", rba
);
2097 SYNTAX("and %0, %1");
2098 #line 302 "rl78-decode.opc"
2099 ID(and); DR(A
); SRB(rba
); Fz
;
2105 /** 0110 0001 0101 1001 inc %e0 */
2108 printf ("\033[33m%s\033[0m %02x %02x\n",
2109 "/** 0110 0001 0101 1001 inc %e0 */",
2113 #line 583 "rl78-decode.opc"
2114 ID(add
); DM(HL
, IMMU(1)); SC(1); Fza
;
2127 /** 0110 0001 0110 0reg or %0, %1 */
2128 #line 960 "rl78-decode.opc"
2129 int reg AU
= op
[1] & 0x07;
2132 printf ("\033[33m%s\033[0m %02x %02x\n",
2133 "/** 0110 0001 0110 0reg or %0, %1 */",
2135 printf (" reg = 0x%x\n", reg
);
2137 SYNTAX("or %0, %1");
2138 #line 960 "rl78-decode.opc"
2139 ID(or); DRB(reg
); SR(A
); Fz
;
2151 /** 0110 0001 0110 1rba or %0, %1 */
2152 #line 957 "rl78-decode.opc"
2153 int rba AU
= op
[1] & 0x07;
2156 printf ("\033[33m%s\033[0m %02x %02x\n",
2157 "/** 0110 0001 0110 1rba or %0, %1 */",
2159 printf (" rba = 0x%x\n", rba
);
2161 SYNTAX("or %0, %1");
2162 #line 957 "rl78-decode.opc"
2163 ID(or); DR(A
); SRB(rba
); Fz
;
2169 /** 0110 0001 0110 1001 dec %e0 */
2172 printf ("\033[33m%s\033[0m %02x %02x\n",
2173 "/** 0110 0001 0110 1001 dec %e0 */",
2177 #line 550 "rl78-decode.opc"
2178 ID(sub
); DM(HL
, IMMU(1)); SC(1); Fza
;
2191 /** 0110 0001 0111 0reg xor %0, %1 */
2192 #line 1264 "rl78-decode.opc"
2193 int reg AU
= op
[1] & 0x07;
2196 printf ("\033[33m%s\033[0m %02x %02x\n",
2197 "/** 0110 0001 0111 0reg xor %0, %1 */",
2199 printf (" reg = 0x%x\n", reg
);
2201 SYNTAX("xor %0, %1");
2202 #line 1264 "rl78-decode.opc"
2203 ID(xor); DRB(reg
); SR(A
); Fz
;
2215 /** 0110 0001 0111 1rba xor %0, %1 */
2216 #line 1261 "rl78-decode.opc"
2217 int rba AU
= op
[1] & 0x07;
2220 printf ("\033[33m%s\033[0m %02x %02x\n",
2221 "/** 0110 0001 0111 1rba xor %0, %1 */",
2223 printf (" rba = 0x%x\n", rba
);
2225 SYNTAX("xor %0, %1");
2226 #line 1261 "rl78-decode.opc"
2227 ID(xor); DR(A
); SRB(rba
); Fz
;
2233 /** 0110 0001 0111 1001 incw %e0 */
2236 printf ("\033[33m%s\033[0m %02x %02x\n",
2237 "/** 0110 0001 0111 1001 incw %e0 */",
2241 #line 597 "rl78-decode.opc"
2242 ID(add
); W(); DM(HL
, IMMU(1)); SC(1);
2249 /** 0110 0001 1000 000 add %0, %e1 */
2252 printf ("\033[33m%s\033[0m %02x %02x\n",
2253 "/** 0110 0001 1000 000 add %0, %e1 */",
2256 SYNTAX("add %0, %e1");
2257 #line 206 "rl78-decode.opc"
2258 ID(add
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2264 /** 0110 0001 1000 0010 add %0, %e1 */
2267 printf ("\033[33m%s\033[0m %02x %02x\n",
2268 "/** 0110 0001 1000 0010 add %0, %e1 */",
2271 SYNTAX("add %0, %e1");
2272 #line 212 "rl78-decode.opc"
2273 ID(add
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2310 /** 0110 0001 1nnn 01mm callt [%x0] */
2311 #line 432 "rl78-decode.opc"
2312 int nnn AU
= (op
[1] >> 4) & 0x07;
2313 #line 432 "rl78-decode.opc"
2314 int mm AU
= op
[1] & 0x03;
2317 printf ("\033[33m%s\033[0m %02x %02x\n",
2318 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2320 printf (" nnn = 0x%x,", nnn
);
2321 printf (" mm = 0x%x\n", mm
);
2323 SYNTAX("callt [%x0]");
2324 #line 432 "rl78-decode.opc"
2325 ID(call
); DM(None
, 0x80 + mm
*16 + nnn
*2);
2327 /*----------------------------------------------------------------------*/
2339 /** 0110 0001 1000 1reg xch %0, %1 */
2340 #line 1223 "rl78-decode.opc"
2341 int reg AU
= op
[1] & 0x07;
2344 printf ("\033[33m%s\033[0m %02x %02x\n",
2345 "/** 0110 0001 1000 1reg xch %0, %1 */",
2347 printf (" reg = 0x%x\n", reg
);
2349 SYNTAX("xch %0, %1");
2350 #line 1223 "rl78-decode.opc"
2351 /* Note: DECW uses reg == X, so this must follow DECW */
2352 ID(xch
); DR(A
); SRB(reg
);
2358 /** 0110 0001 1000 1001 decw %e0 */
2361 printf ("\033[33m%s\033[0m %02x %02x\n",
2362 "/** 0110 0001 1000 1001 decw %e0 */",
2366 #line 564 "rl78-decode.opc"
2367 ID(sub
); W(); DM(HL
, IMMU(1)); SC(1);
2373 /** 0110 0001 1001 0000 addc %0, %e1 */
2376 printf ("\033[33m%s\033[0m %02x %02x\n",
2377 "/** 0110 0001 1001 0000 addc %0, %e1 */",
2380 SYNTAX("addc %0, %e1");
2381 #line 238 "rl78-decode.opc"
2382 ID(addc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2388 /** 0110 0001 1001 0010 addc %0, %e1 */
2391 printf ("\033[33m%s\033[0m %02x %02x\n",
2392 "/** 0110 0001 1001 0010 addc %0, %e1 */",
2395 SYNTAX("addc %0, %e1");
2396 #line 241 "rl78-decode.opc"
2397 ID(addc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2404 /** 0110 0001 1010 000 sub %0, %e1 */
2407 printf ("\033[33m%s\033[0m %02x %02x\n",
2408 "/** 0110 0001 1010 000 sub %0, %e1 */",
2411 SYNTAX("sub %0, %e1");
2412 #line 1124 "rl78-decode.opc"
2413 ID(sub
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2419 /** 0110 0001 1010 0010 sub %0, %e1 */
2422 printf ("\033[33m%s\033[0m %02x %02x\n",
2423 "/** 0110 0001 1010 0010 sub %0, %e1 */",
2426 SYNTAX("sub %0, %e1");
2427 #line 1130 "rl78-decode.opc"
2428 ID(sub
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2434 /** 0110 0001 1010 1000 xch %0, %1 */
2437 printf ("\033[33m%s\033[0m %02x %02x\n",
2438 "/** 0110 0001 1010 1000 xch %0, %1 */",
2441 SYNTAX("xch %0, %1");
2442 #line 1227 "rl78-decode.opc"
2443 ID(xch
); DR(A
); SM(None
, SADDR
);
2449 /** 0110 0001 1010 1001 xch %0, %e1 */
2452 printf ("\033[33m%s\033[0m %02x %02x\n",
2453 "/** 0110 0001 1010 1001 xch %0, %e1 */",
2456 SYNTAX("xch %0, %e1");
2457 #line 1220 "rl78-decode.opc"
2458 ID(xch
); DR(A
); SM2(HL
, C
, 0);
2464 /** 0110 0001 1010 1010 xch %0, %e!1 */
2467 printf ("\033[33m%s\033[0m %02x %02x\n",
2468 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
2471 SYNTAX("xch %0, %e!1");
2472 #line 1202 "rl78-decode.opc"
2473 ID(xch
); DR(A
); SM(None
, IMMU(2));
2479 /** 0110 0001 1010 1011 xch %0, %1 */
2482 printf ("\033[33m%s\033[0m %02x %02x\n",
2483 "/** 0110 0001 1010 1011 xch %0, %1 */",
2486 SYNTAX("xch %0, %1");
2487 #line 1230 "rl78-decode.opc"
2488 ID(xch
); DR(A
); SM(None
, SFR
);
2494 /** 0110 0001 1010 1100 xch %0, %e1 */
2497 printf ("\033[33m%s\033[0m %02x %02x\n",
2498 "/** 0110 0001 1010 1100 xch %0, %e1 */",
2501 SYNTAX("xch %0, %e1");
2502 #line 1211 "rl78-decode.opc"
2503 ID(xch
); DR(A
); SM(HL
, 0);
2509 /** 0110 0001 1010 1101 xch %0, %e1 */
2512 printf ("\033[33m%s\033[0m %02x %02x\n",
2513 "/** 0110 0001 1010 1101 xch %0, %e1 */",
2516 SYNTAX("xch %0, %e1");
2517 #line 1217 "rl78-decode.opc"
2518 ID(xch
); DR(A
); SM(HL
, IMMU(1));
2524 /** 0110 0001 1010 1110 xch %0, %e1 */
2527 printf ("\033[33m%s\033[0m %02x %02x\n",
2528 "/** 0110 0001 1010 1110 xch %0, %e1 */",
2531 SYNTAX("xch %0, %e1");
2532 #line 1205 "rl78-decode.opc"
2533 ID(xch
); DR(A
); SM(DE
, 0);
2539 /** 0110 0001 1010 1111 xch %0, %e1 */
2542 printf ("\033[33m%s\033[0m %02x %02x\n",
2543 "/** 0110 0001 1010 1111 xch %0, %e1 */",
2546 SYNTAX("xch %0, %e1");
2547 #line 1208 "rl78-decode.opc"
2548 ID(xch
); DR(A
); SM(DE
, IMMU(1));
2554 /** 0110 0001 1011 0000 subc %0, %e1 */
2557 printf ("\033[33m%s\033[0m %02x %02x\n",
2558 "/** 0110 0001 1011 0000 subc %0, %e1 */",
2561 SYNTAX("subc %0, %e1");
2562 #line 1156 "rl78-decode.opc"
2563 ID(subc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2569 /** 0110 0001 1011 0010 subc %0, %e1 */
2572 printf ("\033[33m%s\033[0m %02x %02x\n",
2573 "/** 0110 0001 1011 0010 subc %0, %e1 */",
2576 SYNTAX("subc %0, %e1");
2577 #line 1159 "rl78-decode.opc"
2578 ID(subc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2584 /** 0110 0001 1011 1000 mov %0, %1 */
2587 printf ("\033[33m%s\033[0m %02x %02x\n",
2588 "/** 0110 0001 1011 1000 mov %0, %1 */",
2591 SYNTAX("mov %0, %1");
2592 #line 722 "rl78-decode.opc"
2593 ID(mov
); DR(ES
); SM(None
, SADDR
);
2599 /** 0110 0001 1011 1001 xch %0, %e1 */
2602 printf ("\033[33m%s\033[0m %02x %02x\n",
2603 "/** 0110 0001 1011 1001 xch %0, %e1 */",
2606 SYNTAX("xch %0, %e1");
2607 #line 1214 "rl78-decode.opc"
2608 ID(xch
); DR(A
); SM2(HL
, B
, 0);
2614 /** 0110 0001 1100 0000 cmp %0, %e1 */
2617 printf ("\033[33m%s\033[0m %02x %02x\n",
2618 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
2621 SYNTAX("cmp %0, %e1");
2622 #line 491 "rl78-decode.opc"
2623 ID(cmp
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2629 /** 0110 0001 1100 0010 cmp %0, %e1 */
2632 printf ("\033[33m%s\033[0m %02x %02x\n",
2633 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
2636 SYNTAX("cmp %0, %e1");
2637 #line 494 "rl78-decode.opc"
2638 ID(cmp
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2644 /** 0110 0001 1100 0011 bh $%a0 */
2647 printf ("\033[33m%s\033[0m %02x %02x\n",
2648 "/** 0110 0001 1100 0011 bh $%a0 */",
2652 #line 339 "rl78-decode.opc"
2653 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(H
);
2659 /** 0110 0001 1100 1000 sk%c1 */
2662 printf ("\033[33m%s\033[0m %02x %02x\n",
2663 "/** 0110 0001 1100 1000 sk%c1 */",
2667 #line 1093 "rl78-decode.opc"
2674 /** 0110 0001 1100 1001 mov %0, %e1 */
2677 printf ("\033[33m%s\033[0m %02x %02x\n",
2678 "/** 0110 0001 1100 1001 mov %0, %e1 */",
2681 SYNTAX("mov %0, %e1");
2682 #line 659 "rl78-decode.opc"
2683 ID(mov
); DR(A
); SM2(HL
, B
, 0);
2692 /** 0110 0001 11rg 1010 call %0 */
2693 #line 429 "rl78-decode.opc"
2694 int rg AU
= (op
[1] >> 4) & 0x03;
2697 printf ("\033[33m%s\033[0m %02x %02x\n",
2698 "/** 0110 0001 11rg 1010 call %0 */",
2700 printf (" rg = 0x%x\n", rg
);
2703 #line 429 "rl78-decode.opc"
2710 /** 0110 0001 1100 1011 br ax */
2713 printf ("\033[33m%s\033[0m %02x %02x\n",
2714 "/** 0110 0001 1100 1011 br ax */",
2718 #line 379 "rl78-decode.opc"
2721 /*----------------------------------------------------------------------*/
2727 /** 0110 0001 1100 1100 brk */
2730 printf ("\033[33m%s\033[0m %02x %02x\n",
2731 "/** 0110 0001 1100 1100 brk */",
2735 #line 387 "rl78-decode.opc"
2738 /*----------------------------------------------------------------------*/
2744 /** 0110 0001 1100 1101 pop %s0 */
2747 printf ("\033[33m%s\033[0m %02x %02x\n",
2748 "/** 0110 0001 1100 1101 pop %s0 */",
2752 #line 988 "rl78-decode.opc"
2753 ID(mov
); W(); DR(PSW
); SPOP();
2755 /*----------------------------------------------------------------------*/
2761 /** 0110 0001 1100 1110 movs %e0, %1 */
2764 printf ("\033[33m%s\033[0m %02x %02x\n",
2765 "/** 0110 0001 1100 1110 movs %e0, %1 */",
2768 SYNTAX("movs %e0, %1");
2769 #line 810 "rl78-decode.opc"
2770 ID(mov
); DM(HL
, IMMU(1)); SR(X
); Fzc
;
2772 /*----------------------------------------------------------------------*/
2781 /** 0110 0001 11rb 1111 sel rb%1 */
2782 #line 1040 "rl78-decode.opc"
2783 int rb AU
= (op
[1] >> 4) & 0x03;
2786 printf ("\033[33m%s\033[0m %02x %02x\n",
2787 "/** 0110 0001 11rb 1111 sel rb%1 */",
2789 printf (" rb = 0x%x\n", rb
);
2792 #line 1040 "rl78-decode.opc"
2795 /*----------------------------------------------------------------------*/
2801 /** 0110 0001 1101 0000 and %0, %e1 */
2804 printf ("\033[33m%s\033[0m %02x %02x\n",
2805 "/** 0110 0001 1101 0000 and %0, %e1 */",
2808 SYNTAX("and %0, %e1");
2809 #line 290 "rl78-decode.opc"
2810 ID(and); DR(A
); SM2(HL
, B
, 0); Fz
;
2816 /** 0110 0001 1101 0010 and %0, %e1 */
2819 printf ("\033[33m%s\033[0m %02x %02x\n",
2820 "/** 0110 0001 1101 0010 and %0, %e1 */",
2823 SYNTAX("and %0, %e1");
2824 #line 296 "rl78-decode.opc"
2825 ID(and); DR(A
); SM2(HL
, C
, 0); Fz
;
2831 /** 0110 0001 1101 0011 bnh $%a0 */
2834 printf ("\033[33m%s\033[0m %02x %02x\n",
2835 "/** 0110 0001 1101 0011 bnh $%a0 */",
2839 #line 342 "rl78-decode.opc"
2840 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(NH
);
2846 /** 0110 0001 1101 1000 sk%c1 */
2849 printf ("\033[33m%s\033[0m %02x %02x\n",
2850 "/** 0110 0001 1101 1000 sk%c1 */",
2854 #line 1099 "rl78-decode.opc"
2861 /** 0110 0001 1101 1001 mov %e0, %1 */
2864 printf ("\033[33m%s\033[0m %02x %02x\n",
2865 "/** 0110 0001 1101 1001 mov %e0, %1 */",
2868 SYNTAX("mov %e0, %1");
2869 #line 626 "rl78-decode.opc"
2870 ID(mov
); DM2(HL
, B
, 0); SR(A
);
2876 /** 0110 0001 1101 1011 ror %0, %1 */
2879 printf ("\033[33m%s\033[0m %02x %02x\n",
2880 "/** 0110 0001 1101 1011 ror %0, %1 */",
2883 SYNTAX("ror %0, %1");
2884 #line 1021 "rl78-decode.opc"
2885 ID(ror
); DR(A
); SC(1);
2891 /** 0110 0001 1101 1100 rolc %0, %1 */
2894 printf ("\033[33m%s\033[0m %02x %02x\n",
2895 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2898 SYNTAX("rolc %0, %1");
2899 #line 1015 "rl78-decode.opc"
2900 ID(rolc
); DR(A
); SC(1);
2906 /** 0110 0001 1101 1101 push %s1 */
2909 printf ("\033[33m%s\033[0m %02x %02x\n",
2910 "/** 0110 0001 1101 1101 push %s1 */",
2914 #line 996 "rl78-decode.opc"
2915 ID(mov
); W(); DPUSH(); SR(PSW
);
2917 /*----------------------------------------------------------------------*/
2923 /** 0110 0001 1101 1110 cmps %0, %e1 */
2926 printf ("\033[33m%s\033[0m %02x %02x\n",
2927 "/** 0110 0001 1101 1110 cmps %0, %e1 */",
2930 SYNTAX("cmps %0, %e1");
2931 #line 525 "rl78-decode.opc"
2932 ID(cmp
); DR(X
); SM(HL
, IMMU(1)); Fzac
;
2934 /*----------------------------------------------------------------------*/
2940 /** 0110 0001 1110 0000 or %0, %e1 */
2943 printf ("\033[33m%s\033[0m %02x %02x\n",
2944 "/** 0110 0001 1110 0000 or %0, %e1 */",
2947 SYNTAX("or %0, %e1");
2948 #line 945 "rl78-decode.opc"
2949 ID(or); DR(A
); SM2(HL
, B
, 0); Fz
;
2955 /** 0110 0001 1110 0010 or %0, %e1 */
2958 printf ("\033[33m%s\033[0m %02x %02x\n",
2959 "/** 0110 0001 1110 0010 or %0, %e1 */",
2962 SYNTAX("or %0, %e1");
2963 #line 951 "rl78-decode.opc"
2964 ID(or); DR(A
); SM2(HL
, C
, 0); Fz
;
2970 /** 0110 0001 1110 0011 sk%c1 */
2973 printf ("\033[33m%s\033[0m %02x %02x\n",
2974 "/** 0110 0001 1110 0011 sk%c1 */",
2978 #line 1096 "rl78-decode.opc"
2985 /** 0110 0001 1110 1000 sk%c1 */
2988 printf ("\033[33m%s\033[0m %02x %02x\n",
2989 "/** 0110 0001 1110 1000 sk%c1 */",
2993 #line 1108 "rl78-decode.opc"
2996 /*----------------------------------------------------------------------*/
3002 /** 0110 0001 1110 1001 mov %0, %e1 */
3005 printf ("\033[33m%s\033[0m %02x %02x\n",
3006 "/** 0110 0001 1110 1001 mov %0, %e1 */",
3009 SYNTAX("mov %0, %e1");
3010 #line 662 "rl78-decode.opc"
3011 ID(mov
); DR(A
); SM2(HL
, C
, 0);
3017 /** 0110 0001 1110 1011 rol %0, %1 */
3020 printf ("\033[33m%s\033[0m %02x %02x\n",
3021 "/** 0110 0001 1110 1011 rol %0, %1 */",
3024 SYNTAX("rol %0, %1");
3025 #line 1012 "rl78-decode.opc"
3026 ID(rol
); DR(A
); SC(1);
3032 /** 0110 0001 1110 1100 retb */
3035 printf ("\033[33m%s\033[0m %02x %02x\n",
3036 "/** 0110 0001 1110 1100 retb */",
3040 #line 1007 "rl78-decode.opc"
3043 /*----------------------------------------------------------------------*/
3049 /** 0110 0001 1110 1101 halt */
3052 printf ("\033[33m%s\033[0m %02x %02x\n",
3053 "/** 0110 0001 1110 1101 halt */",
3057 #line 575 "rl78-decode.opc"
3060 /*----------------------------------------------------------------------*/
3067 /** 0110 0001 111r 1110 rolwc %0, %1 */
3068 #line 1018 "rl78-decode.opc"
3069 int r AU
= (op
[1] >> 4) & 0x01;
3072 printf ("\033[33m%s\033[0m %02x %02x\n",
3073 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3075 printf (" r = 0x%x\n", r
);
3077 SYNTAX("rolwc %0, %1");
3078 #line 1018 "rl78-decode.opc"
3079 ID(rolc
); W(); DRW(r
); SC(1);
3085 /** 0110 0001 1111 0000 xor %0, %e1 */
3088 printf ("\033[33m%s\033[0m %02x %02x\n",
3089 "/** 0110 0001 1111 0000 xor %0, %e1 */",
3092 SYNTAX("xor %0, %e1");
3093 #line 1249 "rl78-decode.opc"
3094 ID(xor); DR(A
); SM2(HL
, B
, 0); Fz
;
3100 /** 0110 0001 1111 0010 xor %0, %e1 */
3103 printf ("\033[33m%s\033[0m %02x %02x\n",
3104 "/** 0110 0001 1111 0010 xor %0, %e1 */",
3107 SYNTAX("xor %0, %e1");
3108 #line 1255 "rl78-decode.opc"
3109 ID(xor); DR(A
); SM2(HL
, C
, 0); Fz
;
3115 /** 0110 0001 1111 0011 sk%c1 */
3118 printf ("\033[33m%s\033[0m %02x %02x\n",
3119 "/** 0110 0001 1111 0011 sk%c1 */",
3123 #line 1102 "rl78-decode.opc"
3130 /** 0110 0001 1111 1000 sk%c1 */
3133 printf ("\033[33m%s\033[0m %02x %02x\n",
3134 "/** 0110 0001 1111 1000 sk%c1 */",
3138 #line 1105 "rl78-decode.opc"
3145 /** 0110 0001 1111 1001 mov %e0, %1 */
3148 printf ("\033[33m%s\033[0m %02x %02x\n",
3149 "/** 0110 0001 1111 1001 mov %e0, %1 */",
3152 SYNTAX("mov %e0, %1");
3153 #line 635 "rl78-decode.opc"
3154 ID(mov
); DM2(HL
, C
, 0); SR(A
);
3160 /** 0110 0001 1111 1011 rorc %0, %1 */
3163 printf ("\033[33m%s\033[0m %02x %02x\n",
3164 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3167 SYNTAX("rorc %0, %1");
3168 #line 1024 "rl78-decode.opc"
3169 ID(rorc
); DR(A
); SC(1);
3171 /*----------------------------------------------------------------------*/
3173 /* Note that the branch insns need to be listed before the shift
3174 ones, as "shift count of zero" means "branch insn" */
3180 /** 0110 0001 1111 1100 reti */
3183 printf ("\033[33m%s\033[0m %02x %02x\n",
3184 "/** 0110 0001 1111 1100 reti */",
3188 #line 1004 "rl78-decode.opc"
3195 /** 0110 0001 1111 1101 stop */
3198 printf ("\033[33m%s\033[0m %02x %02x\n",
3199 "/** 0110 0001 1111 1101 stop */",
3203 #line 1113 "rl78-decode.opc"
3206 /*----------------------------------------------------------------------*/
3210 default: UNSUPPORTED(); break;
3215 /** 0110 1000 movw %e0, %1 */
3218 printf ("\033[33m%s\033[0m %02x\n",
3219 "/** 0110 1000 movw %e0, %1 */",
3222 SYNTAX("movw %e0, %1");
3223 #line 873 "rl78-decode.opc"
3224 ID(mov
); W(); DM(C
, IMMU(2)); SR(AX
);
3230 /** 0110 1001 movw %0, %e1 */
3233 printf ("\033[33m%s\033[0m %02x\n",
3234 "/** 0110 1001 movw %0, %e1 */",
3237 SYNTAX("movw %0, %e1");
3238 #line 864 "rl78-decode.opc"
3239 ID(mov
); W(); DR(AX
); SM(C
, IMMU(2));
3245 /** 0110 1010 or %0, #%1 */
3248 printf ("\033[33m%s\033[0m %02x\n",
3249 "/** 0110 1010 or %0, #%1 */",
3252 SYNTAX("or %0, #%1");
3253 #line 966 "rl78-decode.opc"
3254 ID(or); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
3256 /*----------------------------------------------------------------------*/
3262 /** 0110 1011 or %0, %1 */
3265 printf ("\033[33m%s\033[0m %02x\n",
3266 "/** 0110 1011 or %0, %1 */",
3269 SYNTAX("or %0, %1");
3270 #line 963 "rl78-decode.opc"
3271 ID(or); DR(A
); SM(None
, SADDR
); Fz
;
3277 /** 0110 1100 or %0, #%1 */
3280 printf ("\033[33m%s\033[0m %02x\n",
3281 "/** 0110 1100 or %0, #%1 */",
3284 SYNTAX("or %0, #%1");
3285 #line 954 "rl78-decode.opc"
3286 ID(or); DR(A
); SC(IMMU(1)); Fz
;
3292 /** 0110 1101 or %0, %e1 */
3295 printf ("\033[33m%s\033[0m %02x\n",
3296 "/** 0110 1101 or %0, %e1 */",
3299 SYNTAX("or %0, %e1");
3300 #line 942 "rl78-decode.opc"
3301 ID(or); DR(A
); SM(HL
, 0); Fz
;
3307 /** 0110 1110 or %0, %e1 */
3310 printf ("\033[33m%s\033[0m %02x\n",
3311 "/** 0110 1110 or %0, %e1 */",
3314 SYNTAX("or %0, %e1");
3315 #line 948 "rl78-decode.opc"
3316 ID(or); DR(A
); SM(HL
, IMMU(1)); Fz
;
3322 /** 0110 1111 or %0, %e!1 */
3325 printf ("\033[33m%s\033[0m %02x\n",
3326 "/** 0110 1111 or %0, %e!1 */",
3329 SYNTAX("or %0, %e!1");
3330 #line 939 "rl78-decode.opc"
3331 ID(or); DR(A
); SM(None
, IMMU(2)); Fz
;
3343 /** 0111 0rba mov %0, %1 */
3344 #line 695 "rl78-decode.opc"
3345 int rba AU
= op
[0] & 0x07;
3348 printf ("\033[33m%s\033[0m %02x\n",
3349 "/** 0111 0rba mov %0, %1 */",
3351 printf (" rba = 0x%x\n", rba
);
3353 SYNTAX("mov %0, %1");
3354 #line 695 "rl78-decode.opc"
3355 ID(mov
); DRB(rba
); SR(A
);
3361 switch (op
[1] & 0xff)
3372 /** 0111 0001 0bit 0000 set1 %e!0 */
3373 #line 1045 "rl78-decode.opc"
3374 int bit AU
= (op
[1] >> 4) & 0x07;
3377 printf ("\033[33m%s\033[0m %02x %02x\n",
3378 "/** 0111 0001 0bit 0000 set1 %e!0 */",
3380 printf (" bit = 0x%x\n", bit
);
3382 SYNTAX("set1 %e!0");
3383 #line 1045 "rl78-decode.opc"
3384 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(1);
3397 /** 0111 0001 0bit 0001 mov1 %0, cy */
3398 #line 802 "rl78-decode.opc"
3399 int bit AU
= (op
[1] >> 4) & 0x07;
3402 printf ("\033[33m%s\033[0m %02x %02x\n",
3403 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3405 printf (" bit = 0x%x\n", bit
);
3407 SYNTAX("mov1 %0, cy");
3408 #line 802 "rl78-decode.opc"
3409 ID(mov
); DM(None
, SADDR
); DB(bit
); SCY();
3422 /** 0111 0001 0bit 0010 set1 %0 */
3423 #line 1063 "rl78-decode.opc"
3424 int bit AU
= (op
[1] >> 4) & 0x07;
3427 printf ("\033[33m%s\033[0m %02x %02x\n",
3428 "/** 0111 0001 0bit 0010 set1 %0 */",
3430 printf (" bit = 0x%x\n", bit
);
3433 #line 1063 "rl78-decode.opc"
3434 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(1);
3436 /*----------------------------------------------------------------------*/
3449 /** 0111 0001 0bit 0011 clr1 %0 */
3450 #line 455 "rl78-decode.opc"
3451 int bit AU
= (op
[1] >> 4) & 0x07;
3454 printf ("\033[33m%s\033[0m %02x %02x\n",
3455 "/** 0111 0001 0bit 0011 clr1 %0 */",
3457 printf (" bit = 0x%x\n", bit
);
3460 #line 455 "rl78-decode.opc"
3461 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(0);
3463 /*----------------------------------------------------------------------*/
3476 /** 0111 0001 0bit 0100 mov1 cy, %1 */
3477 #line 796 "rl78-decode.opc"
3478 int bit AU
= (op
[1] >> 4) & 0x07;
3481 printf ("\033[33m%s\033[0m %02x %02x\n",
3482 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3484 printf (" bit = 0x%x\n", bit
);
3486 SYNTAX("mov1 cy, %1");
3487 #line 796 "rl78-decode.opc"
3488 ID(mov
); DCY(); SM(None
, SADDR
); SB(bit
);
3501 /** 0111 0001 0bit 0101 and1 cy, %s1 */
3502 #line 325 "rl78-decode.opc"
3503 int bit AU
= (op
[1] >> 4) & 0x07;
3506 printf ("\033[33m%s\033[0m %02x %02x\n",
3507 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3509 printf (" bit = 0x%x\n", bit
);
3511 SYNTAX("and1 cy, %s1");
3512 #line 325 "rl78-decode.opc"
3513 ID(and); DCY(); SM(None
, SADDR
); SB(bit
);
3515 /*----------------------------------------------------------------------*/
3517 /* Note that the branch insns need to be listed before the shift
3518 ones, as "shift count of zero" means "branch insn" */
3531 /** 0111 0001 0bit 0110 or1 cy, %s1 */
3532 #line 980 "rl78-decode.opc"
3533 int bit AU
= (op
[1] >> 4) & 0x07;
3536 printf ("\033[33m%s\033[0m %02x %02x\n",
3537 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3539 printf (" bit = 0x%x\n", bit
);
3541 SYNTAX("or1 cy, %s1");
3542 #line 980 "rl78-decode.opc"
3543 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3545 /*----------------------------------------------------------------------*/
3558 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3559 #line 1284 "rl78-decode.opc"
3560 int bit AU
= (op
[1] >> 4) & 0x07;
3563 printf ("\033[33m%s\033[0m %02x %02x\n",
3564 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3566 printf (" bit = 0x%x\n", bit
);
3568 SYNTAX("xor1 cy, %s1");
3569 #line 1284 "rl78-decode.opc"
3570 ID(xor); DCY(); SM(None
, SADDR
); SB(bit
);
3572 /*----------------------------------------------------------------------*/
3585 /** 0111 0001 0bit 1000 clr1 %e!0 */
3586 #line 437 "rl78-decode.opc"
3587 int bit AU
= (op
[1] >> 4) & 0x07;
3590 printf ("\033[33m%s\033[0m %02x %02x\n",
3591 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
3593 printf (" bit = 0x%x\n", bit
);
3595 SYNTAX("clr1 %e!0");
3596 #line 437 "rl78-decode.opc"
3597 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(0);
3610 /** 0111 0001 0bit 1001 mov1 %s0, cy */
3611 #line 805 "rl78-decode.opc"
3612 int bit AU
= (op
[1] >> 4) & 0x07;
3615 printf ("\033[33m%s\033[0m %02x %02x\n",
3616 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3618 printf (" bit = 0x%x\n", bit
);
3620 SYNTAX("mov1 %s0, cy");
3621 #line 805 "rl78-decode.opc"
3622 ID(mov
); DM(None
, SFR
); DB(bit
); SCY();
3624 /*----------------------------------------------------------------------*/
3637 /** 0111 0001 0bit 1010 set1 %s0 */
3638 #line 1057 "rl78-decode.opc"
3639 int bit AU
= (op
[1] >> 4) & 0x07;
3642 printf ("\033[33m%s\033[0m %02x %02x\n",
3643 "/** 0111 0001 0bit 1010 set1 %s0 */",
3645 printf (" bit = 0x%x\n", bit
);
3648 #line 1057 "rl78-decode.opc"
3650 ID(mov
); DM(None
, op0
); DB(bit
); SC(1);
3651 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3652 rl78
->syntax
= "ei";
3665 /** 0111 0001 0bit 1011 clr1 %s0 */
3666 #line 449 "rl78-decode.opc"
3667 int bit AU
= (op
[1] >> 4) & 0x07;
3670 printf ("\033[33m%s\033[0m %02x %02x\n",
3671 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3673 printf (" bit = 0x%x\n", bit
);
3676 #line 449 "rl78-decode.opc"
3678 ID(mov
); DM(None
, op0
); DB(bit
); SC(0);
3679 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3680 rl78
->syntax
= "di";
3693 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
3694 #line 799 "rl78-decode.opc"
3695 int bit AU
= (op
[1] >> 4) & 0x07;
3698 printf ("\033[33m%s\033[0m %02x %02x\n",
3699 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3701 printf (" bit = 0x%x\n", bit
);
3703 SYNTAX("mov1 cy, %s1");
3704 #line 799 "rl78-decode.opc"
3705 ID(mov
); DCY(); SM(None
, SFR
); SB(bit
);
3718 /** 0111 0001 0bit 1101 and1 cy, %s1 */
3719 #line 322 "rl78-decode.opc"
3720 int bit AU
= (op
[1] >> 4) & 0x07;
3723 printf ("\033[33m%s\033[0m %02x %02x\n",
3724 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3726 printf (" bit = 0x%x\n", bit
);
3728 SYNTAX("and1 cy, %s1");
3729 #line 322 "rl78-decode.opc"
3730 ID(and); DCY(); SM(None
, SFR
); SB(bit
);
3743 /** 0111 0001 0bit 1110 or1 cy, %s1 */
3744 #line 977 "rl78-decode.opc"
3745 int bit AU
= (op
[1] >> 4) & 0x07;
3748 printf ("\033[33m%s\033[0m %02x %02x\n",
3749 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3751 printf (" bit = 0x%x\n", bit
);
3753 SYNTAX("or1 cy, %s1");
3754 #line 977 "rl78-decode.opc"
3755 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3768 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3769 #line 1281 "rl78-decode.opc"
3770 int bit AU
= (op
[1] >> 4) & 0x07;
3773 printf ("\033[33m%s\033[0m %02x %02x\n",
3774 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3776 printf (" bit = 0x%x\n", bit
);
3778 SYNTAX("xor1 cy, %s1");
3779 #line 1281 "rl78-decode.opc"
3780 ID(xor); DCY(); SM(None
, SFR
); SB(bit
);
3786 /** 0111 0001 1000 0000 set1 cy */
3789 printf ("\033[33m%s\033[0m %02x %02x\n",
3790 "/** 0111 0001 1000 0000 set1 cy */",
3794 #line 1054 "rl78-decode.opc"
3795 ID(mov
); DCY(); SC(1);
3808 /** 0111 0001 1bit 0001 mov1 %e0, cy */
3809 #line 784 "rl78-decode.opc"
3810 int bit AU
= (op
[1] >> 4) & 0x07;
3813 printf ("\033[33m%s\033[0m %02x %02x\n",
3814 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
3816 printf (" bit = 0x%x\n", bit
);
3818 SYNTAX("mov1 %e0, cy");
3819 #line 784 "rl78-decode.opc"
3820 ID(mov
); DM(HL
, 0); DB(bit
); SCY();
3833 /** 0111 0001 1bit 0010 set1 %e0 */
3834 #line 1048 "rl78-decode.opc"
3835 int bit AU
= (op
[1] >> 4) & 0x07;
3838 printf ("\033[33m%s\033[0m %02x %02x\n",
3839 "/** 0111 0001 1bit 0010 set1 %e0 */",
3841 printf (" bit = 0x%x\n", bit
);
3844 #line 1048 "rl78-decode.opc"
3845 ID(mov
); DM(HL
, 0); DB(bit
); SC(1);
3858 /** 0111 0001 1bit 0011 clr1 %e0 */
3859 #line 440 "rl78-decode.opc"
3860 int bit AU
= (op
[1] >> 4) & 0x07;
3863 printf ("\033[33m%s\033[0m %02x %02x\n",
3864 "/** 0111 0001 1bit 0011 clr1 %e0 */",
3866 printf (" bit = 0x%x\n", bit
);
3869 #line 440 "rl78-decode.opc"
3870 ID(mov
); DM(HL
, 0); DB(bit
); SC(0);
3883 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
3884 #line 790 "rl78-decode.opc"
3885 int bit AU
= (op
[1] >> 4) & 0x07;
3888 printf ("\033[33m%s\033[0m %02x %02x\n",
3889 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
3891 printf (" bit = 0x%x\n", bit
);
3893 SYNTAX("mov1 cy, %e1");
3894 #line 790 "rl78-decode.opc"
3895 ID(mov
); DCY(); SM(HL
, 0); SB(bit
);
3908 /** 0111 0001 1bit 0101 and1 cy, %e1 */
3909 #line 316 "rl78-decode.opc"
3910 int bit AU
= (op
[1] >> 4) & 0x07;
3913 printf ("\033[33m%s\033[0m %02x %02x\n",
3914 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
3916 printf (" bit = 0x%x\n", bit
);
3918 SYNTAX("and1 cy, %e1");
3919 #line 316 "rl78-decode.opc"
3920 ID(and); DCY(); SM(HL
, 0); SB(bit
);
3933 /** 0111 0001 1bit 0110 or1 cy, %e1 */
3934 #line 971 "rl78-decode.opc"
3935 int bit AU
= (op
[1] >> 4) & 0x07;
3938 printf ("\033[33m%s\033[0m %02x %02x\n",
3939 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
3941 printf (" bit = 0x%x\n", bit
);
3943 SYNTAX("or1 cy, %e1");
3944 #line 971 "rl78-decode.opc"
3945 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3958 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
3959 #line 1275 "rl78-decode.opc"
3960 int bit AU
= (op
[1] >> 4) & 0x07;
3963 printf ("\033[33m%s\033[0m %02x %02x\n",
3964 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
3966 printf (" bit = 0x%x\n", bit
);
3968 SYNTAX("xor1 cy, %e1");
3969 #line 1275 "rl78-decode.opc"
3970 ID(xor); DCY(); SM(HL
, 0); SB(bit
);
3976 /** 0111 0001 1000 1000 clr1 cy */
3979 printf ("\033[33m%s\033[0m %02x %02x\n",
3980 "/** 0111 0001 1000 1000 clr1 cy */",
3984 #line 446 "rl78-decode.opc"
3985 ID(mov
); DCY(); SC(0);
3998 /** 0111 0001 1bit 1001 mov1 %e0, cy */
3999 #line 787 "rl78-decode.opc"
4000 int bit AU
= (op
[1] >> 4) & 0x07;
4003 printf ("\033[33m%s\033[0m %02x %02x\n",
4004 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
4006 printf (" bit = 0x%x\n", bit
);
4008 SYNTAX("mov1 %e0, cy");
4009 #line 787 "rl78-decode.opc"
4010 ID(mov
); DR(A
); DB(bit
); SCY();
4023 /** 0111 0001 1bit 1010 set1 %0 */
4024 #line 1051 "rl78-decode.opc"
4025 int bit AU
= (op
[1] >> 4) & 0x07;
4028 printf ("\033[33m%s\033[0m %02x %02x\n",
4029 "/** 0111 0001 1bit 1010 set1 %0 */",
4031 printf (" bit = 0x%x\n", bit
);
4034 #line 1051 "rl78-decode.opc"
4035 ID(mov
); DR(A
); DB(bit
); SC(1);
4048 /** 0111 0001 1bit 1011 clr1 %0 */
4049 #line 443 "rl78-decode.opc"
4050 int bit AU
= (op
[1] >> 4) & 0x07;
4053 printf ("\033[33m%s\033[0m %02x %02x\n",
4054 "/** 0111 0001 1bit 1011 clr1 %0 */",
4056 printf (" bit = 0x%x\n", bit
);
4059 #line 443 "rl78-decode.opc"
4060 ID(mov
); DR(A
); DB(bit
); SC(0);
4073 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
4074 #line 793 "rl78-decode.opc"
4075 int bit AU
= (op
[1] >> 4) & 0x07;
4078 printf ("\033[33m%s\033[0m %02x %02x\n",
4079 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
4081 printf (" bit = 0x%x\n", bit
);
4083 SYNTAX("mov1 cy, %e1");
4084 #line 793 "rl78-decode.opc"
4085 ID(mov
); DCY(); SR(A
); SB(bit
);
4098 /** 0111 0001 1bit 1101 and1 cy, %1 */
4099 #line 319 "rl78-decode.opc"
4100 int bit AU
= (op
[1] >> 4) & 0x07;
4103 printf ("\033[33m%s\033[0m %02x %02x\n",
4104 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4106 printf (" bit = 0x%x\n", bit
);
4108 SYNTAX("and1 cy, %1");
4109 #line 319 "rl78-decode.opc"
4110 ID(and); DCY(); SR(A
); SB(bit
);
4123 /** 0111 0001 1bit 1110 or1 cy, %1 */
4124 #line 974 "rl78-decode.opc"
4125 int bit AU
= (op
[1] >> 4) & 0x07;
4128 printf ("\033[33m%s\033[0m %02x %02x\n",
4129 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4131 printf (" bit = 0x%x\n", bit
);
4133 SYNTAX("or1 cy, %1");
4134 #line 974 "rl78-decode.opc"
4135 ID(or); DCY(); SR(A
); SB(bit
);
4148 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4149 #line 1278 "rl78-decode.opc"
4150 int bit AU
= (op
[1] >> 4) & 0x07;
4153 printf ("\033[33m%s\033[0m %02x %02x\n",
4154 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4156 printf (" bit = 0x%x\n", bit
);
4158 SYNTAX("xor1 cy, %1");
4159 #line 1278 "rl78-decode.opc"
4160 ID(xor); DCY(); SR(A
); SB(bit
);
4166 /** 0111 0001 1100 0000 not1 cy */
4169 printf ("\033[33m%s\033[0m %02x %02x\n",
4170 "/** 0111 0001 1100 0000 not1 cy */",
4174 #line 915 "rl78-decode.opc"
4175 ID(xor); DCY(); SC(1);
4177 /*----------------------------------------------------------------------*/
4181 default: UNSUPPORTED(); break;
4186 /** 0111 1000 movw %e0, %1 */
4189 printf ("\033[33m%s\033[0m %02x\n",
4190 "/** 0111 1000 movw %e0, %1 */",
4193 SYNTAX("movw %e0, %1");
4194 #line 876 "rl78-decode.opc"
4195 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4201 /** 0111 1001 movw %0, %e1 */
4204 printf ("\033[33m%s\033[0m %02x\n",
4205 "/** 0111 1001 movw %0, %e1 */",
4208 SYNTAX("movw %0, %e1");
4209 #line 867 "rl78-decode.opc"
4210 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4216 /** 0111 1010 xor %0, #%1 */
4219 printf ("\033[33m%s\033[0m %02x\n",
4220 "/** 0111 1010 xor %0, #%1 */",
4223 SYNTAX("xor %0, #%1");
4224 #line 1270 "rl78-decode.opc"
4225 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4227 /*----------------------------------------------------------------------*/
4233 /** 0111 1011 xor %0, %1 */
4236 printf ("\033[33m%s\033[0m %02x\n",
4237 "/** 0111 1011 xor %0, %1 */",
4240 SYNTAX("xor %0, %1");
4241 #line 1267 "rl78-decode.opc"
4242 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4248 /** 0111 1100 xor %0, #%1 */
4251 printf ("\033[33m%s\033[0m %02x\n",
4252 "/** 0111 1100 xor %0, #%1 */",
4255 SYNTAX("xor %0, #%1");
4256 #line 1258 "rl78-decode.opc"
4257 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4263 /** 0111 1101 xor %0, %e1 */
4266 printf ("\033[33m%s\033[0m %02x\n",
4267 "/** 0111 1101 xor %0, %e1 */",
4270 SYNTAX("xor %0, %e1");
4271 #line 1246 "rl78-decode.opc"
4272 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4278 /** 0111 1110 xor %0, %e1 */
4281 printf ("\033[33m%s\033[0m %02x\n",
4282 "/** 0111 1110 xor %0, %e1 */",
4285 SYNTAX("xor %0, %e1");
4286 #line 1252 "rl78-decode.opc"
4287 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4293 /** 0111 1111 xor %0, %e!1 */
4296 printf ("\033[33m%s\033[0m %02x\n",
4297 "/** 0111 1111 xor %0, %e!1 */",
4300 SYNTAX("xor %0, %e!1");
4301 #line 1243 "rl78-decode.opc"
4302 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4315 /** 1000 0reg inc %0 */
4316 #line 586 "rl78-decode.opc"
4317 int reg AU
= op
[0] & 0x07;
4320 printf ("\033[33m%s\033[0m %02x\n",
4321 "/** 1000 0reg inc %0 */",
4323 printf (" reg = 0x%x\n", reg
);
4326 #line 586 "rl78-decode.opc"
4327 ID(add
); DRB(reg
); SC(1); Fza
;
4333 /** 1000 1000 mov %0, %e1 */
4336 printf ("\033[33m%s\033[0m %02x\n",
4337 "/** 1000 1000 mov %0, %e1 */",
4340 SYNTAX("mov %0, %e1");
4341 #line 665 "rl78-decode.opc"
4342 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4348 /** 1000 1001 mov %0, %e1 */
4351 printf ("\033[33m%s\033[0m %02x\n",
4352 "/** 1000 1001 mov %0, %e1 */",
4355 SYNTAX("mov %0, %e1");
4356 #line 647 "rl78-decode.opc"
4357 ID(mov
); DR(A
); SM(DE
, 0);
4363 /** 1000 1010 mov %0, %e1 */
4366 printf ("\033[33m%s\033[0m %02x\n",
4367 "/** 1000 1010 mov %0, %e1 */",
4370 SYNTAX("mov %0, %e1");
4371 #line 650 "rl78-decode.opc"
4372 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4378 /** 1000 1011 mov %0, %e1 */
4381 printf ("\033[33m%s\033[0m %02x\n",
4382 "/** 1000 1011 mov %0, %e1 */",
4385 SYNTAX("mov %0, %e1");
4386 #line 653 "rl78-decode.opc"
4387 ID(mov
); DR(A
); SM(HL
, 0);
4393 /** 1000 1100 mov %0, %e1 */
4396 printf ("\033[33m%s\033[0m %02x\n",
4397 "/** 1000 1100 mov %0, %e1 */",
4400 SYNTAX("mov %0, %e1");
4401 #line 656 "rl78-decode.opc"
4402 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4408 /** 1000 1101 mov %0, %1 */
4411 printf ("\033[33m%s\033[0m %02x\n",
4412 "/** 1000 1101 mov %0, %1 */",
4415 SYNTAX("mov %0, %1");
4416 #line 689 "rl78-decode.opc"
4417 ID(mov
); DR(A
); SM(None
, SADDR
);
4423 /** 1000 1110 mov %0, %s1 */
4426 printf ("\033[33m%s\033[0m %02x\n",
4427 "/** 1000 1110 mov %0, %s1 */",
4430 SYNTAX("mov %0, %s1");
4431 #line 686 "rl78-decode.opc"
4432 ID(mov
); DR(A
); SM(None
, SFR
);
4438 /** 1000 1111 mov %0, %e!1 */
4441 printf ("\033[33m%s\033[0m %02x\n",
4442 "/** 1000 1111 mov %0, %e!1 */",
4445 SYNTAX("mov %0, %e!1");
4446 #line 644 "rl78-decode.opc"
4447 ID(mov
); DR(A
); SM(None
, IMMU(2));
4460 /** 1001 0reg dec %0 */
4461 #line 553 "rl78-decode.opc"
4462 int reg AU
= op
[0] & 0x07;
4465 printf ("\033[33m%s\033[0m %02x\n",
4466 "/** 1001 0reg dec %0 */",
4468 printf (" reg = 0x%x\n", reg
);
4471 #line 553 "rl78-decode.opc"
4472 ID(sub
); DRB(reg
); SC(1); Fza
;
4478 /** 1001 1000 mov %0, %1 */
4481 printf ("\033[33m%s\033[0m %02x\n",
4482 "/** 1001 1000 mov %0, %1 */",
4485 SYNTAX("mov %0, %1");
4486 #line 641 "rl78-decode.opc"
4487 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4493 /** 1001 1001 mov %e0,%1 */
4496 printf ("\033[33m%s\033[0m %02x\n",
4497 "/** 1001 1001 mov %e0,%1 */",
4500 SYNTAX("mov %e0,%1");
4501 #line 614 "rl78-decode.opc"
4502 ID(mov
); DM(DE
, 0); SR(A
);
4508 /** 1001 1010 mov %e0, %1 */
4511 printf ("\033[33m%s\033[0m %02x\n",
4512 "/** 1001 1010 mov %e0, %1 */",
4515 SYNTAX("mov %e0, %1");
4516 #line 620 "rl78-decode.opc"
4517 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4523 /** 1001 1011 mov %e0,%1 */
4526 printf ("\033[33m%s\033[0m %02x\n",
4527 "/** 1001 1011 mov %e0,%1 */",
4530 SYNTAX("mov %e0,%1");
4531 #line 623 "rl78-decode.opc"
4532 ID(mov
); DM(HL
, 0); SR(A
);
4538 /** 1001 1100 mov %e0, %1 */
4541 printf ("\033[33m%s\033[0m %02x\n",
4542 "/** 1001 1100 mov %e0, %1 */",
4545 SYNTAX("mov %e0, %1");
4546 #line 632 "rl78-decode.opc"
4547 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4553 /** 1001 1101 mov %0, %1 */
4556 printf ("\033[33m%s\033[0m %02x\n",
4557 "/** 1001 1101 mov %0, %1 */",
4560 SYNTAX("mov %0, %1");
4561 #line 746 "rl78-decode.opc"
4562 ID(mov
); DM(None
, SADDR
); SR(A
);
4568 /** 1001 1110 mov %0, %1 */
4571 printf ("\033[33m%s\033[0m %02x\n",
4572 "/** 1001 1110 mov %0, %1 */",
4575 SYNTAX("mov %0, %1");
4576 #line 779 "rl78-decode.opc"
4577 ID(mov
); DM(None
, SFR
); SR(A
);
4579 /*----------------------------------------------------------------------*/
4585 /** 1001 1111 mov %e!0, %1 */
4588 printf ("\033[33m%s\033[0m %02x\n",
4589 "/** 1001 1111 mov %e!0, %1 */",
4592 SYNTAX("mov %e!0, %1");
4593 #line 611 "rl78-decode.opc"
4594 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4600 /** 1010 0000 inc %e!0 */
4603 printf ("\033[33m%s\033[0m %02x\n",
4604 "/** 1010 0000 inc %e!0 */",
4608 #line 580 "rl78-decode.opc"
4609 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4618 /** 1010 0rg1 incw %0 */
4619 #line 600 "rl78-decode.opc"
4620 int rg AU
= (op
[0] >> 1) & 0x03;
4623 printf ("\033[33m%s\033[0m %02x\n",
4624 "/** 1010 0rg1 incw %0 */",
4626 printf (" rg = 0x%x\n", rg
);
4629 #line 600 "rl78-decode.opc"
4630 ID(add
); W(); DRW(rg
); SC(1);
4636 /** 1010 0010 incw %e!0 */
4639 printf ("\033[33m%s\033[0m %02x\n",
4640 "/** 1010 0010 incw %e!0 */",
4643 SYNTAX("incw %e!0");
4644 #line 594 "rl78-decode.opc"
4645 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4651 /** 1010 0100 inc %0 */
4654 printf ("\033[33m%s\033[0m %02x\n",
4655 "/** 1010 0100 inc %0 */",
4659 #line 589 "rl78-decode.opc"
4660 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4662 /*----------------------------------------------------------------------*/
4668 /** 1010 0110 incw %0 */
4671 printf ("\033[33m%s\033[0m %02x\n",
4672 "/** 1010 0110 incw %0 */",
4676 #line 603 "rl78-decode.opc"
4677 ID(add
); W(); DM(None
, SADDR
); SC(1);
4679 /*----------------------------------------------------------------------*/
4685 /** 1010 1000 movw %0, %1 */
4688 printf ("\033[33m%s\033[0m %02x\n",
4689 "/** 1010 1000 movw %0, %1 */",
4692 SYNTAX("movw %0, %1");
4693 #line 849 "rl78-decode.opc"
4694 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4700 /** 1010 1001 movw %0, %e1 */
4703 printf ("\033[33m%s\033[0m %02x\n",
4704 "/** 1010 1001 movw %0, %e1 */",
4707 SYNTAX("movw %0, %e1");
4708 #line 837 "rl78-decode.opc"
4709 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4715 /** 1010 1010 movw %0, %e1 */
4718 printf ("\033[33m%s\033[0m %02x\n",
4719 "/** 1010 1010 movw %0, %e1 */",
4722 SYNTAX("movw %0, %e1");
4723 #line 840 "rl78-decode.opc"
4724 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4730 /** 1010 1011 movw %0, %e1 */
4733 printf ("\033[33m%s\033[0m %02x\n",
4734 "/** 1010 1011 movw %0, %e1 */",
4737 SYNTAX("movw %0, %e1");
4738 #line 843 "rl78-decode.opc"
4739 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4745 /** 1010 1100 movw %0, %e1 */
4748 printf ("\033[33m%s\033[0m %02x\n",
4749 "/** 1010 1100 movw %0, %e1 */",
4752 SYNTAX("movw %0, %e1");
4753 #line 846 "rl78-decode.opc"
4754 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4760 /** 1010 1101 movw %0, %1 */
4763 printf ("\033[33m%s\033[0m %02x\n",
4764 "/** 1010 1101 movw %0, %1 */",
4767 SYNTAX("movw %0, %1");
4768 #line 879 "rl78-decode.opc"
4769 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4775 /** 1010 1110 movw %0, %s1 */
4778 printf ("\033[33m%s\033[0m %02x\n",
4779 "/** 1010 1110 movw %0, %s1 */",
4782 SYNTAX("movw %0, %s1");
4783 #line 882 "rl78-decode.opc"
4784 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4790 /** 1010 1111 movw %0, %e!1 */
4793 printf ("\033[33m%s\033[0m %02x\n",
4794 "/** 1010 1111 movw %0, %e!1 */",
4797 SYNTAX("movw %0, %e!1");
4798 #line 833 "rl78-decode.opc"
4799 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4806 /** 1011 0000 dec %e!0 */
4809 printf ("\033[33m%s\033[0m %02x\n",
4810 "/** 1011 0000 dec %e!0 */",
4814 #line 547 "rl78-decode.opc"
4815 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4824 /** 1011 0rg1 decw %0 */
4825 #line 567 "rl78-decode.opc"
4826 int rg AU
= (op
[0] >> 1) & 0x03;
4829 printf ("\033[33m%s\033[0m %02x\n",
4830 "/** 1011 0rg1 decw %0 */",
4832 printf (" rg = 0x%x\n", rg
);
4835 #line 567 "rl78-decode.opc"
4836 ID(sub
); W(); DRW(rg
); SC(1);
4842 /** 1011 0010 decw %e!0 */
4845 printf ("\033[33m%s\033[0m %02x\n",
4846 "/** 1011 0010 decw %e!0 */",
4849 SYNTAX("decw %e!0");
4850 #line 561 "rl78-decode.opc"
4851 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4857 /** 1011 0100 dec %0 */
4860 printf ("\033[33m%s\033[0m %02x\n",
4861 "/** 1011 0100 dec %0 */",
4865 #line 556 "rl78-decode.opc"
4866 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4868 /*----------------------------------------------------------------------*/
4874 /** 1011 0110 decw %0 */
4877 printf ("\033[33m%s\033[0m %02x\n",
4878 "/** 1011 0110 decw %0 */",
4882 #line 570 "rl78-decode.opc"
4883 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4885 /*----------------------------------------------------------------------*/
4891 /** 1011 1000 movw %0, %1 */
4894 printf ("\033[33m%s\033[0m %02x\n",
4895 "/** 1011 1000 movw %0, %1 */",
4898 SYNTAX("movw %0, %1");
4899 #line 830 "rl78-decode.opc"
4900 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4906 /** 1011 1001 movw %e0, %1 */
4909 printf ("\033[33m%s\033[0m %02x\n",
4910 "/** 1011 1001 movw %e0, %1 */",
4913 SYNTAX("movw %e0, %1");
4914 #line 818 "rl78-decode.opc"
4915 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4921 /** 1011 1010 movw %e0, %1 */
4924 printf ("\033[33m%s\033[0m %02x\n",
4925 "/** 1011 1010 movw %e0, %1 */",
4928 SYNTAX("movw %e0, %1");
4929 #line 821 "rl78-decode.opc"
4930 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4936 /** 1011 1011 movw %e0, %1 */
4939 printf ("\033[33m%s\033[0m %02x\n",
4940 "/** 1011 1011 movw %e0, %1 */",
4943 SYNTAX("movw %e0, %1");
4944 #line 824 "rl78-decode.opc"
4945 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4951 /** 1011 1100 movw %e0, %1 */
4954 printf ("\033[33m%s\033[0m %02x\n",
4955 "/** 1011 1100 movw %e0, %1 */",
4958 SYNTAX("movw %e0, %1");
4959 #line 827 "rl78-decode.opc"
4960 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4966 /** 1011 1101 movw %0, %1 */
4969 printf ("\033[33m%s\033[0m %02x\n",
4970 "/** 1011 1101 movw %0, %1 */",
4973 SYNTAX("movw %0, %1");
4974 #line 894 "rl78-decode.opc"
4975 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4981 /** 1011 1110 movw %0, %1 */
4984 printf ("\033[33m%s\033[0m %02x\n",
4985 "/** 1011 1110 movw %0, %1 */",
4988 SYNTAX("movw %0, %1");
4989 #line 900 "rl78-decode.opc"
4990 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4992 /*----------------------------------------------------------------------*/
4998 /** 1011 1111 movw %e!0, %1 */
5001 printf ("\033[33m%s\033[0m %02x\n",
5002 "/** 1011 1111 movw %e!0, %1 */",
5005 SYNTAX("movw %e!0, %1");
5006 #line 815 "rl78-decode.opc"
5007 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
5016 /** 1100 0rg0 pop %0 */
5017 #line 985 "rl78-decode.opc"
5018 int rg AU
= (op
[0] >> 1) & 0x03;
5021 printf ("\033[33m%s\033[0m %02x\n",
5022 "/** 1100 0rg0 pop %0 */",
5024 printf (" rg = 0x%x\n", rg
);
5027 #line 985 "rl78-decode.opc"
5028 ID(mov
); W(); DRW(rg
); SPOP();
5037 /** 1100 0rg1 push %1 */
5038 #line 993 "rl78-decode.opc"
5039 int rg AU
= (op
[0] >> 1) & 0x03;
5042 printf ("\033[33m%s\033[0m %02x\n",
5043 "/** 1100 0rg1 push %1 */",
5045 printf (" rg = 0x%x\n", rg
);
5048 #line 993 "rl78-decode.opc"
5049 ID(mov
); W(); DPUSH(); SRW(rg
);
5055 /** 1100 1000 mov %0, #%1 */
5058 printf ("\033[33m%s\033[0m %02x\n",
5059 "/** 1100 1000 mov %0, #%1 */",
5062 SYNTAX("mov %0, #%1");
5063 #line 638 "rl78-decode.opc"
5064 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5070 /** 1100 1001 movw %0, #%1 */
5073 printf ("\033[33m%s\033[0m %02x\n",
5074 "/** 1100 1001 movw %0, #%1 */",
5077 SYNTAX("movw %0, #%1");
5078 #line 891 "rl78-decode.opc"
5079 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5085 /** 1100 1010 mov %e0, #%1 */
5088 printf ("\033[33m%s\033[0m %02x\n",
5089 "/** 1100 1010 mov %e0, #%1 */",
5092 SYNTAX("mov %e0, #%1");
5093 #line 617 "rl78-decode.opc"
5094 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5100 /** 1100 1011 movw %0, #%1 */
5103 printf ("\033[33m%s\033[0m %02x\n",
5104 "/** 1100 1011 movw %0, #%1 */",
5107 SYNTAX("movw %0, #%1");
5108 #line 897 "rl78-decode.opc"
5109 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5115 /** 1100 1100 mov %e0, #%1 */
5118 printf ("\033[33m%s\033[0m %02x\n",
5119 "/** 1100 1100 mov %e0, #%1 */",
5122 SYNTAX("mov %e0, #%1");
5123 #line 629 "rl78-decode.opc"
5124 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5130 /** 1100 1101 mov %0, #%1 */
5133 printf ("\033[33m%s\033[0m %02x\n",
5134 "/** 1100 1101 mov %0, #%1 */",
5137 SYNTAX("mov %0, #%1");
5138 #line 743 "rl78-decode.opc"
5139 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5145 /** 1100 1110 mov %s0, #%1 */
5148 printf ("\033[33m%s\033[0m %02x\n",
5149 "/** 1100 1110 mov %s0, #%1 */",
5152 SYNTAX("mov %s0, #%1");
5153 #line 749 "rl78-decode.opc"
5156 ID(mov
); DM(None
, op0
); SC(op1
);
5161 rl78
->syntax
= "mulhu"; ID(mulhu
);
5164 rl78
->syntax
= "mulh"; ID(mulh
);
5167 rl78
->syntax
= "divhu"; ID(divhu
);
5170 rl78
->syntax
= "divwu <old-encoding>"; ID(divwu
);
5173 rl78
->syntax
= "machu"; ID(machu
);
5176 rl78
->syntax
= "mach"; ID(mach
);
5179 rl78
->syntax
= "divwu"; ID(divwu
);
5187 /** 1100 1111 mov %e!0, #%1 */
5190 printf ("\033[33m%s\033[0m %02x\n",
5191 "/** 1100 1111 mov %e!0, #%1 */",
5194 SYNTAX("mov %e!0, #%1");
5195 #line 608 "rl78-decode.opc"
5196 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5205 /** 1101 00rg cmp0 %0 */
5206 #line 517 "rl78-decode.opc"
5207 int rg AU
= op
[0] & 0x03;
5210 printf ("\033[33m%s\033[0m %02x\n",
5211 "/** 1101 00rg cmp0 %0 */",
5213 printf (" rg = 0x%x\n", rg
);
5216 #line 517 "rl78-decode.opc"
5217 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5223 /** 1101 0100 cmp0 %0 */
5226 printf ("\033[33m%s\033[0m %02x\n",
5227 "/** 1101 0100 cmp0 %0 */",
5231 #line 520 "rl78-decode.opc"
5232 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5234 /*----------------------------------------------------------------------*/
5240 /** 1101 0101 cmp0 %e!0 */
5243 printf ("\033[33m%s\033[0m %02x\n",
5244 "/** 1101 0101 cmp0 %e!0 */",
5247 SYNTAX("cmp0 %e!0");
5248 #line 514 "rl78-decode.opc"
5249 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5255 /** 1101 0110 mulu x */
5258 printf ("\033[33m%s\033[0m %02x\n",
5259 "/** 1101 0110 mulu x */",
5263 #line 905 "rl78-decode.opc"
5266 /*----------------------------------------------------------------------*/
5272 /** 1101 0111 ret */
5275 printf ("\033[33m%s\033[0m %02x\n",
5276 "/** 1101 0111 ret */",
5280 #line 1001 "rl78-decode.opc"
5287 /** 1101 1000 mov %0, %1 */
5290 printf ("\033[33m%s\033[0m %02x\n",
5291 "/** 1101 1000 mov %0, %1 */",
5294 SYNTAX("mov %0, %1");
5295 #line 710 "rl78-decode.opc"
5296 ID(mov
); DR(X
); SM(None
, SADDR
);
5302 /** 1101 1001 mov %0, %e!1 */
5305 printf ("\033[33m%s\033[0m %02x\n",
5306 "/** 1101 1001 mov %0, %e!1 */",
5309 SYNTAX("mov %0, %e!1");
5310 #line 707 "rl78-decode.opc"
5311 ID(mov
); DR(X
); SM(None
, IMMU(2));
5319 /** 11ra 1010 movw %0, %1 */
5320 #line 888 "rl78-decode.opc"
5321 int ra AU
= (op
[0] >> 4) & 0x03;
5324 printf ("\033[33m%s\033[0m %02x\n",
5325 "/** 11ra 1010 movw %0, %1 */",
5327 printf (" ra = 0x%x\n", ra
);
5329 SYNTAX("movw %0, %1");
5330 #line 888 "rl78-decode.opc"
5331 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5339 /** 11ra 1011 movw %0, %e!1 */
5340 #line 885 "rl78-decode.opc"
5341 int ra AU
= (op
[0] >> 4) & 0x03;
5344 printf ("\033[33m%s\033[0m %02x\n",
5345 "/** 11ra 1011 movw %0, %e!1 */",
5347 printf (" ra = 0x%x\n", ra
);
5349 SYNTAX("movw %0, %e!1");
5350 #line 885 "rl78-decode.opc"
5351 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5357 /** 1101 1100 bc $%a0 */
5360 printf ("\033[33m%s\033[0m %02x\n",
5361 "/** 1101 1100 bc $%a0 */",
5365 #line 333 "rl78-decode.opc"
5366 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5372 /** 1101 1101 bz $%a0 */
5375 printf ("\033[33m%s\033[0m %02x\n",
5376 "/** 1101 1101 bz $%a0 */",
5380 #line 345 "rl78-decode.opc"
5381 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5387 /** 1101 1110 bnc $%a0 */
5390 printf ("\033[33m%s\033[0m %02x\n",
5391 "/** 1101 1110 bnc $%a0 */",
5395 #line 336 "rl78-decode.opc"
5396 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5402 /** 1101 1111 bnz $%a0 */
5405 printf ("\033[33m%s\033[0m %02x\n",
5406 "/** 1101 1111 bnz $%a0 */",
5410 #line 348 "rl78-decode.opc"
5411 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5413 /*----------------------------------------------------------------------*/
5422 /** 1110 00rg oneb %0 */
5423 #line 923 "rl78-decode.opc"
5424 int rg AU
= op
[0] & 0x03;
5427 printf ("\033[33m%s\033[0m %02x\n",
5428 "/** 1110 00rg oneb %0 */",
5430 printf (" rg = 0x%x\n", rg
);
5433 #line 923 "rl78-decode.opc"
5434 ID(mov
); DRB(rg
); SC(1);
5440 /** 1110 0100 oneb %0 */
5443 printf ("\033[33m%s\033[0m %02x\n",
5444 "/** 1110 0100 oneb %0 */",
5448 #line 926 "rl78-decode.opc"
5449 ID(mov
); DM(None
, SADDR
); SC(1);
5451 /*----------------------------------------------------------------------*/
5457 /** 1110 0101 oneb %e!0 */
5460 printf ("\033[33m%s\033[0m %02x\n",
5461 "/** 1110 0101 oneb %e!0 */",
5464 SYNTAX("oneb %e!0");
5465 #line 920 "rl78-decode.opc"
5466 ID(mov
); DM(None
, IMMU(2)); SC(1);
5472 /** 1110 0110 onew %0 */
5475 printf ("\033[33m%s\033[0m %02x\n",
5476 "/** 1110 0110 onew %0 */",
5480 #line 931 "rl78-decode.opc"
5481 ID(mov
); DR(AX
); SC(1);
5487 /** 1110 0111 onew %0 */
5490 printf ("\033[33m%s\033[0m %02x\n",
5491 "/** 1110 0111 onew %0 */",
5495 #line 934 "rl78-decode.opc"
5496 ID(mov
); DR(BC
); SC(1);
5498 /*----------------------------------------------------------------------*/
5504 /** 1110 1000 mov %0, %1 */
5507 printf ("\033[33m%s\033[0m %02x\n",
5508 "/** 1110 1000 mov %0, %1 */",
5511 SYNTAX("mov %0, %1");
5512 #line 698 "rl78-decode.opc"
5513 ID(mov
); DR(B
); SM(None
, SADDR
);
5519 /** 1110 1001 mov %0, %e!1 */
5522 printf ("\033[33m%s\033[0m %02x\n",
5523 "/** 1110 1001 mov %0, %e!1 */",
5526 SYNTAX("mov %0, %e!1");
5527 #line 692 "rl78-decode.opc"
5528 ID(mov
); DR(B
); SM(None
, IMMU(2));
5534 /** 1110 1100 br !%!a0 */
5537 printf ("\033[33m%s\033[0m %02x\n",
5538 "/** 1110 1100 br !%!a0 */",
5542 #line 367 "rl78-decode.opc"
5543 ID(branch
); DC(IMMU(3));
5549 /** 1110 1101 br %!a0 */
5552 printf ("\033[33m%s\033[0m %02x\n",
5553 "/** 1110 1101 br %!a0 */",
5557 #line 370 "rl78-decode.opc"
5558 ID(branch
); DC(IMMU(2));
5564 /** 1110 1110 br $%!a0 */
5567 printf ("\033[33m%s\033[0m %02x\n",
5568 "/** 1110 1110 br $%!a0 */",
5572 #line 373 "rl78-decode.opc"
5573 ID(branch
); DC(pc
+IMMS(2)+3);
5579 /** 1110 1111 br $%a0 */
5582 printf ("\033[33m%s\033[0m %02x\n",
5583 "/** 1110 1111 br $%a0 */",
5587 #line 376 "rl78-decode.opc"
5588 ID(branch
); DC(pc
+IMMS(1)+2);
5597 /** 1111 00rg clrb %0 */
5598 #line 463 "rl78-decode.opc"
5599 int rg AU
= op
[0] & 0x03;
5602 printf ("\033[33m%s\033[0m %02x\n",
5603 "/** 1111 00rg clrb %0 */",
5605 printf (" rg = 0x%x\n", rg
);
5608 #line 463 "rl78-decode.opc"
5609 ID(mov
); DRB(rg
); SC(0);
5615 /** 1111 0100 clrb %0 */
5618 printf ("\033[33m%s\033[0m %02x\n",
5619 "/** 1111 0100 clrb %0 */",
5623 #line 466 "rl78-decode.opc"
5624 ID(mov
); DM(None
, SADDR
); SC(0);
5626 /*----------------------------------------------------------------------*/
5632 /** 1111 0101 clrb %e!0 */
5635 printf ("\033[33m%s\033[0m %02x\n",
5636 "/** 1111 0101 clrb %e!0 */",
5639 SYNTAX("clrb %e!0");
5640 #line 460 "rl78-decode.opc"
5641 ID(mov
); DM(None
, IMMU(2)); SC(0);
5647 /** 1111 0110 clrw %0 */
5650 printf ("\033[33m%s\033[0m %02x\n",
5651 "/** 1111 0110 clrw %0 */",
5655 #line 471 "rl78-decode.opc"
5656 ID(mov
); DR(AX
); SC(0);
5662 /** 1111 0111 clrw %0 */
5665 printf ("\033[33m%s\033[0m %02x\n",
5666 "/** 1111 0111 clrw %0 */",
5670 #line 474 "rl78-decode.opc"
5671 ID(mov
); DR(BC
); SC(0);
5673 /*----------------------------------------------------------------------*/
5679 /** 1111 1000 mov %0, %1 */
5682 printf ("\033[33m%s\033[0m %02x\n",
5683 "/** 1111 1000 mov %0, %1 */",
5686 SYNTAX("mov %0, %1");
5687 #line 704 "rl78-decode.opc"
5688 ID(mov
); DR(C
); SM(None
, SADDR
);
5694 /** 1111 1001 mov %0, %e!1 */
5697 printf ("\033[33m%s\033[0m %02x\n",
5698 "/** 1111 1001 mov %0, %e!1 */",
5701 SYNTAX("mov %0, %e!1");
5702 #line 701 "rl78-decode.opc"
5703 ID(mov
); DR(C
); SM(None
, IMMU(2));
5709 /** 1111 1100 call !%!a0 */
5712 printf ("\033[33m%s\033[0m %02x\n",
5713 "/** 1111 1100 call !%!a0 */",
5716 SYNTAX("call !%!a0");
5717 #line 420 "rl78-decode.opc"
5718 ID(call
); DC(IMMU(3));
5724 /** 1111 1101 call %!a0 */
5727 printf ("\033[33m%s\033[0m %02x\n",
5728 "/** 1111 1101 call %!a0 */",
5731 SYNTAX("call %!a0");
5732 #line 423 "rl78-decode.opc"
5733 ID(call
); DC(IMMU(2));
5739 /** 1111 1110 call $%!a0 */
5742 printf ("\033[33m%s\033[0m %02x\n",
5743 "/** 1111 1110 call $%!a0 */",
5746 SYNTAX("call $%!a0");
5747 #line 426 "rl78-decode.opc"
5748 ID(call
); DC(pc
+IMMS(2)+3);
5754 /** 1111 1111 brk1 */
5757 printf ("\033[33m%s\033[0m %02x\n",
5758 "/** 1111 1111 brk1 */",
5762 #line 384 "rl78-decode.opc"
5768 #line 1289 "rl78-decode.opc"
5770 return rl78
->n_bytes
;
This page took 0.168398 seconds and 4 git commands to generate.