1 #line 1 "rl78-decode.opc"
3 /* Copyright (C) 2012-2017 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
56 #define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0)
57 #define B ((unsigned long) GETBYTE())
59 #define SYNTAX(x) rl78->syntax = x
61 #define UNSUPPORTED() \
62 rl78->syntax = "*unknown*"
64 #define RB(x) ((x)+RL78_Reg_X)
65 #define RW(x) ((x)+RL78_Reg_AX)
67 #define Fz rl78->flags = RL78_PSW_Z
68 #define Fza rl78->flags = RL78_PSW_Z | RL78_PSW_AC
69 #define Fzc rl78->flags = RL78_PSW_Z | RL78_PSW_CY
70 #define Fzac rl78->flags = RL78_PSW_Z | RL78_PSW_AC | RL78_PSW_CY
71 #define Fa rl78->flags = RL78_PSW_AC
72 #define Fc rl78->flags = RL78_PSW_CY
73 #define Fac rl78->flags = RL78_PSW_AC | RL78_PSW_CY
75 #define IMMU(bytes) immediate (bytes, 0, ld)
76 #define IMMS(bytes) immediate (bytes, 1, ld)
79 immediate (int bytes
, int sign_extend
, LocalData
* ld
)
87 if (sign_extend
&& (i
& 0x80))
93 if (sign_extend
&& (i
& 0x8000))
100 if (sign_extend
&& (i
& 0x800000))
104 fprintf (stderr
, "Programmer error: immediate() called with invalid byte count %d\n", bytes
);
110 #define DC(c) OP (0, RL78_Operand_Immediate, 0, c)
111 #define DR(r) OP (0, RL78_Operand_Register, RL78_Reg_##r, 0)
112 #define DRB(r) OP (0, RL78_Operand_Register, RB(r), 0)
113 #define DRW(r) OP (0, RL78_Operand_Register, RW(r), 0)
114 #define DM(r,a) OP (0, RL78_Operand_Indirect, RL78_Reg_##r, a)
115 #define DM2(r1,r2,a) OPX (0, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
116 #define DE() rl78->op[0].use_es = 1
117 #define DB(b) set_bit (rl78->op, b)
118 #define DCY() DR(PSW); DB(0)
119 #define DPUSH() OP (0, RL78_Operand_PreDec, RL78_Reg_SP, 0);
121 #define SC(c) OP (1, RL78_Operand_Immediate, 0, c)
122 #define SR(r) OP (1, RL78_Operand_Register, RL78_Reg_##r, 0)
123 #define SRB(r) OP (1, RL78_Operand_Register, RB(r), 0)
124 #define SRW(r) OP (1, RL78_Operand_Register, RW(r), 0)
125 #define SM(r,a) OP (1, RL78_Operand_Indirect, RL78_Reg_##r, a)
126 #define SM2(r1,r2,a) OPX (1, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
127 #define SE() rl78->op[1].use_es = 1
128 #define SB(b) set_bit (rl78->op+1, b)
129 #define SCY() SR(PSW); SB(0)
130 #define COND(c) rl78->op[1].condition = RL78_Condition_##c
131 #define SPOP() OP (1, RL78_Operand_PostInc, RL78_Reg_SP, 0);
134 set_bit (RL78_Opcode_Operand
*op
, int bit
)
136 op
->bit_number
= bit
;
138 case RL78_Operand_Register
:
139 op
->type
= RL78_Operand_Bit
;
141 case RL78_Operand_Indirect
:
142 op
->type
= RL78_Operand_BitIndirect
;
163 #define SADDR saddr (IMMU (1))
164 #define SFR sfr (IMMU (1))
167 rl78_decode_opcode (unsigned long pc AU
,
168 RL78_Opcode_Decoded
* rl78
,
169 int (* getbyte
)(void *),
173 LocalData lds
, * ld
= &lds
;
174 unsigned char op_buf
[OP_BUF_LEN
] = {0};
175 unsigned char *op
= op_buf
;
179 lds
.getbyte
= getbyte
;
183 memset (rl78
, 0, sizeof (*rl78
));
187 /* Byte registers, not including A. */
188 /* Word registers, not including AX. */
190 /*----------------------------------------------------------------------*/
194 switch (op
[0] & 0xff)
201 printf ("\033[33m%s\033[0m %02x\n",
202 "/** 0000 0000 nop */",
206 #line 913 "rl78-decode.opc"
209 /*----------------------------------------------------------------------*/
218 /** 0000 0rw1 addw %0, %1 */
219 #line 276 "rl78-decode.opc"
220 int rw AU
= (op
[0] >> 1) & 0x03;
223 printf ("\033[33m%s\033[0m %02x\n",
224 "/** 0000 0rw1 addw %0, %1 */",
226 printf (" rw = 0x%x\n", rw
);
228 SYNTAX("addw %0, %1");
229 #line 276 "rl78-decode.opc"
230 ID(add
); W(); DR(AX
); SRW(rw
); Fzac
;
236 /** 0000 0010 addw %0, %e!1 */
239 printf ("\033[33m%s\033[0m %02x\n",
240 "/** 0000 0010 addw %0, %e!1 */",
243 SYNTAX("addw %0, %e!1");
244 #line 267 "rl78-decode.opc"
245 ID(add
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
251 /** 0000 0100 addw %0, #%1 */
254 printf ("\033[33m%s\033[0m %02x\n",
255 "/** 0000 0100 addw %0, #%1 */",
258 SYNTAX("addw %0, #%1");
259 #line 273 "rl78-decode.opc"
260 ID(add
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
266 /** 0000 0110 addw %0, %1 */
269 printf ("\033[33m%s\033[0m %02x\n",
270 "/** 0000 0110 addw %0, %1 */",
273 SYNTAX("addw %0, %1");
274 #line 279 "rl78-decode.opc"
275 ID(add
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
281 /** 0000 1000 xch a, x */
284 printf ("\033[33m%s\033[0m %02x\n",
285 "/** 0000 1000 xch a, x */",
289 #line 1236 "rl78-decode.opc"
290 ID(xch
); DR(A
); SR(X
);
292 /*----------------------------------------------------------------------*/
298 /** 0000 1001 mov %0, %e1 */
301 printf ("\033[33m%s\033[0m %02x\n",
302 "/** 0000 1001 mov %0, %e1 */",
305 SYNTAX("mov %0, %e1");
306 #line 680 "rl78-decode.opc"
307 ID(mov
); DR(A
); SM(B
, IMMU(2));
313 /** 0000 1010 add %0, #%1 */
316 printf ("\033[33m%s\033[0m %02x\n",
317 "/** 0000 1010 add %0, #%1 */",
320 SYNTAX("add %0, #%1");
321 #line 230 "rl78-decode.opc"
322 ID(add
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
324 /*----------------------------------------------------------------------*/
330 /** 0000 1011 add %0, %1 */
333 printf ("\033[33m%s\033[0m %02x\n",
334 "/** 0000 1011 add %0, %1 */",
337 SYNTAX("add %0, %1");
338 #line 224 "rl78-decode.opc"
339 ID(add
); DR(A
); SM(None
, SADDR
); Fzac
;
345 /** 0000 1100 add %0, #%1 */
348 printf ("\033[33m%s\033[0m %02x\n",
349 "/** 0000 1100 add %0, #%1 */",
352 SYNTAX("add %0, #%1");
353 #line 218 "rl78-decode.opc"
354 ID(add
); DR(A
); SC(IMMU(1)); Fzac
;
360 /** 0000 1101 add %0, %e1 */
363 printf ("\033[33m%s\033[0m %02x\n",
364 "/** 0000 1101 add %0, %e1 */",
367 SYNTAX("add %0, %e1");
368 #line 206 "rl78-decode.opc"
369 ID(add
); DR(A
); SM(HL
, 0); Fzac
;
375 /** 0000 1110 add %0, %ea1 */
378 printf ("\033[33m%s\033[0m %02x\n",
379 "/** 0000 1110 add %0, %ea1 */",
382 SYNTAX("add %0, %ea1");
383 #line 212 "rl78-decode.opc"
384 ID(add
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
390 /** 0000 1111 add %0, %e!1 */
393 printf ("\033[33m%s\033[0m %02x\n",
394 "/** 0000 1111 add %0, %e!1 */",
397 SYNTAX("add %0, %e!1");
398 #line 203 "rl78-decode.opc"
399 ID(add
); DR(A
); SM(None
, IMMU(2)); Fzac
;
405 /** 0001 0000 addw %0, #%1 */
408 printf ("\033[33m%s\033[0m %02x\n",
409 "/** 0001 0000 addw %0, #%1 */",
412 SYNTAX("addw %0, #%1");
413 #line 282 "rl78-decode.opc"
414 ID(add
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
416 /*----------------------------------------------------------------------*/
425 printf ("\033[33m%s\033[0m %02x\n",
426 "/** 0001 0001 es: */",
430 #line 195 "rl78-decode.opc"
436 /*----------------------------------------------------------------------*/
444 /** 0001 0ra0 movw %0, %1 */
445 #line 861 "rl78-decode.opc"
446 int ra AU
= (op
[0] >> 1) & 0x03;
449 printf ("\033[33m%s\033[0m %02x\n",
450 "/** 0001 0ra0 movw %0, %1 */",
452 printf (" ra = 0x%x\n", ra
);
454 SYNTAX("movw %0, %1");
455 #line 861 "rl78-decode.opc"
456 ID(mov
); W(); DRW(ra
); SR(AX
);
464 /** 0001 0ra1 movw %0, %1 */
465 #line 858 "rl78-decode.opc"
466 int ra AU
= (op
[0] >> 1) & 0x03;
469 printf ("\033[33m%s\033[0m %02x\n",
470 "/** 0001 0ra1 movw %0, %1 */",
472 printf (" ra = 0x%x\n", ra
);
474 SYNTAX("movw %0, %1");
475 #line 858 "rl78-decode.opc"
476 ID(mov
); W(); DR(AX
); SRW(ra
);
482 /** 0001 1000 mov %e0, %1 */
485 printf ("\033[33m%s\033[0m %02x\n",
486 "/** 0001 1000 mov %e0, %1 */",
489 SYNTAX("mov %e0, %1");
490 #line 731 "rl78-decode.opc"
491 ID(mov
); DM(B
, IMMU(2)); SR(A
);
497 /** 0001 1001 mov %e0, #%1 */
500 printf ("\033[33m%s\033[0m %02x\n",
501 "/** 0001 1001 mov %e0, #%1 */",
504 SYNTAX("mov %e0, #%1");
505 #line 728 "rl78-decode.opc"
506 ID(mov
); DM(B
, IMMU(2)); SC(IMMU(1));
512 /** 0001 1010 addc %0, #%1 */
515 printf ("\033[33m%s\033[0m %02x\n",
516 "/** 0001 1010 addc %0, #%1 */",
519 SYNTAX("addc %0, #%1");
520 #line 262 "rl78-decode.opc"
521 ID(addc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
523 /*----------------------------------------------------------------------*/
529 /** 0001 1011 addc %0, %1 */
532 printf ("\033[33m%s\033[0m %02x\n",
533 "/** 0001 1011 addc %0, %1 */",
536 SYNTAX("addc %0, %1");
537 #line 259 "rl78-decode.opc"
538 ID(addc
); DR(A
); SM(None
, SADDR
); Fzac
;
544 /** 0001 1100 addc %0, #%1 */
547 printf ("\033[33m%s\033[0m %02x\n",
548 "/** 0001 1100 addc %0, #%1 */",
551 SYNTAX("addc %0, #%1");
552 #line 250 "rl78-decode.opc"
553 ID(addc
); DR(A
); SC(IMMU(1)); Fzac
;
559 /** 0001 1101 addc %0, %e1 */
562 printf ("\033[33m%s\033[0m %02x\n",
563 "/** 0001 1101 addc %0, %e1 */",
566 SYNTAX("addc %0, %e1");
567 #line 238 "rl78-decode.opc"
568 ID(addc
); DR(A
); SM(HL
, 0); Fzac
;
574 /** 0001 1110 addc %0, %ea1 */
577 printf ("\033[33m%s\033[0m %02x\n",
578 "/** 0001 1110 addc %0, %ea1 */",
581 SYNTAX("addc %0, %ea1");
582 #line 247 "rl78-decode.opc"
583 ID(addc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
589 /** 0001 1111 addc %0, %e!1 */
592 printf ("\033[33m%s\033[0m %02x\n",
593 "/** 0001 1111 addc %0, %e!1 */",
596 SYNTAX("addc %0, %e!1");
597 #line 235 "rl78-decode.opc"
598 ID(addc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
604 /** 0010 0000 subw %0, #%1 */
607 printf ("\033[33m%s\033[0m %02x\n",
608 "/** 0010 0000 subw %0, #%1 */",
611 SYNTAX("subw %0, #%1");
612 #line 1200 "rl78-decode.opc"
613 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
615 /*----------------------------------------------------------------------*/
624 /** 0010 0rw1 subw %0, %1 */
625 #line 1194 "rl78-decode.opc"
626 int rw AU
= (op
[0] >> 1) & 0x03;
629 printf ("\033[33m%s\033[0m %02x\n",
630 "/** 0010 0rw1 subw %0, %1 */",
632 printf (" rw = 0x%x\n", rw
);
634 SYNTAX("subw %0, %1");
635 #line 1194 "rl78-decode.opc"
636 ID(sub
); W(); DR(AX
); SRW(rw
); Fzac
;
642 /** 0010 0010 subw %0, %e!1 */
645 printf ("\033[33m%s\033[0m %02x\n",
646 "/** 0010 0010 subw %0, %e!1 */",
649 SYNTAX("subw %0, %e!1");
650 #line 1185 "rl78-decode.opc"
651 ID(sub
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
657 /** 0010 0100 subw %0, #%1 */
660 printf ("\033[33m%s\033[0m %02x\n",
661 "/** 0010 0100 subw %0, #%1 */",
664 SYNTAX("subw %0, #%1");
665 #line 1191 "rl78-decode.opc"
666 ID(sub
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
672 /** 0010 0110 subw %0, %1 */
675 printf ("\033[33m%s\033[0m %02x\n",
676 "/** 0010 0110 subw %0, %1 */",
679 SYNTAX("subw %0, %1");
680 #line 1197 "rl78-decode.opc"
681 ID(sub
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
687 /** 0010 1000 mov %e0, %1 */
690 printf ("\033[33m%s\033[0m %02x\n",
691 "/** 0010 1000 mov %e0, %1 */",
694 SYNTAX("mov %e0, %1");
695 #line 743 "rl78-decode.opc"
696 ID(mov
); DM(C
, IMMU(2)); SR(A
);
702 /** 0010 1001 mov %0, %e1 */
705 printf ("\033[33m%s\033[0m %02x\n",
706 "/** 0010 1001 mov %0, %e1 */",
709 SYNTAX("mov %0, %e1");
710 #line 686 "rl78-decode.opc"
711 ID(mov
); DR(A
); SM(C
, IMMU(2));
717 /** 0010 1010 sub %0, #%1 */
720 printf ("\033[33m%s\033[0m %02x\n",
721 "/** 0010 1010 sub %0, #%1 */",
724 SYNTAX("sub %0, #%1");
725 #line 1148 "rl78-decode.opc"
726 ID(sub
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
728 /*----------------------------------------------------------------------*/
734 /** 0010 1011 sub %0, %1 */
737 printf ("\033[33m%s\033[0m %02x\n",
738 "/** 0010 1011 sub %0, %1 */",
741 SYNTAX("sub %0, %1");
742 #line 1142 "rl78-decode.opc"
743 ID(sub
); DR(A
); SM(None
, SADDR
); Fzac
;
749 /** 0010 1100 sub %0, #%1 */
752 printf ("\033[33m%s\033[0m %02x\n",
753 "/** 0010 1100 sub %0, #%1 */",
756 SYNTAX("sub %0, #%1");
757 #line 1136 "rl78-decode.opc"
758 ID(sub
); DR(A
); SC(IMMU(1)); Fzac
;
764 /** 0010 1101 sub %0, %e1 */
767 printf ("\033[33m%s\033[0m %02x\n",
768 "/** 0010 1101 sub %0, %e1 */",
771 SYNTAX("sub %0, %e1");
772 #line 1124 "rl78-decode.opc"
773 ID(sub
); DR(A
); SM(HL
, 0); Fzac
;
779 /** 0010 1110 sub %0, %ea1 */
782 printf ("\033[33m%s\033[0m %02x\n",
783 "/** 0010 1110 sub %0, %ea1 */",
786 SYNTAX("sub %0, %ea1");
787 #line 1130 "rl78-decode.opc"
788 ID(sub
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
794 /** 0010 1111 sub %0, %e!1 */
797 printf ("\033[33m%s\033[0m %02x\n",
798 "/** 0010 1111 sub %0, %e!1 */",
801 SYNTAX("sub %0, %e!1");
802 #line 1121 "rl78-decode.opc"
803 ID(sub
); DR(A
); SM(None
, IMMU(2)); Fzac
;
812 /** 0011 0rg0 movw %0, #%1 */
813 #line 855 "rl78-decode.opc"
814 int rg AU
= (op
[0] >> 1) & 0x03;
817 printf ("\033[33m%s\033[0m %02x\n",
818 "/** 0011 0rg0 movw %0, #%1 */",
820 printf (" rg = 0x%x\n", rg
);
822 SYNTAX("movw %0, #%1");
823 #line 855 "rl78-decode.opc"
824 ID(mov
); W(); DRW(rg
); SC(IMMU(2));
830 switch (op
[1] & 0x8f)
834 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
835 #line 418 "rl78-decode.opc"
836 int bit AU
= (op
[1] >> 4) & 0x07;
839 printf ("\033[33m%s\033[0m %02x %02x\n",
840 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
842 printf (" bit = 0x%x\n", bit
);
844 SYNTAX("btclr %s1, $%a0");
845 #line 418 "rl78-decode.opc"
846 ID(branch_cond_clear
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
848 /*----------------------------------------------------------------------*/
854 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
855 #line 412 "rl78-decode.opc"
856 int bit AU
= (op
[1] >> 4) & 0x07;
859 printf ("\033[33m%s\033[0m %02x %02x\n",
860 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
862 printf (" bit = 0x%x\n", bit
);
864 SYNTAX("btclr %1, $%a0");
865 #line 412 "rl78-decode.opc"
866 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
872 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
873 #line 404 "rl78-decode.opc"
874 int bit AU
= (op
[1] >> 4) & 0x07;
877 printf ("\033[33m%s\033[0m %02x %02x\n",
878 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
880 printf (" bit = 0x%x\n", bit
);
882 SYNTAX("bt %s1, $%a0");
883 #line 404 "rl78-decode.opc"
884 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
886 /*----------------------------------------------------------------------*/
892 /** 0011 0001 0bit 0011 bt %1, $%a0 */
893 #line 398 "rl78-decode.opc"
894 int bit AU
= (op
[1] >> 4) & 0x07;
897 printf ("\033[33m%s\033[0m %02x %02x\n",
898 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
900 printf (" bit = 0x%x\n", bit
);
902 SYNTAX("bt %1, $%a0");
903 #line 398 "rl78-decode.opc"
904 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
910 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
911 #line 365 "rl78-decode.opc"
912 int bit AU
= (op
[1] >> 4) & 0x07;
915 printf ("\033[33m%s\033[0m %02x %02x\n",
916 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
918 printf (" bit = 0x%x\n", bit
);
920 SYNTAX("bf %s1, $%a0");
921 #line 365 "rl78-decode.opc"
922 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
924 /*----------------------------------------------------------------------*/
930 /** 0011 0001 0bit 0101 bf %1, $%a0 */
931 #line 359 "rl78-decode.opc"
932 int bit AU
= (op
[1] >> 4) & 0x07;
935 printf ("\033[33m%s\033[0m %02x %02x\n",
936 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
938 printf (" bit = 0x%x\n", bit
);
940 SYNTAX("bf %1, $%a0");
941 #line 359 "rl78-decode.opc"
942 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(F
);
948 /** 0011 0001 0cnt 0111 shl %0, %1 */
949 #line 1077 "rl78-decode.opc"
950 int cnt AU
= (op
[1] >> 4) & 0x07;
953 printf ("\033[33m%s\033[0m %02x %02x\n",
954 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
956 printf (" cnt = 0x%x\n", cnt
);
958 SYNTAX("shl %0, %1");
959 #line 1077 "rl78-decode.opc"
960 ID(shl
); DR(C
); SC(cnt
);
966 /** 0011 0001 0cnt 1000 shl %0, %1 */
967 #line 1074 "rl78-decode.opc"
968 int cnt AU
= (op
[1] >> 4) & 0x07;
971 printf ("\033[33m%s\033[0m %02x %02x\n",
972 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
974 printf (" cnt = 0x%x\n", cnt
);
976 SYNTAX("shl %0, %1");
977 #line 1074 "rl78-decode.opc"
978 ID(shl
); DR(B
); SC(cnt
);
984 /** 0011 0001 0cnt 1001 shl %0, %1 */
985 #line 1071 "rl78-decode.opc"
986 int cnt AU
= (op
[1] >> 4) & 0x07;
989 printf ("\033[33m%s\033[0m %02x %02x\n",
990 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
992 printf (" cnt = 0x%x\n", cnt
);
994 SYNTAX("shl %0, %1");
995 #line 1071 "rl78-decode.opc"
996 ID(shl
); DR(A
); SC(cnt
);
1002 /** 0011 0001 0cnt 1010 shr %0, %1 */
1003 #line 1088 "rl78-decode.opc"
1004 int cnt AU
= (op
[1] >> 4) & 0x07;
1007 printf ("\033[33m%s\033[0m %02x %02x\n",
1008 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
1010 printf (" cnt = 0x%x\n", cnt
);
1012 SYNTAX("shr %0, %1");
1013 #line 1088 "rl78-decode.opc"
1014 ID(shr
); DR(A
); SC(cnt
);
1020 /** 0011 0001 0cnt 1011 sar %0, %1 */
1021 #line 1035 "rl78-decode.opc"
1022 int cnt AU
= (op
[1] >> 4) & 0x07;
1025 printf ("\033[33m%s\033[0m %02x %02x\n",
1026 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1028 printf (" cnt = 0x%x\n", cnt
);
1030 SYNTAX("sar %0, %1");
1031 #line 1035 "rl78-decode.opc"
1032 ID(sar
); DR(A
); SC(cnt
);
1039 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1040 #line 1083 "rl78-decode.opc"
1041 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1044 printf ("\033[33m%s\033[0m %02x %02x\n",
1045 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1047 printf (" wcnt = 0x%x\n", wcnt
);
1049 SYNTAX("shlw %0, %1");
1050 #line 1083 "rl78-decode.opc"
1051 ID(shl
); W(); DR(BC
); SC(wcnt
);
1053 /*----------------------------------------------------------------------*/
1060 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1061 #line 1080 "rl78-decode.opc"
1062 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1065 printf ("\033[33m%s\033[0m %02x %02x\n",
1066 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1068 printf (" wcnt = 0x%x\n", wcnt
);
1070 SYNTAX("shlw %0, %1");
1071 #line 1080 "rl78-decode.opc"
1072 ID(shl
); W(); DR(AX
); SC(wcnt
);
1079 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1080 #line 1091 "rl78-decode.opc"
1081 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1084 printf ("\033[33m%s\033[0m %02x %02x\n",
1085 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1087 printf (" wcnt = 0x%x\n", wcnt
);
1089 SYNTAX("shrw %0, %1");
1090 #line 1091 "rl78-decode.opc"
1091 ID(shr
); W(); DR(AX
); SC(wcnt
);
1093 /*----------------------------------------------------------------------*/
1100 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1101 #line 1038 "rl78-decode.opc"
1102 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1105 printf ("\033[33m%s\033[0m %02x %02x\n",
1106 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1108 printf (" wcnt = 0x%x\n", wcnt
);
1110 SYNTAX("sarw %0, %1");
1111 #line 1038 "rl78-decode.opc"
1112 ID(sar
); W(); DR(AX
); SC(wcnt
);
1114 /*----------------------------------------------------------------------*/
1120 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
1121 #line 415 "rl78-decode.opc"
1122 int bit AU
= (op
[1] >> 4) & 0x07;
1125 printf ("\033[33m%s\033[0m %02x %02x\n",
1126 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1128 printf (" bit = 0x%x\n", bit
);
1130 SYNTAX("btclr %s1, $%a0");
1131 #line 415 "rl78-decode.opc"
1132 ID(branch_cond_clear
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1138 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
1139 #line 409 "rl78-decode.opc"
1140 int bit AU
= (op
[1] >> 4) & 0x07;
1143 printf ("\033[33m%s\033[0m %02x %02x\n",
1144 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
1146 printf (" bit = 0x%x\n", bit
);
1148 SYNTAX("btclr %e1, $%a0");
1149 #line 409 "rl78-decode.opc"
1150 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1156 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
1157 #line 401 "rl78-decode.opc"
1158 int bit AU
= (op
[1] >> 4) & 0x07;
1161 printf ("\033[33m%s\033[0m %02x %02x\n",
1162 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1164 printf (" bit = 0x%x\n", bit
);
1166 SYNTAX("bt %s1, $%a0");
1167 #line 401 "rl78-decode.opc"
1168 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1174 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
1175 #line 395 "rl78-decode.opc"
1176 int bit AU
= (op
[1] >> 4) & 0x07;
1179 printf ("\033[33m%s\033[0m %02x %02x\n",
1180 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
1182 printf (" bit = 0x%x\n", bit
);
1184 SYNTAX("bt %e1, $%a0");
1185 #line 395 "rl78-decode.opc"
1186 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1192 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
1193 #line 362 "rl78-decode.opc"
1194 int bit AU
= (op
[1] >> 4) & 0x07;
1197 printf ("\033[33m%s\033[0m %02x %02x\n",
1198 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1200 printf (" bit = 0x%x\n", bit
);
1202 SYNTAX("bf %s1, $%a0");
1203 #line 362 "rl78-decode.opc"
1204 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
1210 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
1211 #line 356 "rl78-decode.opc"
1212 int bit AU
= (op
[1] >> 4) & 0x07;
1215 printf ("\033[33m%s\033[0m %02x %02x\n",
1216 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
1218 printf (" bit = 0x%x\n", bit
);
1220 SYNTAX("bf %e1, $%a0");
1221 #line 356 "rl78-decode.opc"
1222 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(F
);
1226 default: UNSUPPORTED(); break;
1233 /** 0011 0ra1 xchw %0, %1 */
1234 #line 1241 "rl78-decode.opc"
1235 int ra AU
= (op
[0] >> 1) & 0x03;
1238 printf ("\033[33m%s\033[0m %02x\n",
1239 "/** 0011 0ra1 xchw %0, %1 */",
1241 printf (" ra = 0x%x\n", ra
);
1243 SYNTAX("xchw %0, %1");
1244 #line 1241 "rl78-decode.opc"
1245 ID(xch
); W(); DR(AX
); SRW(ra
);
1247 /*----------------------------------------------------------------------*/
1253 /** 0011 1000 mov %e0, #%1 */
1256 printf ("\033[33m%s\033[0m %02x\n",
1257 "/** 0011 1000 mov %e0, #%1 */",
1260 SYNTAX("mov %e0, #%1");
1261 #line 740 "rl78-decode.opc"
1262 ID(mov
); DM(C
, IMMU(2)); SC(IMMU(1));
1268 /** 0011 1001 mov %e0, #%1 */
1271 printf ("\033[33m%s\033[0m %02x\n",
1272 "/** 0011 1001 mov %e0, #%1 */",
1275 SYNTAX("mov %e0, #%1");
1276 #line 734 "rl78-decode.opc"
1277 ID(mov
); DM(BC
, IMMU(2)); SC(IMMU(1));
1283 /** 0011 1010 subc %0, #%1 */
1286 printf ("\033[33m%s\033[0m %02x\n",
1287 "/** 0011 1010 subc %0, #%1 */",
1290 SYNTAX("subc %0, #%1");
1291 #line 1180 "rl78-decode.opc"
1292 ID(subc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1294 /*----------------------------------------------------------------------*/
1300 /** 0011 1011 subc %0, %1 */
1303 printf ("\033[33m%s\033[0m %02x\n",
1304 "/** 0011 1011 subc %0, %1 */",
1307 SYNTAX("subc %0, %1");
1308 #line 1177 "rl78-decode.opc"
1309 ID(subc
); DR(A
); SM(None
, SADDR
); Fzac
;
1315 /** 0011 1100 subc %0, #%1 */
1318 printf ("\033[33m%s\033[0m %02x\n",
1319 "/** 0011 1100 subc %0, #%1 */",
1322 SYNTAX("subc %0, #%1");
1323 #line 1168 "rl78-decode.opc"
1324 ID(subc
); DR(A
); SC(IMMU(1)); Fzac
;
1330 /** 0011 1101 subc %0, %e1 */
1333 printf ("\033[33m%s\033[0m %02x\n",
1334 "/** 0011 1101 subc %0, %e1 */",
1337 SYNTAX("subc %0, %e1");
1338 #line 1156 "rl78-decode.opc"
1339 ID(subc
); DR(A
); SM(HL
, 0); Fzac
;
1345 /** 0011 1110 subc %0, %ea1 */
1348 printf ("\033[33m%s\033[0m %02x\n",
1349 "/** 0011 1110 subc %0, %ea1 */",
1352 SYNTAX("subc %0, %ea1");
1353 #line 1165 "rl78-decode.opc"
1354 ID(subc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1360 /** 0011 1111 subc %0, %e!1 */
1363 printf ("\033[33m%s\033[0m %02x\n",
1364 "/** 0011 1111 subc %0, %e!1 */",
1367 SYNTAX("subc %0, %e!1");
1368 #line 1153 "rl78-decode.opc"
1369 ID(subc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1375 /** 0100 0000 cmp %e!0, #%1 */
1378 printf ("\033[33m%s\033[0m %02x\n",
1379 "/** 0100 0000 cmp %e!0, #%1 */",
1382 SYNTAX("cmp %e!0, #%1");
1383 #line 482 "rl78-decode.opc"
1384 ID(cmp
); DM(None
, IMMU(2)); SC(IMMU(1)); Fzac
;
1390 /** 0100 0001 mov %0, #%1 */
1393 printf ("\033[33m%s\033[0m %02x\n",
1394 "/** 0100 0001 mov %0, #%1 */",
1397 SYNTAX("mov %0, #%1");
1398 #line 719 "rl78-decode.opc"
1399 ID(mov
); DR(ES
); SC(IMMU(1));
1405 /** 0100 0010 cmpw %0, %e!1 */
1408 printf ("\033[33m%s\033[0m %02x\n",
1409 "/** 0100 0010 cmpw %0, %e!1 */",
1412 SYNTAX("cmpw %0, %e!1");
1413 #line 533 "rl78-decode.opc"
1414 ID(cmp
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
1422 /** 0100 0ra1 cmpw %0, %1 */
1423 #line 542 "rl78-decode.opc"
1424 int ra AU
= (op
[0] >> 1) & 0x03;
1427 printf ("\033[33m%s\033[0m %02x\n",
1428 "/** 0100 0ra1 cmpw %0, %1 */",
1430 printf (" ra = 0x%x\n", ra
);
1432 SYNTAX("cmpw %0, %1");
1433 #line 542 "rl78-decode.opc"
1434 ID(cmp
); W(); DR(AX
); SRW(ra
); Fzac
;
1440 /** 0100 0100 cmpw %0, #%1 */
1443 printf ("\033[33m%s\033[0m %02x\n",
1444 "/** 0100 0100 cmpw %0, #%1 */",
1447 SYNTAX("cmpw %0, #%1");
1448 #line 539 "rl78-decode.opc"
1449 ID(cmp
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
1455 /** 0100 0110 cmpw %0, %1 */
1458 printf ("\033[33m%s\033[0m %02x\n",
1459 "/** 0100 0110 cmpw %0, %1 */",
1462 SYNTAX("cmpw %0, %1");
1463 #line 545 "rl78-decode.opc"
1464 ID(cmp
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
1466 /*----------------------------------------------------------------------*/
1472 /** 0100 1000 mov %e0, %1 */
1475 printf ("\033[33m%s\033[0m %02x\n",
1476 "/** 0100 1000 mov %e0, %1 */",
1479 SYNTAX("mov %e0, %1");
1480 #line 737 "rl78-decode.opc"
1481 ID(mov
); DM(BC
, IMMU(2)); SR(A
);
1487 /** 0100 1001 mov %0, %e1 */
1490 printf ("\033[33m%s\033[0m %02x\n",
1491 "/** 0100 1001 mov %0, %e1 */",
1494 SYNTAX("mov %0, %e1");
1495 #line 683 "rl78-decode.opc"
1496 ID(mov
); DR(A
); SM(BC
, IMMU(2));
1502 /** 0100 1010 cmp %0, #%1 */
1505 printf ("\033[33m%s\033[0m %02x\n",
1506 "/** 0100 1010 cmp %0, #%1 */",
1509 SYNTAX("cmp %0, #%1");
1510 #line 485 "rl78-decode.opc"
1511 ID(cmp
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1517 /** 0100 1011 cmp %0, %1 */
1520 printf ("\033[33m%s\033[0m %02x\n",
1521 "/** 0100 1011 cmp %0, %1 */",
1524 SYNTAX("cmp %0, %1");
1525 #line 512 "rl78-decode.opc"
1526 ID(cmp
); DR(A
); SM(None
, SADDR
); Fzac
;
1528 /*----------------------------------------------------------------------*/
1534 /** 0100 1100 cmp %0, #%1 */
1537 printf ("\033[33m%s\033[0m %02x\n",
1538 "/** 0100 1100 cmp %0, #%1 */",
1541 SYNTAX("cmp %0, #%1");
1542 #line 503 "rl78-decode.opc"
1543 ID(cmp
); DR(A
); SC(IMMU(1)); Fzac
;
1549 /** 0100 1101 cmp %0, %e1 */
1552 printf ("\033[33m%s\033[0m %02x\n",
1553 "/** 0100 1101 cmp %0, %e1 */",
1556 SYNTAX("cmp %0, %e1");
1557 #line 491 "rl78-decode.opc"
1558 ID(cmp
); DR(A
); SM(HL
, 0); Fzac
;
1564 /** 0100 1110 cmp %0, %ea1 */
1567 printf ("\033[33m%s\033[0m %02x\n",
1568 "/** 0100 1110 cmp %0, %ea1 */",
1571 SYNTAX("cmp %0, %ea1");
1572 #line 500 "rl78-decode.opc"
1573 ID(cmp
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1579 /** 0100 1111 cmp %0, %e!1 */
1582 printf ("\033[33m%s\033[0m %02x\n",
1583 "/** 0100 1111 cmp %0, %e!1 */",
1586 SYNTAX("cmp %0, %e!1");
1587 #line 488 "rl78-decode.opc"
1588 ID(cmp
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1601 /** 0101 0reg mov %0, #%1 */
1602 #line 671 "rl78-decode.opc"
1603 int reg AU
= op
[0] & 0x07;
1606 printf ("\033[33m%s\033[0m %02x\n",
1607 "/** 0101 0reg mov %0, #%1 */",
1609 printf (" reg = 0x%x\n", reg
);
1611 SYNTAX("mov %0, #%1");
1612 #line 671 "rl78-decode.opc"
1613 ID(mov
); DRB(reg
); SC(IMMU(1));
1619 /** 0101 1000 movw %e0, %1 */
1622 printf ("\033[33m%s\033[0m %02x\n",
1623 "/** 0101 1000 movw %e0, %1 */",
1626 SYNTAX("movw %e0, %1");
1627 #line 873 "rl78-decode.opc"
1628 ID(mov
); W(); DM(B
, IMMU(2)); SR(AX
);
1634 /** 0101 1001 movw %0, %e1 */
1637 printf ("\033[33m%s\033[0m %02x\n",
1638 "/** 0101 1001 movw %0, %e1 */",
1641 SYNTAX("movw %0, %e1");
1642 #line 864 "rl78-decode.opc"
1643 ID(mov
); W(); DR(AX
); SM(B
, IMMU(2));
1649 /** 0101 1010 and %0, #%1 */
1652 printf ("\033[33m%s\033[0m %02x\n",
1653 "/** 0101 1010 and %0, #%1 */",
1656 SYNTAX("and %0, #%1");
1657 #line 314 "rl78-decode.opc"
1658 ID(and); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
1660 /*----------------------------------------------------------------------*/
1666 /** 0101 1011 and %0, %1 */
1669 printf ("\033[33m%s\033[0m %02x\n",
1670 "/** 0101 1011 and %0, %1 */",
1673 SYNTAX("and %0, %1");
1674 #line 311 "rl78-decode.opc"
1675 ID(and); DR(A
); SM(None
, SADDR
); Fz
;
1681 /** 0101 1100 and %0, #%1 */
1684 printf ("\033[33m%s\033[0m %02x\n",
1685 "/** 0101 1100 and %0, #%1 */",
1688 SYNTAX("and %0, #%1");
1689 #line 302 "rl78-decode.opc"
1690 ID(and); DR(A
); SC(IMMU(1)); Fz
;
1696 /** 0101 1101 and %0, %e1 */
1699 printf ("\033[33m%s\033[0m %02x\n",
1700 "/** 0101 1101 and %0, %e1 */",
1703 SYNTAX("and %0, %e1");
1704 #line 290 "rl78-decode.opc"
1705 ID(and); DR(A
); SM(HL
, 0); Fz
;
1711 /** 0101 1110 and %0, %ea1 */
1714 printf ("\033[33m%s\033[0m %02x\n",
1715 "/** 0101 1110 and %0, %ea1 */",
1718 SYNTAX("and %0, %ea1");
1719 #line 296 "rl78-decode.opc"
1720 ID(and); DR(A
); SM(HL
, IMMU(1)); Fz
;
1726 /** 0101 1111 and %0, %e!1 */
1729 printf ("\033[33m%s\033[0m %02x\n",
1730 "/** 0101 1111 and %0, %e!1 */",
1733 SYNTAX("and %0, %e!1");
1734 #line 287 "rl78-decode.opc"
1735 ID(and); DR(A
); SM(None
, IMMU(2)); Fz
;
1747 /** 0110 0rba mov %0, %1 */
1748 #line 674 "rl78-decode.opc"
1749 int rba AU
= op
[0] & 0x07;
1752 printf ("\033[33m%s\033[0m %02x\n",
1753 "/** 0110 0rba mov %0, %1 */",
1755 printf (" rba = 0x%x\n", rba
);
1757 SYNTAX("mov %0, %1");
1758 #line 674 "rl78-decode.opc"
1759 ID(mov
); DR(A
); SRB(rba
);
1765 switch (op
[1] & 0xff)
1776 /** 0110 0001 0000 0reg add %0, %1 */
1777 #line 227 "rl78-decode.opc"
1778 int reg AU
= op
[1] & 0x07;
1781 printf ("\033[33m%s\033[0m %02x %02x\n",
1782 "/** 0110 0001 0000 0reg add %0, %1 */",
1784 printf (" reg = 0x%x\n", reg
);
1786 SYNTAX("add %0, %1");
1787 #line 227 "rl78-decode.opc"
1788 ID(add
); DRB(reg
); SR(A
); Fzac
;
1800 /** 0110 0001 0000 1rba add %0, %1 */
1801 #line 221 "rl78-decode.opc"
1802 int rba AU
= op
[1] & 0x07;
1805 printf ("\033[33m%s\033[0m %02x %02x\n",
1806 "/** 0110 0001 0000 1rba add %0, %1 */",
1808 printf (" rba = 0x%x\n", rba
);
1810 SYNTAX("add %0, %1");
1811 #line 221 "rl78-decode.opc"
1812 ID(add
); DR(A
); SRB(rba
); Fzac
;
1818 /** 0110 0001 0000 1001 addw %0, %ea1 */
1821 printf ("\033[33m%s\033[0m %02x %02x\n",
1822 "/** 0110 0001 0000 1001 addw %0, %ea1 */",
1825 SYNTAX("addw %0, %ea1");
1826 #line 270 "rl78-decode.opc"
1827 ID(add
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1840 /** 0110 0001 0001 0reg addc %0, %1 */
1841 #line 256 "rl78-decode.opc"
1842 int reg AU
= op
[1] & 0x07;
1845 printf ("\033[33m%s\033[0m %02x %02x\n",
1846 "/** 0110 0001 0001 0reg addc %0, %1 */",
1848 printf (" reg = 0x%x\n", reg
);
1850 SYNTAX("addc %0, %1");
1851 #line 256 "rl78-decode.opc"
1852 ID(addc
); DRB(reg
); SR(A
); Fzac
;
1864 /** 0110 0001 0001 1rba addc %0, %1 */
1865 #line 253 "rl78-decode.opc"
1866 int rba AU
= op
[1] & 0x07;
1869 printf ("\033[33m%s\033[0m %02x %02x\n",
1870 "/** 0110 0001 0001 1rba addc %0, %1 */",
1872 printf (" rba = 0x%x\n", rba
);
1874 SYNTAX("addc %0, %1");
1875 #line 253 "rl78-decode.opc"
1876 ID(addc
); DR(A
); SRB(rba
); Fzac
;
1889 /** 0110 0001 0010 0reg sub %0, %1 */
1890 #line 1145 "rl78-decode.opc"
1891 int reg AU
= op
[1] & 0x07;
1894 printf ("\033[33m%s\033[0m %02x %02x\n",
1895 "/** 0110 0001 0010 0reg sub %0, %1 */",
1897 printf (" reg = 0x%x\n", reg
);
1899 SYNTAX("sub %0, %1");
1900 #line 1145 "rl78-decode.opc"
1901 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1913 /** 0110 0001 0010 1rba sub %0, %1 */
1914 #line 1139 "rl78-decode.opc"
1915 int rba AU
= op
[1] & 0x07;
1918 printf ("\033[33m%s\033[0m %02x %02x\n",
1919 "/** 0110 0001 0010 1rba sub %0, %1 */",
1921 printf (" rba = 0x%x\n", rba
);
1923 SYNTAX("sub %0, %1");
1924 #line 1139 "rl78-decode.opc"
1925 ID(sub
); DR(A
); SRB(rba
); Fzac
;
1931 /** 0110 0001 0010 1001 subw %0, %ea1 */
1934 printf ("\033[33m%s\033[0m %02x %02x\n",
1935 "/** 0110 0001 0010 1001 subw %0, %ea1 */",
1938 SYNTAX("subw %0, %ea1");
1939 #line 1188 "rl78-decode.opc"
1940 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1953 /** 0110 0001 0011 0reg subc %0, %1 */
1954 #line 1174 "rl78-decode.opc"
1955 int reg AU
= op
[1] & 0x07;
1958 printf ("\033[33m%s\033[0m %02x %02x\n",
1959 "/** 0110 0001 0011 0reg subc %0, %1 */",
1961 printf (" reg = 0x%x\n", reg
);
1963 SYNTAX("subc %0, %1");
1964 #line 1174 "rl78-decode.opc"
1965 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1977 /** 0110 0001 0011 1rba subc %0, %1 */
1978 #line 1171 "rl78-decode.opc"
1979 int rba AU
= op
[1] & 0x07;
1982 printf ("\033[33m%s\033[0m %02x %02x\n",
1983 "/** 0110 0001 0011 1rba subc %0, %1 */",
1985 printf (" rba = 0x%x\n", rba
);
1987 SYNTAX("subc %0, %1");
1988 #line 1171 "rl78-decode.opc"
1989 ID(subc
); DR(A
); SRB(rba
); Fzac
;
2002 /** 0110 0001 0100 0reg cmp %0, %1 */
2003 #line 509 "rl78-decode.opc"
2004 int reg AU
= op
[1] & 0x07;
2007 printf ("\033[33m%s\033[0m %02x %02x\n",
2008 "/** 0110 0001 0100 0reg cmp %0, %1 */",
2010 printf (" reg = 0x%x\n", reg
);
2012 SYNTAX("cmp %0, %1");
2013 #line 509 "rl78-decode.opc"
2014 ID(cmp
); DRB(reg
); SR(A
); Fzac
;
2026 /** 0110 0001 0100 1rba cmp %0, %1 */
2027 #line 506 "rl78-decode.opc"
2028 int rba AU
= op
[1] & 0x07;
2031 printf ("\033[33m%s\033[0m %02x %02x\n",
2032 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2034 printf (" rba = 0x%x\n", rba
);
2036 SYNTAX("cmp %0, %1");
2037 #line 506 "rl78-decode.opc"
2038 ID(cmp
); DR(A
); SRB(rba
); Fzac
;
2044 /** 0110 0001 0100 1001 cmpw %0, %ea1 */
2047 printf ("\033[33m%s\033[0m %02x %02x\n",
2048 "/** 0110 0001 0100 1001 cmpw %0, %ea1 */",
2051 SYNTAX("cmpw %0, %ea1");
2052 #line 536 "rl78-decode.opc"
2053 ID(cmp
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
2066 /** 0110 0001 0101 0reg and %0, %1 */
2067 #line 308 "rl78-decode.opc"
2068 int reg AU
= op
[1] & 0x07;
2071 printf ("\033[33m%s\033[0m %02x %02x\n",
2072 "/** 0110 0001 0101 0reg and %0, %1 */",
2074 printf (" reg = 0x%x\n", reg
);
2076 SYNTAX("and %0, %1");
2077 #line 308 "rl78-decode.opc"
2078 ID(and); DRB(reg
); SR(A
); Fz
;
2090 /** 0110 0001 0101 1rba and %0, %1 */
2091 #line 305 "rl78-decode.opc"
2092 int rba AU
= op
[1] & 0x07;
2095 printf ("\033[33m%s\033[0m %02x %02x\n",
2096 "/** 0110 0001 0101 1rba and %0, %1 */",
2098 printf (" rba = 0x%x\n", rba
);
2100 SYNTAX("and %0, %1");
2101 #line 305 "rl78-decode.opc"
2102 ID(and); DR(A
); SRB(rba
); Fz
;
2108 /** 0110 0001 0101 1001 inc %ea0 */
2111 printf ("\033[33m%s\033[0m %02x %02x\n",
2112 "/** 0110 0001 0101 1001 inc %ea0 */",
2116 #line 586 "rl78-decode.opc"
2117 ID(add
); DM(HL
, IMMU(1)); SC(1); Fza
;
2130 /** 0110 0001 0110 0reg or %0, %1 */
2131 #line 963 "rl78-decode.opc"
2132 int reg AU
= op
[1] & 0x07;
2135 printf ("\033[33m%s\033[0m %02x %02x\n",
2136 "/** 0110 0001 0110 0reg or %0, %1 */",
2138 printf (" reg = 0x%x\n", reg
);
2140 SYNTAX("or %0, %1");
2141 #line 963 "rl78-decode.opc"
2142 ID(or); DRB(reg
); SR(A
); Fz
;
2154 /** 0110 0001 0110 1rba or %0, %1 */
2155 #line 960 "rl78-decode.opc"
2156 int rba AU
= op
[1] & 0x07;
2159 printf ("\033[33m%s\033[0m %02x %02x\n",
2160 "/** 0110 0001 0110 1rba or %0, %1 */",
2162 printf (" rba = 0x%x\n", rba
);
2164 SYNTAX("or %0, %1");
2165 #line 960 "rl78-decode.opc"
2166 ID(or); DR(A
); SRB(rba
); Fz
;
2172 /** 0110 0001 0110 1001 dec %ea0 */
2175 printf ("\033[33m%s\033[0m %02x %02x\n",
2176 "/** 0110 0001 0110 1001 dec %ea0 */",
2180 #line 553 "rl78-decode.opc"
2181 ID(sub
); DM(HL
, IMMU(1)); SC(1); Fza
;
2194 /** 0110 0001 0111 0reg xor %0, %1 */
2195 #line 1267 "rl78-decode.opc"
2196 int reg AU
= op
[1] & 0x07;
2199 printf ("\033[33m%s\033[0m %02x %02x\n",
2200 "/** 0110 0001 0111 0reg xor %0, %1 */",
2202 printf (" reg = 0x%x\n", reg
);
2204 SYNTAX("xor %0, %1");
2205 #line 1267 "rl78-decode.opc"
2206 ID(xor); DRB(reg
); SR(A
); Fz
;
2218 /** 0110 0001 0111 1rba xor %0, %1 */
2219 #line 1264 "rl78-decode.opc"
2220 int rba AU
= op
[1] & 0x07;
2223 printf ("\033[33m%s\033[0m %02x %02x\n",
2224 "/** 0110 0001 0111 1rba xor %0, %1 */",
2226 printf (" rba = 0x%x\n", rba
);
2228 SYNTAX("xor %0, %1");
2229 #line 1264 "rl78-decode.opc"
2230 ID(xor); DR(A
); SRB(rba
); Fz
;
2236 /** 0110 0001 0111 1001 incw %ea0 */
2239 printf ("\033[33m%s\033[0m %02x %02x\n",
2240 "/** 0110 0001 0111 1001 incw %ea0 */",
2243 SYNTAX("incw %ea0");
2244 #line 600 "rl78-decode.opc"
2245 ID(add
); W(); DM(HL
, IMMU(1)); SC(1);
2252 /** 0110 0001 1000 000 add %0, %e1 */
2255 printf ("\033[33m%s\033[0m %02x %02x\n",
2256 "/** 0110 0001 1000 000 add %0, %e1 */",
2259 SYNTAX("add %0, %e1");
2260 #line 209 "rl78-decode.opc"
2261 ID(add
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2267 /** 0110 0001 1000 0010 add %0, %e1 */
2270 printf ("\033[33m%s\033[0m %02x %02x\n",
2271 "/** 0110 0001 1000 0010 add %0, %e1 */",
2274 SYNTAX("add %0, %e1");
2275 #line 215 "rl78-decode.opc"
2276 ID(add
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2313 /** 0110 0001 1nnn 01mm callt [%x0] */
2314 #line 435 "rl78-decode.opc"
2315 int nnn AU
= (op
[1] >> 4) & 0x07;
2316 #line 435 "rl78-decode.opc"
2317 int mm AU
= op
[1] & 0x03;
2320 printf ("\033[33m%s\033[0m %02x %02x\n",
2321 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2323 printf (" nnn = 0x%x,", nnn
);
2324 printf (" mm = 0x%x\n", mm
);
2326 SYNTAX("callt [%x0]");
2327 #line 435 "rl78-decode.opc"
2328 ID(call
); DM(None
, 0x80 + mm
*16 + nnn
*2);
2330 /*----------------------------------------------------------------------*/
2342 /** 0110 0001 1000 1reg xch %0, %1 */
2343 #line 1226 "rl78-decode.opc"
2344 int reg AU
= op
[1] & 0x07;
2347 printf ("\033[33m%s\033[0m %02x %02x\n",
2348 "/** 0110 0001 1000 1reg xch %0, %1 */",
2350 printf (" reg = 0x%x\n", reg
);
2352 SYNTAX("xch %0, %1");
2353 #line 1226 "rl78-decode.opc"
2354 /* Note: DECW uses reg == X, so this must follow DECW */
2355 ID(xch
); DR(A
); SRB(reg
);
2361 /** 0110 0001 1000 1001 decw %ea0 */
2364 printf ("\033[33m%s\033[0m %02x %02x\n",
2365 "/** 0110 0001 1000 1001 decw %ea0 */",
2368 SYNTAX("decw %ea0");
2369 #line 567 "rl78-decode.opc"
2370 ID(sub
); W(); DM(HL
, IMMU(1)); SC(1);
2376 /** 0110 0001 1001 0000 addc %0, %e1 */
2379 printf ("\033[33m%s\033[0m %02x %02x\n",
2380 "/** 0110 0001 1001 0000 addc %0, %e1 */",
2383 SYNTAX("addc %0, %e1");
2384 #line 241 "rl78-decode.opc"
2385 ID(addc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2391 /** 0110 0001 1001 0010 addc %0, %e1 */
2394 printf ("\033[33m%s\033[0m %02x %02x\n",
2395 "/** 0110 0001 1001 0010 addc %0, %e1 */",
2398 SYNTAX("addc %0, %e1");
2399 #line 244 "rl78-decode.opc"
2400 ID(addc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2407 /** 0110 0001 1010 000 sub %0, %e1 */
2410 printf ("\033[33m%s\033[0m %02x %02x\n",
2411 "/** 0110 0001 1010 000 sub %0, %e1 */",
2414 SYNTAX("sub %0, %e1");
2415 #line 1127 "rl78-decode.opc"
2416 ID(sub
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2422 /** 0110 0001 1010 0010 sub %0, %e1 */
2425 printf ("\033[33m%s\033[0m %02x %02x\n",
2426 "/** 0110 0001 1010 0010 sub %0, %e1 */",
2429 SYNTAX("sub %0, %e1");
2430 #line 1133 "rl78-decode.opc"
2431 ID(sub
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2437 /** 0110 0001 1010 1000 xch %0, %1 */
2440 printf ("\033[33m%s\033[0m %02x %02x\n",
2441 "/** 0110 0001 1010 1000 xch %0, %1 */",
2444 SYNTAX("xch %0, %1");
2445 #line 1230 "rl78-decode.opc"
2446 ID(xch
); DR(A
); SM(None
, SADDR
);
2452 /** 0110 0001 1010 1001 xch %0, %e1 */
2455 printf ("\033[33m%s\033[0m %02x %02x\n",
2456 "/** 0110 0001 1010 1001 xch %0, %e1 */",
2459 SYNTAX("xch %0, %e1");
2460 #line 1223 "rl78-decode.opc"
2461 ID(xch
); DR(A
); SM2(HL
, C
, 0);
2467 /** 0110 0001 1010 1010 xch %0, %e!1 */
2470 printf ("\033[33m%s\033[0m %02x %02x\n",
2471 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
2474 SYNTAX("xch %0, %e!1");
2475 #line 1205 "rl78-decode.opc"
2476 ID(xch
); DR(A
); SM(None
, IMMU(2));
2482 /** 0110 0001 1010 1011 xch %0, %s1 */
2485 printf ("\033[33m%s\033[0m %02x %02x\n",
2486 "/** 0110 0001 1010 1011 xch %0, %s1 */",
2489 SYNTAX("xch %0, %s1");
2490 #line 1233 "rl78-decode.opc"
2491 ID(xch
); DR(A
); SM(None
, SFR
);
2497 /** 0110 0001 1010 1100 xch %0, %e1 */
2500 printf ("\033[33m%s\033[0m %02x %02x\n",
2501 "/** 0110 0001 1010 1100 xch %0, %e1 */",
2504 SYNTAX("xch %0, %e1");
2505 #line 1214 "rl78-decode.opc"
2506 ID(xch
); DR(A
); SM(HL
, 0);
2512 /** 0110 0001 1010 1101 xch %0, %ea1 */
2515 printf ("\033[33m%s\033[0m %02x %02x\n",
2516 "/** 0110 0001 1010 1101 xch %0, %ea1 */",
2519 SYNTAX("xch %0, %ea1");
2520 #line 1220 "rl78-decode.opc"
2521 ID(xch
); DR(A
); SM(HL
, IMMU(1));
2527 /** 0110 0001 1010 1110 xch %0, %e1 */
2530 printf ("\033[33m%s\033[0m %02x %02x\n",
2531 "/** 0110 0001 1010 1110 xch %0, %e1 */",
2534 SYNTAX("xch %0, %e1");
2535 #line 1208 "rl78-decode.opc"
2536 ID(xch
); DR(A
); SM(DE
, 0);
2542 /** 0110 0001 1010 1111 xch %0, %ea1 */
2545 printf ("\033[33m%s\033[0m %02x %02x\n",
2546 "/** 0110 0001 1010 1111 xch %0, %ea1 */",
2549 SYNTAX("xch %0, %ea1");
2550 #line 1211 "rl78-decode.opc"
2551 ID(xch
); DR(A
); SM(DE
, IMMU(1));
2557 /** 0110 0001 1011 0000 subc %0, %e1 */
2560 printf ("\033[33m%s\033[0m %02x %02x\n",
2561 "/** 0110 0001 1011 0000 subc %0, %e1 */",
2564 SYNTAX("subc %0, %e1");
2565 #line 1159 "rl78-decode.opc"
2566 ID(subc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2572 /** 0110 0001 1011 0010 subc %0, %e1 */
2575 printf ("\033[33m%s\033[0m %02x %02x\n",
2576 "/** 0110 0001 1011 0010 subc %0, %e1 */",
2579 SYNTAX("subc %0, %e1");
2580 #line 1162 "rl78-decode.opc"
2581 ID(subc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2587 /** 0110 0001 1011 1000 mov %0, %1 */
2590 printf ("\033[33m%s\033[0m %02x %02x\n",
2591 "/** 0110 0001 1011 1000 mov %0, %1 */",
2594 SYNTAX("mov %0, %1");
2595 #line 725 "rl78-decode.opc"
2596 ID(mov
); DR(ES
); SM(None
, SADDR
);
2602 /** 0110 0001 1011 1001 xch %0, %e1 */
2605 printf ("\033[33m%s\033[0m %02x %02x\n",
2606 "/** 0110 0001 1011 1001 xch %0, %e1 */",
2609 SYNTAX("xch %0, %e1");
2610 #line 1217 "rl78-decode.opc"
2611 ID(xch
); DR(A
); SM2(HL
, B
, 0);
2617 /** 0110 0001 1100 0000 cmp %0, %e1 */
2620 printf ("\033[33m%s\033[0m %02x %02x\n",
2621 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
2624 SYNTAX("cmp %0, %e1");
2625 #line 494 "rl78-decode.opc"
2626 ID(cmp
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2632 /** 0110 0001 1100 0010 cmp %0, %e1 */
2635 printf ("\033[33m%s\033[0m %02x %02x\n",
2636 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
2639 SYNTAX("cmp %0, %e1");
2640 #line 497 "rl78-decode.opc"
2641 ID(cmp
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2647 /** 0110 0001 1100 0011 bh $%a0 */
2650 printf ("\033[33m%s\033[0m %02x %02x\n",
2651 "/** 0110 0001 1100 0011 bh $%a0 */",
2655 #line 342 "rl78-decode.opc"
2656 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(H
);
2662 /** 0110 0001 1100 1000 sk%c1 */
2665 printf ("\033[33m%s\033[0m %02x %02x\n",
2666 "/** 0110 0001 1100 1000 sk%c1 */",
2670 #line 1096 "rl78-decode.opc"
2677 /** 0110 0001 1100 1001 mov %0, %e1 */
2680 printf ("\033[33m%s\033[0m %02x %02x\n",
2681 "/** 0110 0001 1100 1001 mov %0, %e1 */",
2684 SYNTAX("mov %0, %e1");
2685 #line 662 "rl78-decode.opc"
2686 ID(mov
); DR(A
); SM2(HL
, B
, 0);
2695 /** 0110 0001 11rg 1010 call %0 */
2696 #line 432 "rl78-decode.opc"
2697 int rg AU
= (op
[1] >> 4) & 0x03;
2700 printf ("\033[33m%s\033[0m %02x %02x\n",
2701 "/** 0110 0001 11rg 1010 call %0 */",
2703 printf (" rg = 0x%x\n", rg
);
2706 #line 432 "rl78-decode.opc"
2713 /** 0110 0001 1100 1011 br ax */
2716 printf ("\033[33m%s\033[0m %02x %02x\n",
2717 "/** 0110 0001 1100 1011 br ax */",
2721 #line 382 "rl78-decode.opc"
2724 /*----------------------------------------------------------------------*/
2730 /** 0110 0001 1100 1100 brk */
2733 printf ("\033[33m%s\033[0m %02x %02x\n",
2734 "/** 0110 0001 1100 1100 brk */",
2738 #line 390 "rl78-decode.opc"
2741 /*----------------------------------------------------------------------*/
2747 /** 0110 0001 1100 1101 pop %s0 */
2750 printf ("\033[33m%s\033[0m %02x %02x\n",
2751 "/** 0110 0001 1100 1101 pop %s0 */",
2755 #line 991 "rl78-decode.opc"
2756 ID(mov
); W(); DR(PSW
); SPOP();
2758 /*----------------------------------------------------------------------*/
2764 /** 0110 0001 1100 1110 movs %ea0, %1 */
2767 printf ("\033[33m%s\033[0m %02x %02x\n",
2768 "/** 0110 0001 1100 1110 movs %ea0, %1 */",
2771 SYNTAX("movs %ea0, %1");
2772 #line 813 "rl78-decode.opc"
2773 ID(mov
); DM(HL
, IMMU(1)); SR(X
); Fzc
;
2775 /*----------------------------------------------------------------------*/
2784 /** 0110 0001 11rb 1111 sel rb%1 */
2785 #line 1043 "rl78-decode.opc"
2786 int rb AU
= (op
[1] >> 4) & 0x03;
2789 printf ("\033[33m%s\033[0m %02x %02x\n",
2790 "/** 0110 0001 11rb 1111 sel rb%1 */",
2792 printf (" rb = 0x%x\n", rb
);
2795 #line 1043 "rl78-decode.opc"
2798 /*----------------------------------------------------------------------*/
2804 /** 0110 0001 1101 0000 and %0, %e1 */
2807 printf ("\033[33m%s\033[0m %02x %02x\n",
2808 "/** 0110 0001 1101 0000 and %0, %e1 */",
2811 SYNTAX("and %0, %e1");
2812 #line 293 "rl78-decode.opc"
2813 ID(and); DR(A
); SM2(HL
, B
, 0); Fz
;
2819 /** 0110 0001 1101 0010 and %0, %e1 */
2822 printf ("\033[33m%s\033[0m %02x %02x\n",
2823 "/** 0110 0001 1101 0010 and %0, %e1 */",
2826 SYNTAX("and %0, %e1");
2827 #line 299 "rl78-decode.opc"
2828 ID(and); DR(A
); SM2(HL
, C
, 0); Fz
;
2834 /** 0110 0001 1101 0011 bnh $%a0 */
2837 printf ("\033[33m%s\033[0m %02x %02x\n",
2838 "/** 0110 0001 1101 0011 bnh $%a0 */",
2842 #line 345 "rl78-decode.opc"
2843 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(NH
);
2849 /** 0110 0001 1101 1000 sk%c1 */
2852 printf ("\033[33m%s\033[0m %02x %02x\n",
2853 "/** 0110 0001 1101 1000 sk%c1 */",
2857 #line 1102 "rl78-decode.opc"
2864 /** 0110 0001 1101 1001 mov %e0, %1 */
2867 printf ("\033[33m%s\033[0m %02x %02x\n",
2868 "/** 0110 0001 1101 1001 mov %e0, %1 */",
2871 SYNTAX("mov %e0, %1");
2872 #line 629 "rl78-decode.opc"
2873 ID(mov
); DM2(HL
, B
, 0); SR(A
);
2879 /** 0110 0001 1101 1011 ror %0, %1 */
2882 printf ("\033[33m%s\033[0m %02x %02x\n",
2883 "/** 0110 0001 1101 1011 ror %0, %1 */",
2886 SYNTAX("ror %0, %1");
2887 #line 1024 "rl78-decode.opc"
2888 ID(ror
); DR(A
); SC(1);
2894 /** 0110 0001 1101 1100 rolc %0, %1 */
2897 printf ("\033[33m%s\033[0m %02x %02x\n",
2898 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2901 SYNTAX("rolc %0, %1");
2902 #line 1018 "rl78-decode.opc"
2903 ID(rolc
); DR(A
); SC(1);
2909 /** 0110 0001 1101 1101 push %s1 */
2912 printf ("\033[33m%s\033[0m %02x %02x\n",
2913 "/** 0110 0001 1101 1101 push %s1 */",
2917 #line 999 "rl78-decode.opc"
2918 ID(mov
); W(); DPUSH(); SR(PSW
);
2920 /*----------------------------------------------------------------------*/
2926 /** 0110 0001 1101 1110 cmps %0, %ea1 */
2929 printf ("\033[33m%s\033[0m %02x %02x\n",
2930 "/** 0110 0001 1101 1110 cmps %0, %ea1 */",
2933 SYNTAX("cmps %0, %ea1");
2934 #line 528 "rl78-decode.opc"
2935 ID(cmp
); DR(X
); SM(HL
, IMMU(1)); Fzac
;
2937 /*----------------------------------------------------------------------*/
2943 /** 0110 0001 1110 0000 or %0, %e1 */
2946 printf ("\033[33m%s\033[0m %02x %02x\n",
2947 "/** 0110 0001 1110 0000 or %0, %e1 */",
2950 SYNTAX("or %0, %e1");
2951 #line 948 "rl78-decode.opc"
2952 ID(or); DR(A
); SM2(HL
, B
, 0); Fz
;
2958 /** 0110 0001 1110 0010 or %0, %e1 */
2961 printf ("\033[33m%s\033[0m %02x %02x\n",
2962 "/** 0110 0001 1110 0010 or %0, %e1 */",
2965 SYNTAX("or %0, %e1");
2966 #line 954 "rl78-decode.opc"
2967 ID(or); DR(A
); SM2(HL
, C
, 0); Fz
;
2973 /** 0110 0001 1110 0011 sk%c1 */
2976 printf ("\033[33m%s\033[0m %02x %02x\n",
2977 "/** 0110 0001 1110 0011 sk%c1 */",
2981 #line 1099 "rl78-decode.opc"
2988 /** 0110 0001 1110 1000 sk%c1 */
2991 printf ("\033[33m%s\033[0m %02x %02x\n",
2992 "/** 0110 0001 1110 1000 sk%c1 */",
2996 #line 1111 "rl78-decode.opc"
2999 /*----------------------------------------------------------------------*/
3005 /** 0110 0001 1110 1001 mov %0, %e1 */
3008 printf ("\033[33m%s\033[0m %02x %02x\n",
3009 "/** 0110 0001 1110 1001 mov %0, %e1 */",
3012 SYNTAX("mov %0, %e1");
3013 #line 665 "rl78-decode.opc"
3014 ID(mov
); DR(A
); SM2(HL
, C
, 0);
3020 /** 0110 0001 1110 1011 rol %0, %1 */
3023 printf ("\033[33m%s\033[0m %02x %02x\n",
3024 "/** 0110 0001 1110 1011 rol %0, %1 */",
3027 SYNTAX("rol %0, %1");
3028 #line 1015 "rl78-decode.opc"
3029 ID(rol
); DR(A
); SC(1);
3035 /** 0110 0001 1110 1100 retb */
3038 printf ("\033[33m%s\033[0m %02x %02x\n",
3039 "/** 0110 0001 1110 1100 retb */",
3043 #line 1010 "rl78-decode.opc"
3046 /*----------------------------------------------------------------------*/
3052 /** 0110 0001 1110 1101 halt */
3055 printf ("\033[33m%s\033[0m %02x %02x\n",
3056 "/** 0110 0001 1110 1101 halt */",
3060 #line 578 "rl78-decode.opc"
3063 /*----------------------------------------------------------------------*/
3070 /** 0110 0001 111r 1110 rolwc %0, %1 */
3071 #line 1021 "rl78-decode.opc"
3072 int r AU
= (op
[1] >> 4) & 0x01;
3075 printf ("\033[33m%s\033[0m %02x %02x\n",
3076 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3078 printf (" r = 0x%x\n", r
);
3080 SYNTAX("rolwc %0, %1");
3081 #line 1021 "rl78-decode.opc"
3082 ID(rolc
); W(); DRW(r
); SC(1);
3088 /** 0110 0001 1111 0000 xor %0, %e1 */
3091 printf ("\033[33m%s\033[0m %02x %02x\n",
3092 "/** 0110 0001 1111 0000 xor %0, %e1 */",
3095 SYNTAX("xor %0, %e1");
3096 #line 1252 "rl78-decode.opc"
3097 ID(xor); DR(A
); SM2(HL
, B
, 0); Fz
;
3103 /** 0110 0001 1111 0010 xor %0, %e1 */
3106 printf ("\033[33m%s\033[0m %02x %02x\n",
3107 "/** 0110 0001 1111 0010 xor %0, %e1 */",
3110 SYNTAX("xor %0, %e1");
3111 #line 1258 "rl78-decode.opc"
3112 ID(xor); DR(A
); SM2(HL
, C
, 0); Fz
;
3118 /** 0110 0001 1111 0011 sk%c1 */
3121 printf ("\033[33m%s\033[0m %02x %02x\n",
3122 "/** 0110 0001 1111 0011 sk%c1 */",
3126 #line 1105 "rl78-decode.opc"
3133 /** 0110 0001 1111 1000 sk%c1 */
3136 printf ("\033[33m%s\033[0m %02x %02x\n",
3137 "/** 0110 0001 1111 1000 sk%c1 */",
3141 #line 1108 "rl78-decode.opc"
3148 /** 0110 0001 1111 1001 mov %e0, %1 */
3151 printf ("\033[33m%s\033[0m %02x %02x\n",
3152 "/** 0110 0001 1111 1001 mov %e0, %1 */",
3155 SYNTAX("mov %e0, %1");
3156 #line 638 "rl78-decode.opc"
3157 ID(mov
); DM2(HL
, C
, 0); SR(A
);
3163 /** 0110 0001 1111 1011 rorc %0, %1 */
3166 printf ("\033[33m%s\033[0m %02x %02x\n",
3167 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3170 SYNTAX("rorc %0, %1");
3171 #line 1027 "rl78-decode.opc"
3172 ID(rorc
); DR(A
); SC(1);
3174 /*----------------------------------------------------------------------*/
3176 /* Note that the branch insns need to be listed before the shift
3177 ones, as "shift count of zero" means "branch insn" */
3183 /** 0110 0001 1111 1100 reti */
3186 printf ("\033[33m%s\033[0m %02x %02x\n",
3187 "/** 0110 0001 1111 1100 reti */",
3191 #line 1007 "rl78-decode.opc"
3198 /** 0110 0001 1111 1101 stop */
3201 printf ("\033[33m%s\033[0m %02x %02x\n",
3202 "/** 0110 0001 1111 1101 stop */",
3206 #line 1116 "rl78-decode.opc"
3209 /*----------------------------------------------------------------------*/
3213 default: UNSUPPORTED(); break;
3218 /** 0110 1000 movw %e0, %1 */
3221 printf ("\033[33m%s\033[0m %02x\n",
3222 "/** 0110 1000 movw %e0, %1 */",
3225 SYNTAX("movw %e0, %1");
3226 #line 876 "rl78-decode.opc"
3227 ID(mov
); W(); DM(C
, IMMU(2)); SR(AX
);
3233 /** 0110 1001 movw %0, %e1 */
3236 printf ("\033[33m%s\033[0m %02x\n",
3237 "/** 0110 1001 movw %0, %e1 */",
3240 SYNTAX("movw %0, %e1");
3241 #line 867 "rl78-decode.opc"
3242 ID(mov
); W(); DR(AX
); SM(C
, IMMU(2));
3248 /** 0110 1010 or %0, #%1 */
3251 printf ("\033[33m%s\033[0m %02x\n",
3252 "/** 0110 1010 or %0, #%1 */",
3255 SYNTAX("or %0, #%1");
3256 #line 969 "rl78-decode.opc"
3257 ID(or); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
3259 /*----------------------------------------------------------------------*/
3265 /** 0110 1011 or %0, %1 */
3268 printf ("\033[33m%s\033[0m %02x\n",
3269 "/** 0110 1011 or %0, %1 */",
3272 SYNTAX("or %0, %1");
3273 #line 966 "rl78-decode.opc"
3274 ID(or); DR(A
); SM(None
, SADDR
); Fz
;
3280 /** 0110 1100 or %0, #%1 */
3283 printf ("\033[33m%s\033[0m %02x\n",
3284 "/** 0110 1100 or %0, #%1 */",
3287 SYNTAX("or %0, #%1");
3288 #line 957 "rl78-decode.opc"
3289 ID(or); DR(A
); SC(IMMU(1)); Fz
;
3295 /** 0110 1101 or %0, %e1 */
3298 printf ("\033[33m%s\033[0m %02x\n",
3299 "/** 0110 1101 or %0, %e1 */",
3302 SYNTAX("or %0, %e1");
3303 #line 945 "rl78-decode.opc"
3304 ID(or); DR(A
); SM(HL
, 0); Fz
;
3310 /** 0110 1110 or %0, %ea1 */
3313 printf ("\033[33m%s\033[0m %02x\n",
3314 "/** 0110 1110 or %0, %ea1 */",
3317 SYNTAX("or %0, %ea1");
3318 #line 951 "rl78-decode.opc"
3319 ID(or); DR(A
); SM(HL
, IMMU(1)); Fz
;
3325 /** 0110 1111 or %0, %e!1 */
3328 printf ("\033[33m%s\033[0m %02x\n",
3329 "/** 0110 1111 or %0, %e!1 */",
3332 SYNTAX("or %0, %e!1");
3333 #line 942 "rl78-decode.opc"
3334 ID(or); DR(A
); SM(None
, IMMU(2)); Fz
;
3346 /** 0111 0rba mov %0, %1 */
3347 #line 698 "rl78-decode.opc"
3348 int rba AU
= op
[0] & 0x07;
3351 printf ("\033[33m%s\033[0m %02x\n",
3352 "/** 0111 0rba mov %0, %1 */",
3354 printf (" rba = 0x%x\n", rba
);
3356 SYNTAX("mov %0, %1");
3357 #line 698 "rl78-decode.opc"
3358 ID(mov
); DRB(rba
); SR(A
);
3364 switch (op
[1] & 0xff)
3375 /** 0111 0001 0bit 0000 set1 %e!0 */
3376 #line 1048 "rl78-decode.opc"
3377 int bit AU
= (op
[1] >> 4) & 0x07;
3380 printf ("\033[33m%s\033[0m %02x %02x\n",
3381 "/** 0111 0001 0bit 0000 set1 %e!0 */",
3383 printf (" bit = 0x%x\n", bit
);
3385 SYNTAX("set1 %e!0");
3386 #line 1048 "rl78-decode.opc"
3387 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(1);
3400 /** 0111 0001 0bit 0001 mov1 %0, cy */
3401 #line 805 "rl78-decode.opc"
3402 int bit AU
= (op
[1] >> 4) & 0x07;
3405 printf ("\033[33m%s\033[0m %02x %02x\n",
3406 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3408 printf (" bit = 0x%x\n", bit
);
3410 SYNTAX("mov1 %0, cy");
3411 #line 805 "rl78-decode.opc"
3412 ID(mov
); DM(None
, SADDR
); DB(bit
); SCY();
3425 /** 0111 0001 0bit 0010 set1 %0 */
3426 #line 1066 "rl78-decode.opc"
3427 int bit AU
= (op
[1] >> 4) & 0x07;
3430 printf ("\033[33m%s\033[0m %02x %02x\n",
3431 "/** 0111 0001 0bit 0010 set1 %0 */",
3433 printf (" bit = 0x%x\n", bit
);
3436 #line 1066 "rl78-decode.opc"
3437 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(1);
3439 /*----------------------------------------------------------------------*/
3452 /** 0111 0001 0bit 0011 clr1 %0 */
3453 #line 458 "rl78-decode.opc"
3454 int bit AU
= (op
[1] >> 4) & 0x07;
3457 printf ("\033[33m%s\033[0m %02x %02x\n",
3458 "/** 0111 0001 0bit 0011 clr1 %0 */",
3460 printf (" bit = 0x%x\n", bit
);
3463 #line 458 "rl78-decode.opc"
3464 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(0);
3466 /*----------------------------------------------------------------------*/
3479 /** 0111 0001 0bit 0100 mov1 cy, %1 */
3480 #line 799 "rl78-decode.opc"
3481 int bit AU
= (op
[1] >> 4) & 0x07;
3484 printf ("\033[33m%s\033[0m %02x %02x\n",
3485 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3487 printf (" bit = 0x%x\n", bit
);
3489 SYNTAX("mov1 cy, %1");
3490 #line 799 "rl78-decode.opc"
3491 ID(mov
); DCY(); SM(None
, SADDR
); SB(bit
);
3504 /** 0111 0001 0bit 0101 and1 cy, %s1 */
3505 #line 328 "rl78-decode.opc"
3506 int bit AU
= (op
[1] >> 4) & 0x07;
3509 printf ("\033[33m%s\033[0m %02x %02x\n",
3510 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3512 printf (" bit = 0x%x\n", bit
);
3514 SYNTAX("and1 cy, %s1");
3515 #line 328 "rl78-decode.opc"
3516 ID(and); DCY(); SM(None
, SADDR
); SB(bit
);
3518 /*----------------------------------------------------------------------*/
3520 /* Note that the branch insns need to be listed before the shift
3521 ones, as "shift count of zero" means "branch insn" */
3534 /** 0111 0001 0bit 0110 or1 cy, %s1 */
3535 #line 983 "rl78-decode.opc"
3536 int bit AU
= (op
[1] >> 4) & 0x07;
3539 printf ("\033[33m%s\033[0m %02x %02x\n",
3540 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3542 printf (" bit = 0x%x\n", bit
);
3544 SYNTAX("or1 cy, %s1");
3545 #line 983 "rl78-decode.opc"
3546 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3548 /*----------------------------------------------------------------------*/
3561 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3562 #line 1287 "rl78-decode.opc"
3563 int bit AU
= (op
[1] >> 4) & 0x07;
3566 printf ("\033[33m%s\033[0m %02x %02x\n",
3567 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3569 printf (" bit = 0x%x\n", bit
);
3571 SYNTAX("xor1 cy, %s1");
3572 #line 1287 "rl78-decode.opc"
3573 ID(xor); DCY(); SM(None
, SADDR
); SB(bit
);
3575 /*----------------------------------------------------------------------*/
3588 /** 0111 0001 0bit 1000 clr1 %e!0 */
3589 #line 440 "rl78-decode.opc"
3590 int bit AU
= (op
[1] >> 4) & 0x07;
3593 printf ("\033[33m%s\033[0m %02x %02x\n",
3594 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
3596 printf (" bit = 0x%x\n", bit
);
3598 SYNTAX("clr1 %e!0");
3599 #line 440 "rl78-decode.opc"
3600 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(0);
3613 /** 0111 0001 0bit 1001 mov1 %s0, cy */
3614 #line 808 "rl78-decode.opc"
3615 int bit AU
= (op
[1] >> 4) & 0x07;
3618 printf ("\033[33m%s\033[0m %02x %02x\n",
3619 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3621 printf (" bit = 0x%x\n", bit
);
3623 SYNTAX("mov1 %s0, cy");
3624 #line 808 "rl78-decode.opc"
3625 ID(mov
); DM(None
, SFR
); DB(bit
); SCY();
3627 /*----------------------------------------------------------------------*/
3640 /** 0111 0001 0bit 1010 set1 %s0 */
3641 #line 1060 "rl78-decode.opc"
3642 int bit AU
= (op
[1] >> 4) & 0x07;
3645 printf ("\033[33m%s\033[0m %02x %02x\n",
3646 "/** 0111 0001 0bit 1010 set1 %s0 */",
3648 printf (" bit = 0x%x\n", bit
);
3651 #line 1060 "rl78-decode.opc"
3653 ID(mov
); DM(None
, op0
); DB(bit
); SC(1);
3654 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3655 rl78
->syntax
= "ei";
3668 /** 0111 0001 0bit 1011 clr1 %s0 */
3669 #line 452 "rl78-decode.opc"
3670 int bit AU
= (op
[1] >> 4) & 0x07;
3673 printf ("\033[33m%s\033[0m %02x %02x\n",
3674 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3676 printf (" bit = 0x%x\n", bit
);
3679 #line 452 "rl78-decode.opc"
3681 ID(mov
); DM(None
, op0
); DB(bit
); SC(0);
3682 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3683 rl78
->syntax
= "di";
3696 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
3697 #line 802 "rl78-decode.opc"
3698 int bit AU
= (op
[1] >> 4) & 0x07;
3701 printf ("\033[33m%s\033[0m %02x %02x\n",
3702 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3704 printf (" bit = 0x%x\n", bit
);
3706 SYNTAX("mov1 cy, %s1");
3707 #line 802 "rl78-decode.opc"
3708 ID(mov
); DCY(); SM(None
, SFR
); SB(bit
);
3721 /** 0111 0001 0bit 1101 and1 cy, %s1 */
3722 #line 325 "rl78-decode.opc"
3723 int bit AU
= (op
[1] >> 4) & 0x07;
3726 printf ("\033[33m%s\033[0m %02x %02x\n",
3727 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3729 printf (" bit = 0x%x\n", bit
);
3731 SYNTAX("and1 cy, %s1");
3732 #line 325 "rl78-decode.opc"
3733 ID(and); DCY(); SM(None
, SFR
); SB(bit
);
3746 /** 0111 0001 0bit 1110 or1 cy, %s1 */
3747 #line 980 "rl78-decode.opc"
3748 int bit AU
= (op
[1] >> 4) & 0x07;
3751 printf ("\033[33m%s\033[0m %02x %02x\n",
3752 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3754 printf (" bit = 0x%x\n", bit
);
3756 SYNTAX("or1 cy, %s1");
3757 #line 980 "rl78-decode.opc"
3758 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3771 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3772 #line 1284 "rl78-decode.opc"
3773 int bit AU
= (op
[1] >> 4) & 0x07;
3776 printf ("\033[33m%s\033[0m %02x %02x\n",
3777 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3779 printf (" bit = 0x%x\n", bit
);
3781 SYNTAX("xor1 cy, %s1");
3782 #line 1284 "rl78-decode.opc"
3783 ID(xor); DCY(); SM(None
, SFR
); SB(bit
);
3789 /** 0111 0001 1000 0000 set1 cy */
3792 printf ("\033[33m%s\033[0m %02x %02x\n",
3793 "/** 0111 0001 1000 0000 set1 cy */",
3797 #line 1057 "rl78-decode.opc"
3798 ID(mov
); DCY(); SC(1);
3811 /** 0111 0001 1bit 0001 mov1 %e0, cy */
3812 #line 787 "rl78-decode.opc"
3813 int bit AU
= (op
[1] >> 4) & 0x07;
3816 printf ("\033[33m%s\033[0m %02x %02x\n",
3817 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
3819 printf (" bit = 0x%x\n", bit
);
3821 SYNTAX("mov1 %e0, cy");
3822 #line 787 "rl78-decode.opc"
3823 ID(mov
); DM(HL
, 0); DB(bit
); SCY();
3836 /** 0111 0001 1bit 0010 set1 %e0 */
3837 #line 1051 "rl78-decode.opc"
3838 int bit AU
= (op
[1] >> 4) & 0x07;
3841 printf ("\033[33m%s\033[0m %02x %02x\n",
3842 "/** 0111 0001 1bit 0010 set1 %e0 */",
3844 printf (" bit = 0x%x\n", bit
);
3847 #line 1051 "rl78-decode.opc"
3848 ID(mov
); DM(HL
, 0); DB(bit
); SC(1);
3861 /** 0111 0001 1bit 0011 clr1 %e0 */
3862 #line 443 "rl78-decode.opc"
3863 int bit AU
= (op
[1] >> 4) & 0x07;
3866 printf ("\033[33m%s\033[0m %02x %02x\n",
3867 "/** 0111 0001 1bit 0011 clr1 %e0 */",
3869 printf (" bit = 0x%x\n", bit
);
3872 #line 443 "rl78-decode.opc"
3873 ID(mov
); DM(HL
, 0); DB(bit
); SC(0);
3886 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
3887 #line 793 "rl78-decode.opc"
3888 int bit AU
= (op
[1] >> 4) & 0x07;
3891 printf ("\033[33m%s\033[0m %02x %02x\n",
3892 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
3894 printf (" bit = 0x%x\n", bit
);
3896 SYNTAX("mov1 cy, %e1");
3897 #line 793 "rl78-decode.opc"
3898 ID(mov
); DCY(); SM(HL
, 0); SB(bit
);
3911 /** 0111 0001 1bit 0101 and1 cy, %e1 */
3912 #line 319 "rl78-decode.opc"
3913 int bit AU
= (op
[1] >> 4) & 0x07;
3916 printf ("\033[33m%s\033[0m %02x %02x\n",
3917 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
3919 printf (" bit = 0x%x\n", bit
);
3921 SYNTAX("and1 cy, %e1");
3922 #line 319 "rl78-decode.opc"
3923 ID(and); DCY(); SM(HL
, 0); SB(bit
);
3936 /** 0111 0001 1bit 0110 or1 cy, %e1 */
3937 #line 974 "rl78-decode.opc"
3938 int bit AU
= (op
[1] >> 4) & 0x07;
3941 printf ("\033[33m%s\033[0m %02x %02x\n",
3942 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
3944 printf (" bit = 0x%x\n", bit
);
3946 SYNTAX("or1 cy, %e1");
3947 #line 974 "rl78-decode.opc"
3948 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3961 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
3962 #line 1278 "rl78-decode.opc"
3963 int bit AU
= (op
[1] >> 4) & 0x07;
3966 printf ("\033[33m%s\033[0m %02x %02x\n",
3967 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
3969 printf (" bit = 0x%x\n", bit
);
3971 SYNTAX("xor1 cy, %e1");
3972 #line 1278 "rl78-decode.opc"
3973 ID(xor); DCY(); SM(HL
, 0); SB(bit
);
3979 /** 0111 0001 1000 1000 clr1 cy */
3982 printf ("\033[33m%s\033[0m %02x %02x\n",
3983 "/** 0111 0001 1000 1000 clr1 cy */",
3987 #line 449 "rl78-decode.opc"
3988 ID(mov
); DCY(); SC(0);
4001 /** 0111 0001 1bit 1001 mov1 %e0, cy */
4002 #line 790 "rl78-decode.opc"
4003 int bit AU
= (op
[1] >> 4) & 0x07;
4006 printf ("\033[33m%s\033[0m %02x %02x\n",
4007 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
4009 printf (" bit = 0x%x\n", bit
);
4011 SYNTAX("mov1 %e0, cy");
4012 #line 790 "rl78-decode.opc"
4013 ID(mov
); DR(A
); DB(bit
); SCY();
4026 /** 0111 0001 1bit 1010 set1 %0 */
4027 #line 1054 "rl78-decode.opc"
4028 int bit AU
= (op
[1] >> 4) & 0x07;
4031 printf ("\033[33m%s\033[0m %02x %02x\n",
4032 "/** 0111 0001 1bit 1010 set1 %0 */",
4034 printf (" bit = 0x%x\n", bit
);
4037 #line 1054 "rl78-decode.opc"
4038 ID(mov
); DR(A
); DB(bit
); SC(1);
4051 /** 0111 0001 1bit 1011 clr1 %0 */
4052 #line 446 "rl78-decode.opc"
4053 int bit AU
= (op
[1] >> 4) & 0x07;
4056 printf ("\033[33m%s\033[0m %02x %02x\n",
4057 "/** 0111 0001 1bit 1011 clr1 %0 */",
4059 printf (" bit = 0x%x\n", bit
);
4062 #line 446 "rl78-decode.opc"
4063 ID(mov
); DR(A
); DB(bit
); SC(0);
4076 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
4077 #line 796 "rl78-decode.opc"
4078 int bit AU
= (op
[1] >> 4) & 0x07;
4081 printf ("\033[33m%s\033[0m %02x %02x\n",
4082 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
4084 printf (" bit = 0x%x\n", bit
);
4086 SYNTAX("mov1 cy, %e1");
4087 #line 796 "rl78-decode.opc"
4088 ID(mov
); DCY(); SR(A
); SB(bit
);
4101 /** 0111 0001 1bit 1101 and1 cy, %1 */
4102 #line 322 "rl78-decode.opc"
4103 int bit AU
= (op
[1] >> 4) & 0x07;
4106 printf ("\033[33m%s\033[0m %02x %02x\n",
4107 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4109 printf (" bit = 0x%x\n", bit
);
4111 SYNTAX("and1 cy, %1");
4112 #line 322 "rl78-decode.opc"
4113 ID(and); DCY(); SR(A
); SB(bit
);
4126 /** 0111 0001 1bit 1110 or1 cy, %1 */
4127 #line 977 "rl78-decode.opc"
4128 int bit AU
= (op
[1] >> 4) & 0x07;
4131 printf ("\033[33m%s\033[0m %02x %02x\n",
4132 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4134 printf (" bit = 0x%x\n", bit
);
4136 SYNTAX("or1 cy, %1");
4137 #line 977 "rl78-decode.opc"
4138 ID(or); DCY(); SR(A
); SB(bit
);
4151 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4152 #line 1281 "rl78-decode.opc"
4153 int bit AU
= (op
[1] >> 4) & 0x07;
4156 printf ("\033[33m%s\033[0m %02x %02x\n",
4157 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4159 printf (" bit = 0x%x\n", bit
);
4161 SYNTAX("xor1 cy, %1");
4162 #line 1281 "rl78-decode.opc"
4163 ID(xor); DCY(); SR(A
); SB(bit
);
4169 /** 0111 0001 1100 0000 not1 cy */
4172 printf ("\033[33m%s\033[0m %02x %02x\n",
4173 "/** 0111 0001 1100 0000 not1 cy */",
4177 #line 918 "rl78-decode.opc"
4178 ID(xor); DCY(); SC(1);
4180 /*----------------------------------------------------------------------*/
4184 default: UNSUPPORTED(); break;
4189 /** 0111 1000 movw %e0, %1 */
4192 printf ("\033[33m%s\033[0m %02x\n",
4193 "/** 0111 1000 movw %e0, %1 */",
4196 SYNTAX("movw %e0, %1");
4197 #line 879 "rl78-decode.opc"
4198 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4204 /** 0111 1001 movw %0, %e1 */
4207 printf ("\033[33m%s\033[0m %02x\n",
4208 "/** 0111 1001 movw %0, %e1 */",
4211 SYNTAX("movw %0, %e1");
4212 #line 870 "rl78-decode.opc"
4213 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4219 /** 0111 1010 xor %0, #%1 */
4222 printf ("\033[33m%s\033[0m %02x\n",
4223 "/** 0111 1010 xor %0, #%1 */",
4226 SYNTAX("xor %0, #%1");
4227 #line 1273 "rl78-decode.opc"
4228 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4230 /*----------------------------------------------------------------------*/
4236 /** 0111 1011 xor %0, %1 */
4239 printf ("\033[33m%s\033[0m %02x\n",
4240 "/** 0111 1011 xor %0, %1 */",
4243 SYNTAX("xor %0, %1");
4244 #line 1270 "rl78-decode.opc"
4245 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4251 /** 0111 1100 xor %0, #%1 */
4254 printf ("\033[33m%s\033[0m %02x\n",
4255 "/** 0111 1100 xor %0, #%1 */",
4258 SYNTAX("xor %0, #%1");
4259 #line 1261 "rl78-decode.opc"
4260 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4266 /** 0111 1101 xor %0, %e1 */
4269 printf ("\033[33m%s\033[0m %02x\n",
4270 "/** 0111 1101 xor %0, %e1 */",
4273 SYNTAX("xor %0, %e1");
4274 #line 1249 "rl78-decode.opc"
4275 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4281 /** 0111 1110 xor %0, %ea1 */
4284 printf ("\033[33m%s\033[0m %02x\n",
4285 "/** 0111 1110 xor %0, %ea1 */",
4288 SYNTAX("xor %0, %ea1");
4289 #line 1255 "rl78-decode.opc"
4290 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4296 /** 0111 1111 xor %0, %e!1 */
4299 printf ("\033[33m%s\033[0m %02x\n",
4300 "/** 0111 1111 xor %0, %e!1 */",
4303 SYNTAX("xor %0, %e!1");
4304 #line 1246 "rl78-decode.opc"
4305 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4318 /** 1000 0reg inc %0 */
4319 #line 589 "rl78-decode.opc"
4320 int reg AU
= op
[0] & 0x07;
4323 printf ("\033[33m%s\033[0m %02x\n",
4324 "/** 1000 0reg inc %0 */",
4326 printf (" reg = 0x%x\n", reg
);
4329 #line 589 "rl78-decode.opc"
4330 ID(add
); DRB(reg
); SC(1); Fza
;
4336 /** 1000 1000 mov %0, %ea1 */
4339 printf ("\033[33m%s\033[0m %02x\n",
4340 "/** 1000 1000 mov %0, %ea1 */",
4343 SYNTAX("mov %0, %ea1");
4344 #line 668 "rl78-decode.opc"
4345 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4351 /** 1000 1001 mov %0, %e1 */
4354 printf ("\033[33m%s\033[0m %02x\n",
4355 "/** 1000 1001 mov %0, %e1 */",
4358 SYNTAX("mov %0, %e1");
4359 #line 650 "rl78-decode.opc"
4360 ID(mov
); DR(A
); SM(DE
, 0);
4366 /** 1000 1010 mov %0, %ea1 */
4369 printf ("\033[33m%s\033[0m %02x\n",
4370 "/** 1000 1010 mov %0, %ea1 */",
4373 SYNTAX("mov %0, %ea1");
4374 #line 653 "rl78-decode.opc"
4375 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4381 /** 1000 1011 mov %0, %e1 */
4384 printf ("\033[33m%s\033[0m %02x\n",
4385 "/** 1000 1011 mov %0, %e1 */",
4388 SYNTAX("mov %0, %e1");
4389 #line 656 "rl78-decode.opc"
4390 ID(mov
); DR(A
); SM(HL
, 0);
4396 /** 1000 1100 mov %0, %ea1 */
4399 printf ("\033[33m%s\033[0m %02x\n",
4400 "/** 1000 1100 mov %0, %ea1 */",
4403 SYNTAX("mov %0, %ea1");
4404 #line 659 "rl78-decode.opc"
4405 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4411 /** 1000 1101 mov %0, %1 */
4414 printf ("\033[33m%s\033[0m %02x\n",
4415 "/** 1000 1101 mov %0, %1 */",
4418 SYNTAX("mov %0, %1");
4419 #line 692 "rl78-decode.opc"
4420 ID(mov
); DR(A
); SM(None
, SADDR
);
4426 /** 1000 1110 mov %0, %s1 */
4429 printf ("\033[33m%s\033[0m %02x\n",
4430 "/** 1000 1110 mov %0, %s1 */",
4433 SYNTAX("mov %0, %s1");
4434 #line 689 "rl78-decode.opc"
4435 ID(mov
); DR(A
); SM(None
, SFR
);
4441 /** 1000 1111 mov %0, %e!1 */
4444 printf ("\033[33m%s\033[0m %02x\n",
4445 "/** 1000 1111 mov %0, %e!1 */",
4448 SYNTAX("mov %0, %e!1");
4449 #line 647 "rl78-decode.opc"
4450 ID(mov
); DR(A
); SM(None
, IMMU(2));
4463 /** 1001 0reg dec %0 */
4464 #line 556 "rl78-decode.opc"
4465 int reg AU
= op
[0] & 0x07;
4468 printf ("\033[33m%s\033[0m %02x\n",
4469 "/** 1001 0reg dec %0 */",
4471 printf (" reg = 0x%x\n", reg
);
4474 #line 556 "rl78-decode.opc"
4475 ID(sub
); DRB(reg
); SC(1); Fza
;
4481 /** 1001 1000 mov %a0, %1 */
4484 printf ("\033[33m%s\033[0m %02x\n",
4485 "/** 1001 1000 mov %a0, %1 */",
4488 SYNTAX("mov %a0, %1");
4489 #line 644 "rl78-decode.opc"
4490 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4496 /** 1001 1001 mov %e0, %1 */
4499 printf ("\033[33m%s\033[0m %02x\n",
4500 "/** 1001 1001 mov %e0, %1 */",
4503 SYNTAX("mov %e0, %1");
4504 #line 617 "rl78-decode.opc"
4505 ID(mov
); DM(DE
, 0); SR(A
);
4511 /** 1001 1010 mov %ea0, %1 */
4514 printf ("\033[33m%s\033[0m %02x\n",
4515 "/** 1001 1010 mov %ea0, %1 */",
4518 SYNTAX("mov %ea0, %1");
4519 #line 623 "rl78-decode.opc"
4520 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4526 /** 1001 1011 mov %e0, %1 */
4529 printf ("\033[33m%s\033[0m %02x\n",
4530 "/** 1001 1011 mov %e0, %1 */",
4533 SYNTAX("mov %e0, %1");
4534 #line 626 "rl78-decode.opc"
4535 ID(mov
); DM(HL
, 0); SR(A
);
4541 /** 1001 1100 mov %ea0, %1 */
4544 printf ("\033[33m%s\033[0m %02x\n",
4545 "/** 1001 1100 mov %ea0, %1 */",
4548 SYNTAX("mov %ea0, %1");
4549 #line 635 "rl78-decode.opc"
4550 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4556 /** 1001 1101 mov %0, %1 */
4559 printf ("\033[33m%s\033[0m %02x\n",
4560 "/** 1001 1101 mov %0, %1 */",
4563 SYNTAX("mov %0, %1");
4564 #line 749 "rl78-decode.opc"
4565 ID(mov
); DM(None
, SADDR
); SR(A
);
4571 /** 1001 1110 mov %s0, %1 */
4574 printf ("\033[33m%s\033[0m %02x\n",
4575 "/** 1001 1110 mov %s0, %1 */",
4578 SYNTAX("mov %s0, %1");
4579 #line 782 "rl78-decode.opc"
4580 ID(mov
); DM(None
, SFR
); SR(A
);
4582 /*----------------------------------------------------------------------*/
4588 /** 1001 1111 mov %e!0, %1 */
4591 printf ("\033[33m%s\033[0m %02x\n",
4592 "/** 1001 1111 mov %e!0, %1 */",
4595 SYNTAX("mov %e!0, %1");
4596 #line 614 "rl78-decode.opc"
4597 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4603 /** 1010 0000 inc %e!0 */
4606 printf ("\033[33m%s\033[0m %02x\n",
4607 "/** 1010 0000 inc %e!0 */",
4611 #line 583 "rl78-decode.opc"
4612 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4621 /** 1010 0rg1 incw %0 */
4622 #line 603 "rl78-decode.opc"
4623 int rg AU
= (op
[0] >> 1) & 0x03;
4626 printf ("\033[33m%s\033[0m %02x\n",
4627 "/** 1010 0rg1 incw %0 */",
4629 printf (" rg = 0x%x\n", rg
);
4632 #line 603 "rl78-decode.opc"
4633 ID(add
); W(); DRW(rg
); SC(1);
4639 /** 1010 0010 incw %e!0 */
4642 printf ("\033[33m%s\033[0m %02x\n",
4643 "/** 1010 0010 incw %e!0 */",
4646 SYNTAX("incw %e!0");
4647 #line 597 "rl78-decode.opc"
4648 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4654 /** 1010 0100 inc %0 */
4657 printf ("\033[33m%s\033[0m %02x\n",
4658 "/** 1010 0100 inc %0 */",
4662 #line 592 "rl78-decode.opc"
4663 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4665 /*----------------------------------------------------------------------*/
4671 /** 1010 0110 incw %0 */
4674 printf ("\033[33m%s\033[0m %02x\n",
4675 "/** 1010 0110 incw %0 */",
4679 #line 606 "rl78-decode.opc"
4680 ID(add
); W(); DM(None
, SADDR
); SC(1);
4682 /*----------------------------------------------------------------------*/
4688 /** 1010 1000 movw %0, %a1 */
4691 printf ("\033[33m%s\033[0m %02x\n",
4692 "/** 1010 1000 movw %0, %a1 */",
4695 SYNTAX("movw %0, %a1");
4696 #line 852 "rl78-decode.opc"
4697 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4703 /** 1010 1001 movw %0, %e1 */
4706 printf ("\033[33m%s\033[0m %02x\n",
4707 "/** 1010 1001 movw %0, %e1 */",
4710 SYNTAX("movw %0, %e1");
4711 #line 840 "rl78-decode.opc"
4712 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4718 /** 1010 1010 movw %0, %ea1 */
4721 printf ("\033[33m%s\033[0m %02x\n",
4722 "/** 1010 1010 movw %0, %ea1 */",
4725 SYNTAX("movw %0, %ea1");
4726 #line 843 "rl78-decode.opc"
4727 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4733 /** 1010 1011 movw %0, %e1 */
4736 printf ("\033[33m%s\033[0m %02x\n",
4737 "/** 1010 1011 movw %0, %e1 */",
4740 SYNTAX("movw %0, %e1");
4741 #line 846 "rl78-decode.opc"
4742 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4748 /** 1010 1100 movw %0, %ea1 */
4751 printf ("\033[33m%s\033[0m %02x\n",
4752 "/** 1010 1100 movw %0, %ea1 */",
4755 SYNTAX("movw %0, %ea1");
4756 #line 849 "rl78-decode.opc"
4757 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4763 /** 1010 1101 movw %0, %1 */
4766 printf ("\033[33m%s\033[0m %02x\n",
4767 "/** 1010 1101 movw %0, %1 */",
4770 SYNTAX("movw %0, %1");
4771 #line 882 "rl78-decode.opc"
4772 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4778 /** 1010 1110 movw %0, %s1 */
4781 printf ("\033[33m%s\033[0m %02x\n",
4782 "/** 1010 1110 movw %0, %s1 */",
4785 SYNTAX("movw %0, %s1");
4786 #line 885 "rl78-decode.opc"
4787 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4793 /** 1010 1111 movw %0, %e!1 */
4796 printf ("\033[33m%s\033[0m %02x\n",
4797 "/** 1010 1111 movw %0, %e!1 */",
4800 SYNTAX("movw %0, %e!1");
4801 #line 836 "rl78-decode.opc"
4802 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4809 /** 1011 0000 dec %e!0 */
4812 printf ("\033[33m%s\033[0m %02x\n",
4813 "/** 1011 0000 dec %e!0 */",
4817 #line 550 "rl78-decode.opc"
4818 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4827 /** 1011 0rg1 decw %0 */
4828 #line 570 "rl78-decode.opc"
4829 int rg AU
= (op
[0] >> 1) & 0x03;
4832 printf ("\033[33m%s\033[0m %02x\n",
4833 "/** 1011 0rg1 decw %0 */",
4835 printf (" rg = 0x%x\n", rg
);
4838 #line 570 "rl78-decode.opc"
4839 ID(sub
); W(); DRW(rg
); SC(1);
4845 /** 1011 0010 decw %e!0 */
4848 printf ("\033[33m%s\033[0m %02x\n",
4849 "/** 1011 0010 decw %e!0 */",
4852 SYNTAX("decw %e!0");
4853 #line 564 "rl78-decode.opc"
4854 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4860 /** 1011 0100 dec %0 */
4863 printf ("\033[33m%s\033[0m %02x\n",
4864 "/** 1011 0100 dec %0 */",
4868 #line 559 "rl78-decode.opc"
4869 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4871 /*----------------------------------------------------------------------*/
4877 /** 1011 0110 decw %0 */
4880 printf ("\033[33m%s\033[0m %02x\n",
4881 "/** 1011 0110 decw %0 */",
4885 #line 573 "rl78-decode.opc"
4886 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4888 /*----------------------------------------------------------------------*/
4894 /** 1011 1000 movw %a0, %1 */
4897 printf ("\033[33m%s\033[0m %02x\n",
4898 "/** 1011 1000 movw %a0, %1 */",
4901 SYNTAX("movw %a0, %1");
4902 #line 833 "rl78-decode.opc"
4903 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4909 /** 1011 1001 movw %e0, %1 */
4912 printf ("\033[33m%s\033[0m %02x\n",
4913 "/** 1011 1001 movw %e0, %1 */",
4916 SYNTAX("movw %e0, %1");
4917 #line 821 "rl78-decode.opc"
4918 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4924 /** 1011 1010 movw %ea0, %1 */
4927 printf ("\033[33m%s\033[0m %02x\n",
4928 "/** 1011 1010 movw %ea0, %1 */",
4931 SYNTAX("movw %ea0, %1");
4932 #line 824 "rl78-decode.opc"
4933 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4939 /** 1011 1011 movw %e0, %1 */
4942 printf ("\033[33m%s\033[0m %02x\n",
4943 "/** 1011 1011 movw %e0, %1 */",
4946 SYNTAX("movw %e0, %1");
4947 #line 827 "rl78-decode.opc"
4948 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4954 /** 1011 1100 movw %ea0, %1 */
4957 printf ("\033[33m%s\033[0m %02x\n",
4958 "/** 1011 1100 movw %ea0, %1 */",
4961 SYNTAX("movw %ea0, %1");
4962 #line 830 "rl78-decode.opc"
4963 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4969 /** 1011 1101 movw %0, %1 */
4972 printf ("\033[33m%s\033[0m %02x\n",
4973 "/** 1011 1101 movw %0, %1 */",
4976 SYNTAX("movw %0, %1");
4977 #line 897 "rl78-decode.opc"
4978 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4984 /** 1011 1110 movw %s0, %1 */
4987 printf ("\033[33m%s\033[0m %02x\n",
4988 "/** 1011 1110 movw %s0, %1 */",
4991 SYNTAX("movw %s0, %1");
4992 #line 903 "rl78-decode.opc"
4993 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4995 /*----------------------------------------------------------------------*/
5001 /** 1011 1111 movw %e!0, %1 */
5004 printf ("\033[33m%s\033[0m %02x\n",
5005 "/** 1011 1111 movw %e!0, %1 */",
5008 SYNTAX("movw %e!0, %1");
5009 #line 818 "rl78-decode.opc"
5010 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
5019 /** 1100 0rg0 pop %0 */
5020 #line 988 "rl78-decode.opc"
5021 int rg AU
= (op
[0] >> 1) & 0x03;
5024 printf ("\033[33m%s\033[0m %02x\n",
5025 "/** 1100 0rg0 pop %0 */",
5027 printf (" rg = 0x%x\n", rg
);
5030 #line 988 "rl78-decode.opc"
5031 ID(mov
); W(); DRW(rg
); SPOP();
5040 /** 1100 0rg1 push %1 */
5041 #line 996 "rl78-decode.opc"
5042 int rg AU
= (op
[0] >> 1) & 0x03;
5045 printf ("\033[33m%s\033[0m %02x\n",
5046 "/** 1100 0rg1 push %1 */",
5048 printf (" rg = 0x%x\n", rg
);
5051 #line 996 "rl78-decode.opc"
5052 ID(mov
); W(); DPUSH(); SRW(rg
);
5058 /** 1100 1000 mov %a0, #%1 */
5061 printf ("\033[33m%s\033[0m %02x\n",
5062 "/** 1100 1000 mov %a0, #%1 */",
5065 SYNTAX("mov %a0, #%1");
5066 #line 641 "rl78-decode.opc"
5067 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5073 /** 1100 1001 movw %0, #%1 */
5076 printf ("\033[33m%s\033[0m %02x\n",
5077 "/** 1100 1001 movw %0, #%1 */",
5080 SYNTAX("movw %0, #%1");
5081 #line 894 "rl78-decode.opc"
5082 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5088 /** 1100 1010 mov %ea0, #%1 */
5091 printf ("\033[33m%s\033[0m %02x\n",
5092 "/** 1100 1010 mov %ea0, #%1 */",
5095 SYNTAX("mov %ea0, #%1");
5096 #line 620 "rl78-decode.opc"
5097 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5103 /** 1100 1011 movw %s0, #%1 */
5106 printf ("\033[33m%s\033[0m %02x\n",
5107 "/** 1100 1011 movw %s0, #%1 */",
5110 SYNTAX("movw %s0, #%1");
5111 #line 900 "rl78-decode.opc"
5112 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5118 /** 1100 1100 mov %ea0, #%1 */
5121 printf ("\033[33m%s\033[0m %02x\n",
5122 "/** 1100 1100 mov %ea0, #%1 */",
5125 SYNTAX("mov %ea0, #%1");
5126 #line 632 "rl78-decode.opc"
5127 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5133 /** 1100 1101 mov %0, #%1 */
5136 printf ("\033[33m%s\033[0m %02x\n",
5137 "/** 1100 1101 mov %0, #%1 */",
5140 SYNTAX("mov %0, #%1");
5141 #line 746 "rl78-decode.opc"
5142 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5148 /** 1100 1110 mov %s0, #%1 */
5151 printf ("\033[33m%s\033[0m %02x\n",
5152 "/** 1100 1110 mov %s0, #%1 */",
5155 SYNTAX("mov %s0, #%1");
5156 #line 752 "rl78-decode.opc"
5159 ID(mov
); DM(None
, op0
); SC(op1
);
5160 if (op0
== 0xffffb && isa
== RL78_ISA_G14
)
5164 rl78
->syntax
= "mulhu"; ID(mulhu
);
5167 rl78
->syntax
= "mulh"; ID(mulh
);
5170 rl78
->syntax
= "divhu"; ID(divhu
);
5173 rl78
->syntax
= "divwu <old-encoding>"; ID(divwu
);
5176 rl78
->syntax
= "machu"; ID(machu
);
5179 rl78
->syntax
= "mach"; ID(mach
);
5182 rl78
->syntax
= "divwu"; ID(divwu
);
5190 /** 1100 1111 mov %e!0, #%1 */
5193 printf ("\033[33m%s\033[0m %02x\n",
5194 "/** 1100 1111 mov %e!0, #%1 */",
5197 SYNTAX("mov %e!0, #%1");
5198 #line 611 "rl78-decode.opc"
5199 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5208 /** 1101 00rg cmp0 %0 */
5209 #line 520 "rl78-decode.opc"
5210 int rg AU
= op
[0] & 0x03;
5213 printf ("\033[33m%s\033[0m %02x\n",
5214 "/** 1101 00rg cmp0 %0 */",
5216 printf (" rg = 0x%x\n", rg
);
5219 #line 520 "rl78-decode.opc"
5220 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5226 /** 1101 0100 cmp0 %0 */
5229 printf ("\033[33m%s\033[0m %02x\n",
5230 "/** 1101 0100 cmp0 %0 */",
5234 #line 523 "rl78-decode.opc"
5235 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5237 /*----------------------------------------------------------------------*/
5243 /** 1101 0101 cmp0 %e!0 */
5246 printf ("\033[33m%s\033[0m %02x\n",
5247 "/** 1101 0101 cmp0 %e!0 */",
5250 SYNTAX("cmp0 %e!0");
5251 #line 517 "rl78-decode.opc"
5252 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5258 /** 1101 0110 mulu x */
5261 printf ("\033[33m%s\033[0m %02x\n",
5262 "/** 1101 0110 mulu x */",
5266 #line 908 "rl78-decode.opc"
5269 /*----------------------------------------------------------------------*/
5275 /** 1101 0111 ret */
5278 printf ("\033[33m%s\033[0m %02x\n",
5279 "/** 1101 0111 ret */",
5283 #line 1004 "rl78-decode.opc"
5290 /** 1101 1000 mov %0, %1 */
5293 printf ("\033[33m%s\033[0m %02x\n",
5294 "/** 1101 1000 mov %0, %1 */",
5297 SYNTAX("mov %0, %1");
5298 #line 713 "rl78-decode.opc"
5299 ID(mov
); DR(X
); SM(None
, SADDR
);
5305 /** 1101 1001 mov %0, %e!1 */
5308 printf ("\033[33m%s\033[0m %02x\n",
5309 "/** 1101 1001 mov %0, %e!1 */",
5312 SYNTAX("mov %0, %e!1");
5313 #line 710 "rl78-decode.opc"
5314 ID(mov
); DR(X
); SM(None
, IMMU(2));
5322 /** 11ra 1010 movw %0, %1 */
5323 #line 891 "rl78-decode.opc"
5324 int ra AU
= (op
[0] >> 4) & 0x03;
5327 printf ("\033[33m%s\033[0m %02x\n",
5328 "/** 11ra 1010 movw %0, %1 */",
5330 printf (" ra = 0x%x\n", ra
);
5332 SYNTAX("movw %0, %1");
5333 #line 891 "rl78-decode.opc"
5334 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5342 /** 11ra 1011 movw %0, %es!1 */
5343 #line 888 "rl78-decode.opc"
5344 int ra AU
= (op
[0] >> 4) & 0x03;
5347 printf ("\033[33m%s\033[0m %02x\n",
5348 "/** 11ra 1011 movw %0, %es!1 */",
5350 printf (" ra = 0x%x\n", ra
);
5352 SYNTAX("movw %0, %es!1");
5353 #line 888 "rl78-decode.opc"
5354 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5360 /** 1101 1100 bc $%a0 */
5363 printf ("\033[33m%s\033[0m %02x\n",
5364 "/** 1101 1100 bc $%a0 */",
5368 #line 336 "rl78-decode.opc"
5369 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5375 /** 1101 1101 bz $%a0 */
5378 printf ("\033[33m%s\033[0m %02x\n",
5379 "/** 1101 1101 bz $%a0 */",
5383 #line 348 "rl78-decode.opc"
5384 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5390 /** 1101 1110 bnc $%a0 */
5393 printf ("\033[33m%s\033[0m %02x\n",
5394 "/** 1101 1110 bnc $%a0 */",
5398 #line 339 "rl78-decode.opc"
5399 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5405 /** 1101 1111 bnz $%a0 */
5408 printf ("\033[33m%s\033[0m %02x\n",
5409 "/** 1101 1111 bnz $%a0 */",
5413 #line 351 "rl78-decode.opc"
5414 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5416 /*----------------------------------------------------------------------*/
5425 /** 1110 00rg oneb %0 */
5426 #line 926 "rl78-decode.opc"
5427 int rg AU
= op
[0] & 0x03;
5430 printf ("\033[33m%s\033[0m %02x\n",
5431 "/** 1110 00rg oneb %0 */",
5433 printf (" rg = 0x%x\n", rg
);
5436 #line 926 "rl78-decode.opc"
5437 ID(mov
); DRB(rg
); SC(1);
5443 /** 1110 0100 oneb %0 */
5446 printf ("\033[33m%s\033[0m %02x\n",
5447 "/** 1110 0100 oneb %0 */",
5451 #line 929 "rl78-decode.opc"
5452 ID(mov
); DM(None
, SADDR
); SC(1);
5454 /*----------------------------------------------------------------------*/
5460 /** 1110 0101 oneb %e!0 */
5463 printf ("\033[33m%s\033[0m %02x\n",
5464 "/** 1110 0101 oneb %e!0 */",
5467 SYNTAX("oneb %e!0");
5468 #line 923 "rl78-decode.opc"
5469 ID(mov
); DM(None
, IMMU(2)); SC(1);
5475 /** 1110 0110 onew %0 */
5478 printf ("\033[33m%s\033[0m %02x\n",
5479 "/** 1110 0110 onew %0 */",
5483 #line 934 "rl78-decode.opc"
5484 ID(mov
); DR(AX
); SC(1);
5490 /** 1110 0111 onew %0 */
5493 printf ("\033[33m%s\033[0m %02x\n",
5494 "/** 1110 0111 onew %0 */",
5498 #line 937 "rl78-decode.opc"
5499 ID(mov
); DR(BC
); SC(1);
5501 /*----------------------------------------------------------------------*/
5507 /** 1110 1000 mov %0, %1 */
5510 printf ("\033[33m%s\033[0m %02x\n",
5511 "/** 1110 1000 mov %0, %1 */",
5514 SYNTAX("mov %0, %1");
5515 #line 701 "rl78-decode.opc"
5516 ID(mov
); DR(B
); SM(None
, SADDR
);
5522 /** 1110 1001 mov %0, %e!1 */
5525 printf ("\033[33m%s\033[0m %02x\n",
5526 "/** 1110 1001 mov %0, %e!1 */",
5529 SYNTAX("mov %0, %e!1");
5530 #line 695 "rl78-decode.opc"
5531 ID(mov
); DR(B
); SM(None
, IMMU(2));
5537 /** 1110 1100 br !%!a0 */
5540 printf ("\033[33m%s\033[0m %02x\n",
5541 "/** 1110 1100 br !%!a0 */",
5545 #line 370 "rl78-decode.opc"
5546 ID(branch
); DC(IMMU(3));
5552 /** 1110 1101 br %!a0 */
5555 printf ("\033[33m%s\033[0m %02x\n",
5556 "/** 1110 1101 br %!a0 */",
5560 #line 373 "rl78-decode.opc"
5561 ID(branch
); DC(IMMU(2));
5567 /** 1110 1110 br $%!a0 */
5570 printf ("\033[33m%s\033[0m %02x\n",
5571 "/** 1110 1110 br $%!a0 */",
5575 #line 376 "rl78-decode.opc"
5576 ID(branch
); DC(pc
+IMMS(2)+3);
5582 /** 1110 1111 br $%a0 */
5585 printf ("\033[33m%s\033[0m %02x\n",
5586 "/** 1110 1111 br $%a0 */",
5590 #line 379 "rl78-decode.opc"
5591 ID(branch
); DC(pc
+IMMS(1)+2);
5600 /** 1111 00rg clrb %0 */
5601 #line 466 "rl78-decode.opc"
5602 int rg AU
= op
[0] & 0x03;
5605 printf ("\033[33m%s\033[0m %02x\n",
5606 "/** 1111 00rg clrb %0 */",
5608 printf (" rg = 0x%x\n", rg
);
5611 #line 466 "rl78-decode.opc"
5612 ID(mov
); DRB(rg
); SC(0);
5618 /** 1111 0100 clrb %0 */
5621 printf ("\033[33m%s\033[0m %02x\n",
5622 "/** 1111 0100 clrb %0 */",
5626 #line 469 "rl78-decode.opc"
5627 ID(mov
); DM(None
, SADDR
); SC(0);
5629 /*----------------------------------------------------------------------*/
5635 /** 1111 0101 clrb %e!0 */
5638 printf ("\033[33m%s\033[0m %02x\n",
5639 "/** 1111 0101 clrb %e!0 */",
5642 SYNTAX("clrb %e!0");
5643 #line 463 "rl78-decode.opc"
5644 ID(mov
); DM(None
, IMMU(2)); SC(0);
5650 /** 1111 0110 clrw %0 */
5653 printf ("\033[33m%s\033[0m %02x\n",
5654 "/** 1111 0110 clrw %0 */",
5658 #line 474 "rl78-decode.opc"
5659 ID(mov
); DR(AX
); SC(0);
5665 /** 1111 0111 clrw %0 */
5668 printf ("\033[33m%s\033[0m %02x\n",
5669 "/** 1111 0111 clrw %0 */",
5673 #line 477 "rl78-decode.opc"
5674 ID(mov
); DR(BC
); SC(0);
5676 /*----------------------------------------------------------------------*/
5682 /** 1111 1000 mov %0, %1 */
5685 printf ("\033[33m%s\033[0m %02x\n",
5686 "/** 1111 1000 mov %0, %1 */",
5689 SYNTAX("mov %0, %1");
5690 #line 707 "rl78-decode.opc"
5691 ID(mov
); DR(C
); SM(None
, SADDR
);
5697 /** 1111 1001 mov %0, %e!1 */
5700 printf ("\033[33m%s\033[0m %02x\n",
5701 "/** 1111 1001 mov %0, %e!1 */",
5704 SYNTAX("mov %0, %e!1");
5705 #line 704 "rl78-decode.opc"
5706 ID(mov
); DR(C
); SM(None
, IMMU(2));
5712 /** 1111 1100 call !%!a0 */
5715 printf ("\033[33m%s\033[0m %02x\n",
5716 "/** 1111 1100 call !%!a0 */",
5719 SYNTAX("call !%!a0");
5720 #line 423 "rl78-decode.opc"
5721 ID(call
); DC(IMMU(3));
5727 /** 1111 1101 call %!a0 */
5730 printf ("\033[33m%s\033[0m %02x\n",
5731 "/** 1111 1101 call %!a0 */",
5734 SYNTAX("call %!a0");
5735 #line 426 "rl78-decode.opc"
5736 ID(call
); DC(IMMU(2));
5742 /** 1111 1110 call $%!a0 */
5745 printf ("\033[33m%s\033[0m %02x\n",
5746 "/** 1111 1110 call $%!a0 */",
5749 SYNTAX("call $%!a0");
5750 #line 429 "rl78-decode.opc"
5751 ID(call
); DC(pc
+IMMS(2)+3);
5757 /** 1111 1111 brk1 */
5760 printf ("\033[33m%s\033[0m %02x\n",
5761 "/** 1111 1111 brk1 */",
5765 #line 387 "rl78-decode.opc"
5771 #line 1292 "rl78-decode.opc"
5773 return rl78
->n_bytes
;
This page took 0.151154 seconds and 4 git commands to generate.