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
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 *),
171 LocalData lds
, * ld
= &lds
;
172 unsigned char op_buf
[20] = {0};
173 unsigned char *op
= op_buf
;
177 lds
.getbyte
= getbyte
;
181 memset (rl78
, 0, sizeof (*rl78
));
185 /* Byte registers, not including A. */
186 /* Word registers, not including AX. */
188 /*----------------------------------------------------------------------*/
192 switch (op
[0] & 0xff)
199 printf ("\033[33m%s\033[0m %02x\n",
200 "/** 0000 0000 nop */",
204 #line 911 "rl78-decode.opc"
207 /*----------------------------------------------------------------------*/
216 /** 0000 0rw1 addw %0, %1 */
217 #line 274 "rl78-decode.opc"
218 int rw AU
= (op
[0] >> 1) & 0x03;
221 printf ("\033[33m%s\033[0m %02x\n",
222 "/** 0000 0rw1 addw %0, %1 */",
224 printf (" rw = 0x%x\n", rw
);
226 SYNTAX("addw %0, %1");
227 #line 274 "rl78-decode.opc"
228 ID(add
); W(); DR(AX
); SRW(rw
); Fzac
;
234 /** 0000 0010 addw %0, %e!1 */
237 printf ("\033[33m%s\033[0m %02x\n",
238 "/** 0000 0010 addw %0, %e!1 */",
241 SYNTAX("addw %0, %e!1");
242 #line 265 "rl78-decode.opc"
243 ID(add
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
249 /** 0000 0100 addw %0, #%1 */
252 printf ("\033[33m%s\033[0m %02x\n",
253 "/** 0000 0100 addw %0, #%1 */",
256 SYNTAX("addw %0, #%1");
257 #line 271 "rl78-decode.opc"
258 ID(add
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
264 /** 0000 0110 addw %0, %1 */
267 printf ("\033[33m%s\033[0m %02x\n",
268 "/** 0000 0110 addw %0, %1 */",
271 SYNTAX("addw %0, %1");
272 #line 277 "rl78-decode.opc"
273 ID(add
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
279 /** 0000 1000 xch a, x */
282 printf ("\033[33m%s\033[0m %02x\n",
283 "/** 0000 1000 xch a, x */",
287 #line 1234 "rl78-decode.opc"
288 ID(xch
); DR(A
); SR(X
);
290 /*----------------------------------------------------------------------*/
296 /** 0000 1001 mov %0, %e1 */
299 printf ("\033[33m%s\033[0m %02x\n",
300 "/** 0000 1001 mov %0, %e1 */",
303 SYNTAX("mov %0, %e1");
304 #line 678 "rl78-decode.opc"
305 ID(mov
); DR(A
); SM(B
, IMMU(2));
311 /** 0000 1010 add %0, #%1 */
314 printf ("\033[33m%s\033[0m %02x\n",
315 "/** 0000 1010 add %0, #%1 */",
318 SYNTAX("add %0, #%1");
319 #line 228 "rl78-decode.opc"
320 ID(add
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
322 /*----------------------------------------------------------------------*/
328 /** 0000 1011 add %0, %1 */
331 printf ("\033[33m%s\033[0m %02x\n",
332 "/** 0000 1011 add %0, %1 */",
335 SYNTAX("add %0, %1");
336 #line 222 "rl78-decode.opc"
337 ID(add
); DR(A
); SM(None
, SADDR
); Fzac
;
343 /** 0000 1100 add %0, #%1 */
346 printf ("\033[33m%s\033[0m %02x\n",
347 "/** 0000 1100 add %0, #%1 */",
350 SYNTAX("add %0, #%1");
351 #line 216 "rl78-decode.opc"
352 ID(add
); DR(A
); SC(IMMU(1)); Fzac
;
358 /** 0000 1101 add %0, %e1 */
361 printf ("\033[33m%s\033[0m %02x\n",
362 "/** 0000 1101 add %0, %e1 */",
365 SYNTAX("add %0, %e1");
366 #line 204 "rl78-decode.opc"
367 ID(add
); DR(A
); SM(HL
, 0); Fzac
;
373 /** 0000 1110 add %0, %ea1 */
376 printf ("\033[33m%s\033[0m %02x\n",
377 "/** 0000 1110 add %0, %ea1 */",
380 SYNTAX("add %0, %ea1");
381 #line 210 "rl78-decode.opc"
382 ID(add
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
388 /** 0000 1111 add %0, %e!1 */
391 printf ("\033[33m%s\033[0m %02x\n",
392 "/** 0000 1111 add %0, %e!1 */",
395 SYNTAX("add %0, %e!1");
396 #line 201 "rl78-decode.opc"
397 ID(add
); DR(A
); SM(None
, IMMU(2)); Fzac
;
403 /** 0001 0000 addw %0, #%1 */
406 printf ("\033[33m%s\033[0m %02x\n",
407 "/** 0001 0000 addw %0, #%1 */",
410 SYNTAX("addw %0, #%1");
411 #line 280 "rl78-decode.opc"
412 ID(add
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
414 /*----------------------------------------------------------------------*/
423 printf ("\033[33m%s\033[0m %02x\n",
424 "/** 0001 0001 es: */",
428 #line 193 "rl78-decode.opc"
434 /*----------------------------------------------------------------------*/
442 /** 0001 0ra0 movw %0, %1 */
443 #line 859 "rl78-decode.opc"
444 int ra AU
= (op
[0] >> 1) & 0x03;
447 printf ("\033[33m%s\033[0m %02x\n",
448 "/** 0001 0ra0 movw %0, %1 */",
450 printf (" ra = 0x%x\n", ra
);
452 SYNTAX("movw %0, %1");
453 #line 859 "rl78-decode.opc"
454 ID(mov
); W(); DRW(ra
); SR(AX
);
462 /** 0001 0ra1 movw %0, %1 */
463 #line 856 "rl78-decode.opc"
464 int ra AU
= (op
[0] >> 1) & 0x03;
467 printf ("\033[33m%s\033[0m %02x\n",
468 "/** 0001 0ra1 movw %0, %1 */",
470 printf (" ra = 0x%x\n", ra
);
472 SYNTAX("movw %0, %1");
473 #line 856 "rl78-decode.opc"
474 ID(mov
); W(); DR(AX
); SRW(ra
);
480 /** 0001 1000 mov %e0, %1 */
483 printf ("\033[33m%s\033[0m %02x\n",
484 "/** 0001 1000 mov %e0, %1 */",
487 SYNTAX("mov %e0, %1");
488 #line 729 "rl78-decode.opc"
489 ID(mov
); DM(B
, IMMU(2)); SR(A
);
495 /** 0001 1001 mov %e0, #%1 */
498 printf ("\033[33m%s\033[0m %02x\n",
499 "/** 0001 1001 mov %e0, #%1 */",
502 SYNTAX("mov %e0, #%1");
503 #line 726 "rl78-decode.opc"
504 ID(mov
); DM(B
, IMMU(2)); SC(IMMU(1));
510 /** 0001 1010 addc %0, #%1 */
513 printf ("\033[33m%s\033[0m %02x\n",
514 "/** 0001 1010 addc %0, #%1 */",
517 SYNTAX("addc %0, #%1");
518 #line 260 "rl78-decode.opc"
519 ID(addc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
521 /*----------------------------------------------------------------------*/
527 /** 0001 1011 addc %0, %1 */
530 printf ("\033[33m%s\033[0m %02x\n",
531 "/** 0001 1011 addc %0, %1 */",
534 SYNTAX("addc %0, %1");
535 #line 257 "rl78-decode.opc"
536 ID(addc
); DR(A
); SM(None
, SADDR
); Fzac
;
542 /** 0001 1100 addc %0, #%1 */
545 printf ("\033[33m%s\033[0m %02x\n",
546 "/** 0001 1100 addc %0, #%1 */",
549 SYNTAX("addc %0, #%1");
550 #line 248 "rl78-decode.opc"
551 ID(addc
); DR(A
); SC(IMMU(1)); Fzac
;
557 /** 0001 1101 addc %0, %e1 */
560 printf ("\033[33m%s\033[0m %02x\n",
561 "/** 0001 1101 addc %0, %e1 */",
564 SYNTAX("addc %0, %e1");
565 #line 236 "rl78-decode.opc"
566 ID(addc
); DR(A
); SM(HL
, 0); Fzac
;
572 /** 0001 1110 addc %0, %ea1 */
575 printf ("\033[33m%s\033[0m %02x\n",
576 "/** 0001 1110 addc %0, %ea1 */",
579 SYNTAX("addc %0, %ea1");
580 #line 245 "rl78-decode.opc"
581 ID(addc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
587 /** 0001 1111 addc %0, %e!1 */
590 printf ("\033[33m%s\033[0m %02x\n",
591 "/** 0001 1111 addc %0, %e!1 */",
594 SYNTAX("addc %0, %e!1");
595 #line 233 "rl78-decode.opc"
596 ID(addc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
602 /** 0010 0000 subw %0, #%1 */
605 printf ("\033[33m%s\033[0m %02x\n",
606 "/** 0010 0000 subw %0, #%1 */",
609 SYNTAX("subw %0, #%1");
610 #line 1198 "rl78-decode.opc"
611 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
613 /*----------------------------------------------------------------------*/
622 /** 0010 0rw1 subw %0, %1 */
623 #line 1192 "rl78-decode.opc"
624 int rw AU
= (op
[0] >> 1) & 0x03;
627 printf ("\033[33m%s\033[0m %02x\n",
628 "/** 0010 0rw1 subw %0, %1 */",
630 printf (" rw = 0x%x\n", rw
);
632 SYNTAX("subw %0, %1");
633 #line 1192 "rl78-decode.opc"
634 ID(sub
); W(); DR(AX
); SRW(rw
); Fzac
;
640 /** 0010 0010 subw %0, %e!1 */
643 printf ("\033[33m%s\033[0m %02x\n",
644 "/** 0010 0010 subw %0, %e!1 */",
647 SYNTAX("subw %0, %e!1");
648 #line 1183 "rl78-decode.opc"
649 ID(sub
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
655 /** 0010 0100 subw %0, #%1 */
658 printf ("\033[33m%s\033[0m %02x\n",
659 "/** 0010 0100 subw %0, #%1 */",
662 SYNTAX("subw %0, #%1");
663 #line 1189 "rl78-decode.opc"
664 ID(sub
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
670 /** 0010 0110 subw %0, %1 */
673 printf ("\033[33m%s\033[0m %02x\n",
674 "/** 0010 0110 subw %0, %1 */",
677 SYNTAX("subw %0, %1");
678 #line 1195 "rl78-decode.opc"
679 ID(sub
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
685 /** 0010 1000 mov %e0, %1 */
688 printf ("\033[33m%s\033[0m %02x\n",
689 "/** 0010 1000 mov %e0, %1 */",
692 SYNTAX("mov %e0, %1");
693 #line 741 "rl78-decode.opc"
694 ID(mov
); DM(C
, IMMU(2)); SR(A
);
700 /** 0010 1001 mov %0, %e1 */
703 printf ("\033[33m%s\033[0m %02x\n",
704 "/** 0010 1001 mov %0, %e1 */",
707 SYNTAX("mov %0, %e1");
708 #line 684 "rl78-decode.opc"
709 ID(mov
); DR(A
); SM(C
, IMMU(2));
715 /** 0010 1010 sub %0, #%1 */
718 printf ("\033[33m%s\033[0m %02x\n",
719 "/** 0010 1010 sub %0, #%1 */",
722 SYNTAX("sub %0, #%1");
723 #line 1146 "rl78-decode.opc"
724 ID(sub
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
726 /*----------------------------------------------------------------------*/
732 /** 0010 1011 sub %0, %1 */
735 printf ("\033[33m%s\033[0m %02x\n",
736 "/** 0010 1011 sub %0, %1 */",
739 SYNTAX("sub %0, %1");
740 #line 1140 "rl78-decode.opc"
741 ID(sub
); DR(A
); SM(None
, SADDR
); Fzac
;
747 /** 0010 1100 sub %0, #%1 */
750 printf ("\033[33m%s\033[0m %02x\n",
751 "/** 0010 1100 sub %0, #%1 */",
754 SYNTAX("sub %0, #%1");
755 #line 1134 "rl78-decode.opc"
756 ID(sub
); DR(A
); SC(IMMU(1)); Fzac
;
762 /** 0010 1101 sub %0, %e1 */
765 printf ("\033[33m%s\033[0m %02x\n",
766 "/** 0010 1101 sub %0, %e1 */",
769 SYNTAX("sub %0, %e1");
770 #line 1122 "rl78-decode.opc"
771 ID(sub
); DR(A
); SM(HL
, 0); Fzac
;
777 /** 0010 1110 sub %0, %ea1 */
780 printf ("\033[33m%s\033[0m %02x\n",
781 "/** 0010 1110 sub %0, %ea1 */",
784 SYNTAX("sub %0, %ea1");
785 #line 1128 "rl78-decode.opc"
786 ID(sub
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
792 /** 0010 1111 sub %0, %e!1 */
795 printf ("\033[33m%s\033[0m %02x\n",
796 "/** 0010 1111 sub %0, %e!1 */",
799 SYNTAX("sub %0, %e!1");
800 #line 1119 "rl78-decode.opc"
801 ID(sub
); DR(A
); SM(None
, IMMU(2)); Fzac
;
810 /** 0011 0rg0 movw %0, #%1 */
811 #line 853 "rl78-decode.opc"
812 int rg AU
= (op
[0] >> 1) & 0x03;
815 printf ("\033[33m%s\033[0m %02x\n",
816 "/** 0011 0rg0 movw %0, #%1 */",
818 printf (" rg = 0x%x\n", rg
);
820 SYNTAX("movw %0, #%1");
821 #line 853 "rl78-decode.opc"
822 ID(mov
); W(); DRW(rg
); SC(IMMU(2));
828 switch (op
[1] & 0x8f)
832 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
833 #line 416 "rl78-decode.opc"
834 int bit AU
= (op
[1] >> 4) & 0x07;
837 printf ("\033[33m%s\033[0m %02x %02x\n",
838 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
840 printf (" bit = 0x%x\n", bit
);
842 SYNTAX("btclr %s1, $%a0");
843 #line 416 "rl78-decode.opc"
844 ID(branch_cond_clear
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
846 /*----------------------------------------------------------------------*/
852 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
853 #line 410 "rl78-decode.opc"
854 int bit AU
= (op
[1] >> 4) & 0x07;
857 printf ("\033[33m%s\033[0m %02x %02x\n",
858 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
860 printf (" bit = 0x%x\n", bit
);
862 SYNTAX("btclr %1, $%a0");
863 #line 410 "rl78-decode.opc"
864 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
870 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
871 #line 402 "rl78-decode.opc"
872 int bit AU
= (op
[1] >> 4) & 0x07;
875 printf ("\033[33m%s\033[0m %02x %02x\n",
876 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
878 printf (" bit = 0x%x\n", bit
);
880 SYNTAX("bt %s1, $%a0");
881 #line 402 "rl78-decode.opc"
882 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
884 /*----------------------------------------------------------------------*/
890 /** 0011 0001 0bit 0011 bt %1, $%a0 */
891 #line 396 "rl78-decode.opc"
892 int bit AU
= (op
[1] >> 4) & 0x07;
895 printf ("\033[33m%s\033[0m %02x %02x\n",
896 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
898 printf (" bit = 0x%x\n", bit
);
900 SYNTAX("bt %1, $%a0");
901 #line 396 "rl78-decode.opc"
902 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
908 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
909 #line 363 "rl78-decode.opc"
910 int bit AU
= (op
[1] >> 4) & 0x07;
913 printf ("\033[33m%s\033[0m %02x %02x\n",
914 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
916 printf (" bit = 0x%x\n", bit
);
918 SYNTAX("bf %s1, $%a0");
919 #line 363 "rl78-decode.opc"
920 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
922 /*----------------------------------------------------------------------*/
928 /** 0011 0001 0bit 0101 bf %1, $%a0 */
929 #line 357 "rl78-decode.opc"
930 int bit AU
= (op
[1] >> 4) & 0x07;
933 printf ("\033[33m%s\033[0m %02x %02x\n",
934 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
936 printf (" bit = 0x%x\n", bit
);
938 SYNTAX("bf %1, $%a0");
939 #line 357 "rl78-decode.opc"
940 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(F
);
946 /** 0011 0001 0cnt 0111 shl %0, %1 */
947 #line 1075 "rl78-decode.opc"
948 int cnt AU
= (op
[1] >> 4) & 0x07;
951 printf ("\033[33m%s\033[0m %02x %02x\n",
952 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
954 printf (" cnt = 0x%x\n", cnt
);
956 SYNTAX("shl %0, %1");
957 #line 1075 "rl78-decode.opc"
958 ID(shl
); DR(C
); SC(cnt
);
964 /** 0011 0001 0cnt 1000 shl %0, %1 */
965 #line 1072 "rl78-decode.opc"
966 int cnt AU
= (op
[1] >> 4) & 0x07;
969 printf ("\033[33m%s\033[0m %02x %02x\n",
970 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
972 printf (" cnt = 0x%x\n", cnt
);
974 SYNTAX("shl %0, %1");
975 #line 1072 "rl78-decode.opc"
976 ID(shl
); DR(B
); SC(cnt
);
982 /** 0011 0001 0cnt 1001 shl %0, %1 */
983 #line 1069 "rl78-decode.opc"
984 int cnt AU
= (op
[1] >> 4) & 0x07;
987 printf ("\033[33m%s\033[0m %02x %02x\n",
988 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
990 printf (" cnt = 0x%x\n", cnt
);
992 SYNTAX("shl %0, %1");
993 #line 1069 "rl78-decode.opc"
994 ID(shl
); DR(A
); SC(cnt
);
1000 /** 0011 0001 0cnt 1010 shr %0, %1 */
1001 #line 1086 "rl78-decode.opc"
1002 int cnt AU
= (op
[1] >> 4) & 0x07;
1005 printf ("\033[33m%s\033[0m %02x %02x\n",
1006 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
1008 printf (" cnt = 0x%x\n", cnt
);
1010 SYNTAX("shr %0, %1");
1011 #line 1086 "rl78-decode.opc"
1012 ID(shr
); DR(A
); SC(cnt
);
1018 /** 0011 0001 0cnt 1011 sar %0, %1 */
1019 #line 1033 "rl78-decode.opc"
1020 int cnt AU
= (op
[1] >> 4) & 0x07;
1023 printf ("\033[33m%s\033[0m %02x %02x\n",
1024 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1026 printf (" cnt = 0x%x\n", cnt
);
1028 SYNTAX("sar %0, %1");
1029 #line 1033 "rl78-decode.opc"
1030 ID(sar
); DR(A
); SC(cnt
);
1037 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1038 #line 1081 "rl78-decode.opc"
1039 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1042 printf ("\033[33m%s\033[0m %02x %02x\n",
1043 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1045 printf (" wcnt = 0x%x\n", wcnt
);
1047 SYNTAX("shlw %0, %1");
1048 #line 1081 "rl78-decode.opc"
1049 ID(shl
); W(); DR(BC
); SC(wcnt
);
1051 /*----------------------------------------------------------------------*/
1058 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1059 #line 1078 "rl78-decode.opc"
1060 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1063 printf ("\033[33m%s\033[0m %02x %02x\n",
1064 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1066 printf (" wcnt = 0x%x\n", wcnt
);
1068 SYNTAX("shlw %0, %1");
1069 #line 1078 "rl78-decode.opc"
1070 ID(shl
); W(); DR(AX
); SC(wcnt
);
1077 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1078 #line 1089 "rl78-decode.opc"
1079 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1082 printf ("\033[33m%s\033[0m %02x %02x\n",
1083 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1085 printf (" wcnt = 0x%x\n", wcnt
);
1087 SYNTAX("shrw %0, %1");
1088 #line 1089 "rl78-decode.opc"
1089 ID(shr
); W(); DR(AX
); SC(wcnt
);
1091 /*----------------------------------------------------------------------*/
1098 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1099 #line 1036 "rl78-decode.opc"
1100 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1103 printf ("\033[33m%s\033[0m %02x %02x\n",
1104 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1106 printf (" wcnt = 0x%x\n", wcnt
);
1108 SYNTAX("sarw %0, %1");
1109 #line 1036 "rl78-decode.opc"
1110 ID(sar
); W(); DR(AX
); SC(wcnt
);
1112 /*----------------------------------------------------------------------*/
1118 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
1119 #line 413 "rl78-decode.opc"
1120 int bit AU
= (op
[1] >> 4) & 0x07;
1123 printf ("\033[33m%s\033[0m %02x %02x\n",
1124 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1126 printf (" bit = 0x%x\n", bit
);
1128 SYNTAX("btclr %s1, $%a0");
1129 #line 413 "rl78-decode.opc"
1130 ID(branch_cond_clear
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1136 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
1137 #line 407 "rl78-decode.opc"
1138 int bit AU
= (op
[1] >> 4) & 0x07;
1141 printf ("\033[33m%s\033[0m %02x %02x\n",
1142 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
1144 printf (" bit = 0x%x\n", bit
);
1146 SYNTAX("btclr %e1, $%a0");
1147 #line 407 "rl78-decode.opc"
1148 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1154 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
1155 #line 399 "rl78-decode.opc"
1156 int bit AU
= (op
[1] >> 4) & 0x07;
1159 printf ("\033[33m%s\033[0m %02x %02x\n",
1160 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1162 printf (" bit = 0x%x\n", bit
);
1164 SYNTAX("bt %s1, $%a0");
1165 #line 399 "rl78-decode.opc"
1166 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1172 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
1173 #line 393 "rl78-decode.opc"
1174 int bit AU
= (op
[1] >> 4) & 0x07;
1177 printf ("\033[33m%s\033[0m %02x %02x\n",
1178 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
1180 printf (" bit = 0x%x\n", bit
);
1182 SYNTAX("bt %e1, $%a0");
1183 #line 393 "rl78-decode.opc"
1184 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1190 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
1191 #line 360 "rl78-decode.opc"
1192 int bit AU
= (op
[1] >> 4) & 0x07;
1195 printf ("\033[33m%s\033[0m %02x %02x\n",
1196 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1198 printf (" bit = 0x%x\n", bit
);
1200 SYNTAX("bf %s1, $%a0");
1201 #line 360 "rl78-decode.opc"
1202 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
1208 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
1209 #line 354 "rl78-decode.opc"
1210 int bit AU
= (op
[1] >> 4) & 0x07;
1213 printf ("\033[33m%s\033[0m %02x %02x\n",
1214 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
1216 printf (" bit = 0x%x\n", bit
);
1218 SYNTAX("bf %e1, $%a0");
1219 #line 354 "rl78-decode.opc"
1220 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(F
);
1224 default: UNSUPPORTED(); break;
1231 /** 0011 0ra1 xchw %0, %1 */
1232 #line 1239 "rl78-decode.opc"
1233 int ra AU
= (op
[0] >> 1) & 0x03;
1236 printf ("\033[33m%s\033[0m %02x\n",
1237 "/** 0011 0ra1 xchw %0, %1 */",
1239 printf (" ra = 0x%x\n", ra
);
1241 SYNTAX("xchw %0, %1");
1242 #line 1239 "rl78-decode.opc"
1243 ID(xch
); W(); DR(AX
); SRW(ra
);
1245 /*----------------------------------------------------------------------*/
1251 /** 0011 1000 mov %e0, #%1 */
1254 printf ("\033[33m%s\033[0m %02x\n",
1255 "/** 0011 1000 mov %e0, #%1 */",
1258 SYNTAX("mov %e0, #%1");
1259 #line 738 "rl78-decode.opc"
1260 ID(mov
); DM(C
, IMMU(2)); SC(IMMU(1));
1266 /** 0011 1001 mov %e0, #%1 */
1269 printf ("\033[33m%s\033[0m %02x\n",
1270 "/** 0011 1001 mov %e0, #%1 */",
1273 SYNTAX("mov %e0, #%1");
1274 #line 732 "rl78-decode.opc"
1275 ID(mov
); DM(BC
, IMMU(2)); SC(IMMU(1));
1281 /** 0011 1010 subc %0, #%1 */
1284 printf ("\033[33m%s\033[0m %02x\n",
1285 "/** 0011 1010 subc %0, #%1 */",
1288 SYNTAX("subc %0, #%1");
1289 #line 1178 "rl78-decode.opc"
1290 ID(subc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1292 /*----------------------------------------------------------------------*/
1298 /** 0011 1011 subc %0, %1 */
1301 printf ("\033[33m%s\033[0m %02x\n",
1302 "/** 0011 1011 subc %0, %1 */",
1305 SYNTAX("subc %0, %1");
1306 #line 1175 "rl78-decode.opc"
1307 ID(subc
); DR(A
); SM(None
, SADDR
); Fzac
;
1313 /** 0011 1100 subc %0, #%1 */
1316 printf ("\033[33m%s\033[0m %02x\n",
1317 "/** 0011 1100 subc %0, #%1 */",
1320 SYNTAX("subc %0, #%1");
1321 #line 1166 "rl78-decode.opc"
1322 ID(subc
); DR(A
); SC(IMMU(1)); Fzac
;
1328 /** 0011 1101 subc %0, %e1 */
1331 printf ("\033[33m%s\033[0m %02x\n",
1332 "/** 0011 1101 subc %0, %e1 */",
1335 SYNTAX("subc %0, %e1");
1336 #line 1154 "rl78-decode.opc"
1337 ID(subc
); DR(A
); SM(HL
, 0); Fzac
;
1343 /** 0011 1110 subc %0, %ea1 */
1346 printf ("\033[33m%s\033[0m %02x\n",
1347 "/** 0011 1110 subc %0, %ea1 */",
1350 SYNTAX("subc %0, %ea1");
1351 #line 1163 "rl78-decode.opc"
1352 ID(subc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1358 /** 0011 1111 subc %0, %e!1 */
1361 printf ("\033[33m%s\033[0m %02x\n",
1362 "/** 0011 1111 subc %0, %e!1 */",
1365 SYNTAX("subc %0, %e!1");
1366 #line 1151 "rl78-decode.opc"
1367 ID(subc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1373 /** 0100 0000 cmp %e!0, #%1 */
1376 printf ("\033[33m%s\033[0m %02x\n",
1377 "/** 0100 0000 cmp %e!0, #%1 */",
1380 SYNTAX("cmp %e!0, #%1");
1381 #line 480 "rl78-decode.opc"
1382 ID(cmp
); DM(None
, IMMU(2)); SC(IMMU(1)); Fzac
;
1388 /** 0100 0001 mov %0, #%1 */
1391 printf ("\033[33m%s\033[0m %02x\n",
1392 "/** 0100 0001 mov %0, #%1 */",
1395 SYNTAX("mov %0, #%1");
1396 #line 717 "rl78-decode.opc"
1397 ID(mov
); DR(ES
); SC(IMMU(1));
1403 /** 0100 0010 cmpw %0, %e!1 */
1406 printf ("\033[33m%s\033[0m %02x\n",
1407 "/** 0100 0010 cmpw %0, %e!1 */",
1410 SYNTAX("cmpw %0, %e!1");
1411 #line 531 "rl78-decode.opc"
1412 ID(cmp
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
1420 /** 0100 0ra1 cmpw %0, %1 */
1421 #line 540 "rl78-decode.opc"
1422 int ra AU
= (op
[0] >> 1) & 0x03;
1425 printf ("\033[33m%s\033[0m %02x\n",
1426 "/** 0100 0ra1 cmpw %0, %1 */",
1428 printf (" ra = 0x%x\n", ra
);
1430 SYNTAX("cmpw %0, %1");
1431 #line 540 "rl78-decode.opc"
1432 ID(cmp
); W(); DR(AX
); SRW(ra
); Fzac
;
1438 /** 0100 0100 cmpw %0, #%1 */
1441 printf ("\033[33m%s\033[0m %02x\n",
1442 "/** 0100 0100 cmpw %0, #%1 */",
1445 SYNTAX("cmpw %0, #%1");
1446 #line 537 "rl78-decode.opc"
1447 ID(cmp
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
1453 /** 0100 0110 cmpw %0, %1 */
1456 printf ("\033[33m%s\033[0m %02x\n",
1457 "/** 0100 0110 cmpw %0, %1 */",
1460 SYNTAX("cmpw %0, %1");
1461 #line 543 "rl78-decode.opc"
1462 ID(cmp
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
1464 /*----------------------------------------------------------------------*/
1470 /** 0100 1000 mov %e0, %1 */
1473 printf ("\033[33m%s\033[0m %02x\n",
1474 "/** 0100 1000 mov %e0, %1 */",
1477 SYNTAX("mov %e0, %1");
1478 #line 735 "rl78-decode.opc"
1479 ID(mov
); DM(BC
, IMMU(2)); SR(A
);
1485 /** 0100 1001 mov %0, %e1 */
1488 printf ("\033[33m%s\033[0m %02x\n",
1489 "/** 0100 1001 mov %0, %e1 */",
1492 SYNTAX("mov %0, %e1");
1493 #line 681 "rl78-decode.opc"
1494 ID(mov
); DR(A
); SM(BC
, IMMU(2));
1500 /** 0100 1010 cmp %0, #%1 */
1503 printf ("\033[33m%s\033[0m %02x\n",
1504 "/** 0100 1010 cmp %0, #%1 */",
1507 SYNTAX("cmp %0, #%1");
1508 #line 483 "rl78-decode.opc"
1509 ID(cmp
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1515 /** 0100 1011 cmp %0, %1 */
1518 printf ("\033[33m%s\033[0m %02x\n",
1519 "/** 0100 1011 cmp %0, %1 */",
1522 SYNTAX("cmp %0, %1");
1523 #line 510 "rl78-decode.opc"
1524 ID(cmp
); DR(A
); SM(None
, SADDR
); Fzac
;
1526 /*----------------------------------------------------------------------*/
1532 /** 0100 1100 cmp %0, #%1 */
1535 printf ("\033[33m%s\033[0m %02x\n",
1536 "/** 0100 1100 cmp %0, #%1 */",
1539 SYNTAX("cmp %0, #%1");
1540 #line 501 "rl78-decode.opc"
1541 ID(cmp
); DR(A
); SC(IMMU(1)); Fzac
;
1547 /** 0100 1101 cmp %0, %e1 */
1550 printf ("\033[33m%s\033[0m %02x\n",
1551 "/** 0100 1101 cmp %0, %e1 */",
1554 SYNTAX("cmp %0, %e1");
1555 #line 489 "rl78-decode.opc"
1556 ID(cmp
); DR(A
); SM(HL
, 0); Fzac
;
1562 /** 0100 1110 cmp %0, %ea1 */
1565 printf ("\033[33m%s\033[0m %02x\n",
1566 "/** 0100 1110 cmp %0, %ea1 */",
1569 SYNTAX("cmp %0, %ea1");
1570 #line 498 "rl78-decode.opc"
1571 ID(cmp
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1577 /** 0100 1111 cmp %0, %e!1 */
1580 printf ("\033[33m%s\033[0m %02x\n",
1581 "/** 0100 1111 cmp %0, %e!1 */",
1584 SYNTAX("cmp %0, %e!1");
1585 #line 486 "rl78-decode.opc"
1586 ID(cmp
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1599 /** 0101 0reg mov %0, #%1 */
1600 #line 669 "rl78-decode.opc"
1601 int reg AU
= op
[0] & 0x07;
1604 printf ("\033[33m%s\033[0m %02x\n",
1605 "/** 0101 0reg mov %0, #%1 */",
1607 printf (" reg = 0x%x\n", reg
);
1609 SYNTAX("mov %0, #%1");
1610 #line 669 "rl78-decode.opc"
1611 ID(mov
); DRB(reg
); SC(IMMU(1));
1617 /** 0101 1000 movw %e0, %1 */
1620 printf ("\033[33m%s\033[0m %02x\n",
1621 "/** 0101 1000 movw %e0, %1 */",
1624 SYNTAX("movw %e0, %1");
1625 #line 871 "rl78-decode.opc"
1626 ID(mov
); W(); DM(B
, IMMU(2)); SR(AX
);
1632 /** 0101 1001 movw %0, %e1 */
1635 printf ("\033[33m%s\033[0m %02x\n",
1636 "/** 0101 1001 movw %0, %e1 */",
1639 SYNTAX("movw %0, %e1");
1640 #line 862 "rl78-decode.opc"
1641 ID(mov
); W(); DR(AX
); SM(B
, IMMU(2));
1647 /** 0101 1010 and %0, #%1 */
1650 printf ("\033[33m%s\033[0m %02x\n",
1651 "/** 0101 1010 and %0, #%1 */",
1654 SYNTAX("and %0, #%1");
1655 #line 312 "rl78-decode.opc"
1656 ID(and); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
1658 /*----------------------------------------------------------------------*/
1664 /** 0101 1011 and %0, %1 */
1667 printf ("\033[33m%s\033[0m %02x\n",
1668 "/** 0101 1011 and %0, %1 */",
1671 SYNTAX("and %0, %1");
1672 #line 309 "rl78-decode.opc"
1673 ID(and); DR(A
); SM(None
, SADDR
); Fz
;
1679 /** 0101 1100 and %0, #%1 */
1682 printf ("\033[33m%s\033[0m %02x\n",
1683 "/** 0101 1100 and %0, #%1 */",
1686 SYNTAX("and %0, #%1");
1687 #line 300 "rl78-decode.opc"
1688 ID(and); DR(A
); SC(IMMU(1)); Fz
;
1694 /** 0101 1101 and %0, %e1 */
1697 printf ("\033[33m%s\033[0m %02x\n",
1698 "/** 0101 1101 and %0, %e1 */",
1701 SYNTAX("and %0, %e1");
1702 #line 288 "rl78-decode.opc"
1703 ID(and); DR(A
); SM(HL
, 0); Fz
;
1709 /** 0101 1110 and %0, %ea1 */
1712 printf ("\033[33m%s\033[0m %02x\n",
1713 "/** 0101 1110 and %0, %ea1 */",
1716 SYNTAX("and %0, %ea1");
1717 #line 294 "rl78-decode.opc"
1718 ID(and); DR(A
); SM(HL
, IMMU(1)); Fz
;
1724 /** 0101 1111 and %0, %e!1 */
1727 printf ("\033[33m%s\033[0m %02x\n",
1728 "/** 0101 1111 and %0, %e!1 */",
1731 SYNTAX("and %0, %e!1");
1732 #line 285 "rl78-decode.opc"
1733 ID(and); DR(A
); SM(None
, IMMU(2)); Fz
;
1745 /** 0110 0rba mov %0, %1 */
1746 #line 672 "rl78-decode.opc"
1747 int rba AU
= op
[0] & 0x07;
1750 printf ("\033[33m%s\033[0m %02x\n",
1751 "/** 0110 0rba mov %0, %1 */",
1753 printf (" rba = 0x%x\n", rba
);
1755 SYNTAX("mov %0, %1");
1756 #line 672 "rl78-decode.opc"
1757 ID(mov
); DR(A
); SRB(rba
);
1763 switch (op
[1] & 0xff)
1774 /** 0110 0001 0000 0reg add %0, %1 */
1775 #line 225 "rl78-decode.opc"
1776 int reg AU
= op
[1] & 0x07;
1779 printf ("\033[33m%s\033[0m %02x %02x\n",
1780 "/** 0110 0001 0000 0reg add %0, %1 */",
1782 printf (" reg = 0x%x\n", reg
);
1784 SYNTAX("add %0, %1");
1785 #line 225 "rl78-decode.opc"
1786 ID(add
); DRB(reg
); SR(A
); Fzac
;
1798 /** 0110 0001 0000 1rba add %0, %1 */
1799 #line 219 "rl78-decode.opc"
1800 int rba AU
= op
[1] & 0x07;
1803 printf ("\033[33m%s\033[0m %02x %02x\n",
1804 "/** 0110 0001 0000 1rba add %0, %1 */",
1806 printf (" rba = 0x%x\n", rba
);
1808 SYNTAX("add %0, %1");
1809 #line 219 "rl78-decode.opc"
1810 ID(add
); DR(A
); SRB(rba
); Fzac
;
1816 /** 0110 0001 0000 1001 addw %0, %ea1 */
1819 printf ("\033[33m%s\033[0m %02x %02x\n",
1820 "/** 0110 0001 0000 1001 addw %0, %ea1 */",
1823 SYNTAX("addw %0, %ea1");
1824 #line 268 "rl78-decode.opc"
1825 ID(add
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1838 /** 0110 0001 0001 0reg addc %0, %1 */
1839 #line 254 "rl78-decode.opc"
1840 int reg AU
= op
[1] & 0x07;
1843 printf ("\033[33m%s\033[0m %02x %02x\n",
1844 "/** 0110 0001 0001 0reg addc %0, %1 */",
1846 printf (" reg = 0x%x\n", reg
);
1848 SYNTAX("addc %0, %1");
1849 #line 254 "rl78-decode.opc"
1850 ID(addc
); DRB(reg
); SR(A
); Fzac
;
1862 /** 0110 0001 0001 1rba addc %0, %1 */
1863 #line 251 "rl78-decode.opc"
1864 int rba AU
= op
[1] & 0x07;
1867 printf ("\033[33m%s\033[0m %02x %02x\n",
1868 "/** 0110 0001 0001 1rba addc %0, %1 */",
1870 printf (" rba = 0x%x\n", rba
);
1872 SYNTAX("addc %0, %1");
1873 #line 251 "rl78-decode.opc"
1874 ID(addc
); DR(A
); SRB(rba
); Fzac
;
1887 /** 0110 0001 0010 0reg sub %0, %1 */
1888 #line 1143 "rl78-decode.opc"
1889 int reg AU
= op
[1] & 0x07;
1892 printf ("\033[33m%s\033[0m %02x %02x\n",
1893 "/** 0110 0001 0010 0reg sub %0, %1 */",
1895 printf (" reg = 0x%x\n", reg
);
1897 SYNTAX("sub %0, %1");
1898 #line 1143 "rl78-decode.opc"
1899 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1911 /** 0110 0001 0010 1rba sub %0, %1 */
1912 #line 1137 "rl78-decode.opc"
1913 int rba AU
= op
[1] & 0x07;
1916 printf ("\033[33m%s\033[0m %02x %02x\n",
1917 "/** 0110 0001 0010 1rba sub %0, %1 */",
1919 printf (" rba = 0x%x\n", rba
);
1921 SYNTAX("sub %0, %1");
1922 #line 1137 "rl78-decode.opc"
1923 ID(sub
); DR(A
); SRB(rba
); Fzac
;
1929 /** 0110 0001 0010 1001 subw %0, %ea1 */
1932 printf ("\033[33m%s\033[0m %02x %02x\n",
1933 "/** 0110 0001 0010 1001 subw %0, %ea1 */",
1936 SYNTAX("subw %0, %ea1");
1937 #line 1186 "rl78-decode.opc"
1938 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1951 /** 0110 0001 0011 0reg subc %0, %1 */
1952 #line 1172 "rl78-decode.opc"
1953 int reg AU
= op
[1] & 0x07;
1956 printf ("\033[33m%s\033[0m %02x %02x\n",
1957 "/** 0110 0001 0011 0reg subc %0, %1 */",
1959 printf (" reg = 0x%x\n", reg
);
1961 SYNTAX("subc %0, %1");
1962 #line 1172 "rl78-decode.opc"
1963 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1975 /** 0110 0001 0011 1rba subc %0, %1 */
1976 #line 1169 "rl78-decode.opc"
1977 int rba AU
= op
[1] & 0x07;
1980 printf ("\033[33m%s\033[0m %02x %02x\n",
1981 "/** 0110 0001 0011 1rba subc %0, %1 */",
1983 printf (" rba = 0x%x\n", rba
);
1985 SYNTAX("subc %0, %1");
1986 #line 1169 "rl78-decode.opc"
1987 ID(subc
); DR(A
); SRB(rba
); Fzac
;
2000 /** 0110 0001 0100 0reg cmp %0, %1 */
2001 #line 507 "rl78-decode.opc"
2002 int reg AU
= op
[1] & 0x07;
2005 printf ("\033[33m%s\033[0m %02x %02x\n",
2006 "/** 0110 0001 0100 0reg cmp %0, %1 */",
2008 printf (" reg = 0x%x\n", reg
);
2010 SYNTAX("cmp %0, %1");
2011 #line 507 "rl78-decode.opc"
2012 ID(cmp
); DRB(reg
); SR(A
); Fzac
;
2024 /** 0110 0001 0100 1rba cmp %0, %1 */
2025 #line 504 "rl78-decode.opc"
2026 int rba AU
= op
[1] & 0x07;
2029 printf ("\033[33m%s\033[0m %02x %02x\n",
2030 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2032 printf (" rba = 0x%x\n", rba
);
2034 SYNTAX("cmp %0, %1");
2035 #line 504 "rl78-decode.opc"
2036 ID(cmp
); DR(A
); SRB(rba
); Fzac
;
2042 /** 0110 0001 0100 1001 cmpw %0, %ea1 */
2045 printf ("\033[33m%s\033[0m %02x %02x\n",
2046 "/** 0110 0001 0100 1001 cmpw %0, %ea1 */",
2049 SYNTAX("cmpw %0, %ea1");
2050 #line 534 "rl78-decode.opc"
2051 ID(cmp
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
2064 /** 0110 0001 0101 0reg and %0, %1 */
2065 #line 306 "rl78-decode.opc"
2066 int reg AU
= op
[1] & 0x07;
2069 printf ("\033[33m%s\033[0m %02x %02x\n",
2070 "/** 0110 0001 0101 0reg and %0, %1 */",
2072 printf (" reg = 0x%x\n", reg
);
2074 SYNTAX("and %0, %1");
2075 #line 306 "rl78-decode.opc"
2076 ID(and); DRB(reg
); SR(A
); Fz
;
2088 /** 0110 0001 0101 1rba and %0, %1 */
2089 #line 303 "rl78-decode.opc"
2090 int rba AU
= op
[1] & 0x07;
2093 printf ("\033[33m%s\033[0m %02x %02x\n",
2094 "/** 0110 0001 0101 1rba and %0, %1 */",
2096 printf (" rba = 0x%x\n", rba
);
2098 SYNTAX("and %0, %1");
2099 #line 303 "rl78-decode.opc"
2100 ID(and); DR(A
); SRB(rba
); Fz
;
2106 /** 0110 0001 0101 1001 inc %ea0 */
2109 printf ("\033[33m%s\033[0m %02x %02x\n",
2110 "/** 0110 0001 0101 1001 inc %ea0 */",
2114 #line 584 "rl78-decode.opc"
2115 ID(add
); DM(HL
, IMMU(1)); SC(1); Fza
;
2128 /** 0110 0001 0110 0reg or %0, %1 */
2129 #line 961 "rl78-decode.opc"
2130 int reg AU
= op
[1] & 0x07;
2133 printf ("\033[33m%s\033[0m %02x %02x\n",
2134 "/** 0110 0001 0110 0reg or %0, %1 */",
2136 printf (" reg = 0x%x\n", reg
);
2138 SYNTAX("or %0, %1");
2139 #line 961 "rl78-decode.opc"
2140 ID(or); DRB(reg
); SR(A
); Fz
;
2152 /** 0110 0001 0110 1rba or %0, %1 */
2153 #line 958 "rl78-decode.opc"
2154 int rba AU
= op
[1] & 0x07;
2157 printf ("\033[33m%s\033[0m %02x %02x\n",
2158 "/** 0110 0001 0110 1rba or %0, %1 */",
2160 printf (" rba = 0x%x\n", rba
);
2162 SYNTAX("or %0, %1");
2163 #line 958 "rl78-decode.opc"
2164 ID(or); DR(A
); SRB(rba
); Fz
;
2170 /** 0110 0001 0110 1001 dec %ea0 */
2173 printf ("\033[33m%s\033[0m %02x %02x\n",
2174 "/** 0110 0001 0110 1001 dec %ea0 */",
2178 #line 551 "rl78-decode.opc"
2179 ID(sub
); DM(HL
, IMMU(1)); SC(1); Fza
;
2192 /** 0110 0001 0111 0reg xor %0, %1 */
2193 #line 1265 "rl78-decode.opc"
2194 int reg AU
= op
[1] & 0x07;
2197 printf ("\033[33m%s\033[0m %02x %02x\n",
2198 "/** 0110 0001 0111 0reg xor %0, %1 */",
2200 printf (" reg = 0x%x\n", reg
);
2202 SYNTAX("xor %0, %1");
2203 #line 1265 "rl78-decode.opc"
2204 ID(xor); DRB(reg
); SR(A
); Fz
;
2216 /** 0110 0001 0111 1rba xor %0, %1 */
2217 #line 1262 "rl78-decode.opc"
2218 int rba AU
= op
[1] & 0x07;
2221 printf ("\033[33m%s\033[0m %02x %02x\n",
2222 "/** 0110 0001 0111 1rba xor %0, %1 */",
2224 printf (" rba = 0x%x\n", rba
);
2226 SYNTAX("xor %0, %1");
2227 #line 1262 "rl78-decode.opc"
2228 ID(xor); DR(A
); SRB(rba
); Fz
;
2234 /** 0110 0001 0111 1001 incw %ea0 */
2237 printf ("\033[33m%s\033[0m %02x %02x\n",
2238 "/** 0110 0001 0111 1001 incw %ea0 */",
2241 SYNTAX("incw %ea0");
2242 #line 598 "rl78-decode.opc"
2243 ID(add
); W(); DM(HL
, IMMU(1)); SC(1);
2250 /** 0110 0001 1000 000 add %0, %e1 */
2253 printf ("\033[33m%s\033[0m %02x %02x\n",
2254 "/** 0110 0001 1000 000 add %0, %e1 */",
2257 SYNTAX("add %0, %e1");
2258 #line 207 "rl78-decode.opc"
2259 ID(add
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2265 /** 0110 0001 1000 0010 add %0, %e1 */
2268 printf ("\033[33m%s\033[0m %02x %02x\n",
2269 "/** 0110 0001 1000 0010 add %0, %e1 */",
2272 SYNTAX("add %0, %e1");
2273 #line 213 "rl78-decode.opc"
2274 ID(add
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2311 /** 0110 0001 1nnn 01mm callt [%x0] */
2312 #line 433 "rl78-decode.opc"
2313 int nnn AU
= (op
[1] >> 4) & 0x07;
2314 #line 433 "rl78-decode.opc"
2315 int mm AU
= op
[1] & 0x03;
2318 printf ("\033[33m%s\033[0m %02x %02x\n",
2319 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2321 printf (" nnn = 0x%x,", nnn
);
2322 printf (" mm = 0x%x\n", mm
);
2324 SYNTAX("callt [%x0]");
2325 #line 433 "rl78-decode.opc"
2326 ID(call
); DM(None
, 0x80 + mm
*16 + nnn
*2);
2328 /*----------------------------------------------------------------------*/
2340 /** 0110 0001 1000 1reg xch %0, %1 */
2341 #line 1224 "rl78-decode.opc"
2342 int reg AU
= op
[1] & 0x07;
2345 printf ("\033[33m%s\033[0m %02x %02x\n",
2346 "/** 0110 0001 1000 1reg xch %0, %1 */",
2348 printf (" reg = 0x%x\n", reg
);
2350 SYNTAX("xch %0, %1");
2351 #line 1224 "rl78-decode.opc"
2352 /* Note: DECW uses reg == X, so this must follow DECW */
2353 ID(xch
); DR(A
); SRB(reg
);
2359 /** 0110 0001 1000 1001 decw %ea0 */
2362 printf ("\033[33m%s\033[0m %02x %02x\n",
2363 "/** 0110 0001 1000 1001 decw %ea0 */",
2366 SYNTAX("decw %ea0");
2367 #line 565 "rl78-decode.opc"
2368 ID(sub
); W(); DM(HL
, IMMU(1)); SC(1);
2374 /** 0110 0001 1001 0000 addc %0, %e1 */
2377 printf ("\033[33m%s\033[0m %02x %02x\n",
2378 "/** 0110 0001 1001 0000 addc %0, %e1 */",
2381 SYNTAX("addc %0, %e1");
2382 #line 239 "rl78-decode.opc"
2383 ID(addc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2389 /** 0110 0001 1001 0010 addc %0, %e1 */
2392 printf ("\033[33m%s\033[0m %02x %02x\n",
2393 "/** 0110 0001 1001 0010 addc %0, %e1 */",
2396 SYNTAX("addc %0, %e1");
2397 #line 242 "rl78-decode.opc"
2398 ID(addc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2405 /** 0110 0001 1010 000 sub %0, %e1 */
2408 printf ("\033[33m%s\033[0m %02x %02x\n",
2409 "/** 0110 0001 1010 000 sub %0, %e1 */",
2412 SYNTAX("sub %0, %e1");
2413 #line 1125 "rl78-decode.opc"
2414 ID(sub
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2420 /** 0110 0001 1010 0010 sub %0, %e1 */
2423 printf ("\033[33m%s\033[0m %02x %02x\n",
2424 "/** 0110 0001 1010 0010 sub %0, %e1 */",
2427 SYNTAX("sub %0, %e1");
2428 #line 1131 "rl78-decode.opc"
2429 ID(sub
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2435 /** 0110 0001 1010 1000 xch %0, %1 */
2438 printf ("\033[33m%s\033[0m %02x %02x\n",
2439 "/** 0110 0001 1010 1000 xch %0, %1 */",
2442 SYNTAX("xch %0, %1");
2443 #line 1228 "rl78-decode.opc"
2444 ID(xch
); DR(A
); SM(None
, SADDR
);
2450 /** 0110 0001 1010 1001 xch %0, %e1 */
2453 printf ("\033[33m%s\033[0m %02x %02x\n",
2454 "/** 0110 0001 1010 1001 xch %0, %e1 */",
2457 SYNTAX("xch %0, %e1");
2458 #line 1221 "rl78-decode.opc"
2459 ID(xch
); DR(A
); SM2(HL
, C
, 0);
2465 /** 0110 0001 1010 1010 xch %0, %e!1 */
2468 printf ("\033[33m%s\033[0m %02x %02x\n",
2469 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
2472 SYNTAX("xch %0, %e!1");
2473 #line 1203 "rl78-decode.opc"
2474 ID(xch
); DR(A
); SM(None
, IMMU(2));
2480 /** 0110 0001 1010 1011 xch %0, %s1 */
2483 printf ("\033[33m%s\033[0m %02x %02x\n",
2484 "/** 0110 0001 1010 1011 xch %0, %s1 */",
2487 SYNTAX("xch %0, %s1");
2488 #line 1231 "rl78-decode.opc"
2489 ID(xch
); DR(A
); SM(None
, SFR
);
2495 /** 0110 0001 1010 1100 xch %0, %e1 */
2498 printf ("\033[33m%s\033[0m %02x %02x\n",
2499 "/** 0110 0001 1010 1100 xch %0, %e1 */",
2502 SYNTAX("xch %0, %e1");
2503 #line 1212 "rl78-decode.opc"
2504 ID(xch
); DR(A
); SM(HL
, 0);
2510 /** 0110 0001 1010 1101 xch %0, %ea1 */
2513 printf ("\033[33m%s\033[0m %02x %02x\n",
2514 "/** 0110 0001 1010 1101 xch %0, %ea1 */",
2517 SYNTAX("xch %0, %ea1");
2518 #line 1218 "rl78-decode.opc"
2519 ID(xch
); DR(A
); SM(HL
, IMMU(1));
2525 /** 0110 0001 1010 1110 xch %0, %e1 */
2528 printf ("\033[33m%s\033[0m %02x %02x\n",
2529 "/** 0110 0001 1010 1110 xch %0, %e1 */",
2532 SYNTAX("xch %0, %e1");
2533 #line 1206 "rl78-decode.opc"
2534 ID(xch
); DR(A
); SM(DE
, 0);
2540 /** 0110 0001 1010 1111 xch %0, %ea1 */
2543 printf ("\033[33m%s\033[0m %02x %02x\n",
2544 "/** 0110 0001 1010 1111 xch %0, %ea1 */",
2547 SYNTAX("xch %0, %ea1");
2548 #line 1209 "rl78-decode.opc"
2549 ID(xch
); DR(A
); SM(DE
, IMMU(1));
2555 /** 0110 0001 1011 0000 subc %0, %e1 */
2558 printf ("\033[33m%s\033[0m %02x %02x\n",
2559 "/** 0110 0001 1011 0000 subc %0, %e1 */",
2562 SYNTAX("subc %0, %e1");
2563 #line 1157 "rl78-decode.opc"
2564 ID(subc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2570 /** 0110 0001 1011 0010 subc %0, %e1 */
2573 printf ("\033[33m%s\033[0m %02x %02x\n",
2574 "/** 0110 0001 1011 0010 subc %0, %e1 */",
2577 SYNTAX("subc %0, %e1");
2578 #line 1160 "rl78-decode.opc"
2579 ID(subc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2585 /** 0110 0001 1011 1000 mov %0, %1 */
2588 printf ("\033[33m%s\033[0m %02x %02x\n",
2589 "/** 0110 0001 1011 1000 mov %0, %1 */",
2592 SYNTAX("mov %0, %1");
2593 #line 723 "rl78-decode.opc"
2594 ID(mov
); DR(ES
); SM(None
, SADDR
);
2600 /** 0110 0001 1011 1001 xch %0, %e1 */
2603 printf ("\033[33m%s\033[0m %02x %02x\n",
2604 "/** 0110 0001 1011 1001 xch %0, %e1 */",
2607 SYNTAX("xch %0, %e1");
2608 #line 1215 "rl78-decode.opc"
2609 ID(xch
); DR(A
); SM2(HL
, B
, 0);
2615 /** 0110 0001 1100 0000 cmp %0, %e1 */
2618 printf ("\033[33m%s\033[0m %02x %02x\n",
2619 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
2622 SYNTAX("cmp %0, %e1");
2623 #line 492 "rl78-decode.opc"
2624 ID(cmp
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2630 /** 0110 0001 1100 0010 cmp %0, %e1 */
2633 printf ("\033[33m%s\033[0m %02x %02x\n",
2634 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
2637 SYNTAX("cmp %0, %e1");
2638 #line 495 "rl78-decode.opc"
2639 ID(cmp
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2645 /** 0110 0001 1100 0011 bh $%a0 */
2648 printf ("\033[33m%s\033[0m %02x %02x\n",
2649 "/** 0110 0001 1100 0011 bh $%a0 */",
2653 #line 340 "rl78-decode.opc"
2654 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(H
);
2660 /** 0110 0001 1100 1000 sk%c1 */
2663 printf ("\033[33m%s\033[0m %02x %02x\n",
2664 "/** 0110 0001 1100 1000 sk%c1 */",
2668 #line 1094 "rl78-decode.opc"
2675 /** 0110 0001 1100 1001 mov %0, %e1 */
2678 printf ("\033[33m%s\033[0m %02x %02x\n",
2679 "/** 0110 0001 1100 1001 mov %0, %e1 */",
2682 SYNTAX("mov %0, %e1");
2683 #line 660 "rl78-decode.opc"
2684 ID(mov
); DR(A
); SM2(HL
, B
, 0);
2693 /** 0110 0001 11rg 1010 call %0 */
2694 #line 430 "rl78-decode.opc"
2695 int rg AU
= (op
[1] >> 4) & 0x03;
2698 printf ("\033[33m%s\033[0m %02x %02x\n",
2699 "/** 0110 0001 11rg 1010 call %0 */",
2701 printf (" rg = 0x%x\n", rg
);
2704 #line 430 "rl78-decode.opc"
2711 /** 0110 0001 1100 1011 br ax */
2714 printf ("\033[33m%s\033[0m %02x %02x\n",
2715 "/** 0110 0001 1100 1011 br ax */",
2719 #line 380 "rl78-decode.opc"
2722 /*----------------------------------------------------------------------*/
2728 /** 0110 0001 1100 1100 brk */
2731 printf ("\033[33m%s\033[0m %02x %02x\n",
2732 "/** 0110 0001 1100 1100 brk */",
2736 #line 388 "rl78-decode.opc"
2739 /*----------------------------------------------------------------------*/
2745 /** 0110 0001 1100 1101 pop %s0 */
2748 printf ("\033[33m%s\033[0m %02x %02x\n",
2749 "/** 0110 0001 1100 1101 pop %s0 */",
2753 #line 989 "rl78-decode.opc"
2754 ID(mov
); W(); DR(PSW
); SPOP();
2756 /*----------------------------------------------------------------------*/
2762 /** 0110 0001 1100 1110 movs %ea0, %1 */
2765 printf ("\033[33m%s\033[0m %02x %02x\n",
2766 "/** 0110 0001 1100 1110 movs %ea0, %1 */",
2769 SYNTAX("movs %ea0, %1");
2770 #line 811 "rl78-decode.opc"
2771 ID(mov
); DM(HL
, IMMU(1)); SR(X
); Fzc
;
2773 /*----------------------------------------------------------------------*/
2782 /** 0110 0001 11rb 1111 sel rb%1 */
2783 #line 1041 "rl78-decode.opc"
2784 int rb AU
= (op
[1] >> 4) & 0x03;
2787 printf ("\033[33m%s\033[0m %02x %02x\n",
2788 "/** 0110 0001 11rb 1111 sel rb%1 */",
2790 printf (" rb = 0x%x\n", rb
);
2793 #line 1041 "rl78-decode.opc"
2796 /*----------------------------------------------------------------------*/
2802 /** 0110 0001 1101 0000 and %0, %e1 */
2805 printf ("\033[33m%s\033[0m %02x %02x\n",
2806 "/** 0110 0001 1101 0000 and %0, %e1 */",
2809 SYNTAX("and %0, %e1");
2810 #line 291 "rl78-decode.opc"
2811 ID(and); DR(A
); SM2(HL
, B
, 0); Fz
;
2817 /** 0110 0001 1101 0010 and %0, %e1 */
2820 printf ("\033[33m%s\033[0m %02x %02x\n",
2821 "/** 0110 0001 1101 0010 and %0, %e1 */",
2824 SYNTAX("and %0, %e1");
2825 #line 297 "rl78-decode.opc"
2826 ID(and); DR(A
); SM2(HL
, C
, 0); Fz
;
2832 /** 0110 0001 1101 0011 bnh $%a0 */
2835 printf ("\033[33m%s\033[0m %02x %02x\n",
2836 "/** 0110 0001 1101 0011 bnh $%a0 */",
2840 #line 343 "rl78-decode.opc"
2841 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(NH
);
2847 /** 0110 0001 1101 1000 sk%c1 */
2850 printf ("\033[33m%s\033[0m %02x %02x\n",
2851 "/** 0110 0001 1101 1000 sk%c1 */",
2855 #line 1100 "rl78-decode.opc"
2862 /** 0110 0001 1101 1001 mov %e0, %1 */
2865 printf ("\033[33m%s\033[0m %02x %02x\n",
2866 "/** 0110 0001 1101 1001 mov %e0, %1 */",
2869 SYNTAX("mov %e0, %1");
2870 #line 627 "rl78-decode.opc"
2871 ID(mov
); DM2(HL
, B
, 0); SR(A
);
2877 /** 0110 0001 1101 1011 ror %0, %1 */
2880 printf ("\033[33m%s\033[0m %02x %02x\n",
2881 "/** 0110 0001 1101 1011 ror %0, %1 */",
2884 SYNTAX("ror %0, %1");
2885 #line 1022 "rl78-decode.opc"
2886 ID(ror
); DR(A
); SC(1);
2892 /** 0110 0001 1101 1100 rolc %0, %1 */
2895 printf ("\033[33m%s\033[0m %02x %02x\n",
2896 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2899 SYNTAX("rolc %0, %1");
2900 #line 1016 "rl78-decode.opc"
2901 ID(rolc
); DR(A
); SC(1);
2907 /** 0110 0001 1101 1101 push %s1 */
2910 printf ("\033[33m%s\033[0m %02x %02x\n",
2911 "/** 0110 0001 1101 1101 push %s1 */",
2915 #line 997 "rl78-decode.opc"
2916 ID(mov
); W(); DPUSH(); SR(PSW
);
2918 /*----------------------------------------------------------------------*/
2924 /** 0110 0001 1101 1110 cmps %0, %ea1 */
2927 printf ("\033[33m%s\033[0m %02x %02x\n",
2928 "/** 0110 0001 1101 1110 cmps %0, %ea1 */",
2931 SYNTAX("cmps %0, %ea1");
2932 #line 526 "rl78-decode.opc"
2933 ID(cmp
); DR(X
); SM(HL
, IMMU(1)); Fzac
;
2935 /*----------------------------------------------------------------------*/
2941 /** 0110 0001 1110 0000 or %0, %e1 */
2944 printf ("\033[33m%s\033[0m %02x %02x\n",
2945 "/** 0110 0001 1110 0000 or %0, %e1 */",
2948 SYNTAX("or %0, %e1");
2949 #line 946 "rl78-decode.opc"
2950 ID(or); DR(A
); SM2(HL
, B
, 0); Fz
;
2956 /** 0110 0001 1110 0010 or %0, %e1 */
2959 printf ("\033[33m%s\033[0m %02x %02x\n",
2960 "/** 0110 0001 1110 0010 or %0, %e1 */",
2963 SYNTAX("or %0, %e1");
2964 #line 952 "rl78-decode.opc"
2965 ID(or); DR(A
); SM2(HL
, C
, 0); Fz
;
2971 /** 0110 0001 1110 0011 sk%c1 */
2974 printf ("\033[33m%s\033[0m %02x %02x\n",
2975 "/** 0110 0001 1110 0011 sk%c1 */",
2979 #line 1097 "rl78-decode.opc"
2986 /** 0110 0001 1110 1000 sk%c1 */
2989 printf ("\033[33m%s\033[0m %02x %02x\n",
2990 "/** 0110 0001 1110 1000 sk%c1 */",
2994 #line 1109 "rl78-decode.opc"
2997 /*----------------------------------------------------------------------*/
3003 /** 0110 0001 1110 1001 mov %0, %e1 */
3006 printf ("\033[33m%s\033[0m %02x %02x\n",
3007 "/** 0110 0001 1110 1001 mov %0, %e1 */",
3010 SYNTAX("mov %0, %e1");
3011 #line 663 "rl78-decode.opc"
3012 ID(mov
); DR(A
); SM2(HL
, C
, 0);
3018 /** 0110 0001 1110 1011 rol %0, %1 */
3021 printf ("\033[33m%s\033[0m %02x %02x\n",
3022 "/** 0110 0001 1110 1011 rol %0, %1 */",
3025 SYNTAX("rol %0, %1");
3026 #line 1013 "rl78-decode.opc"
3027 ID(rol
); DR(A
); SC(1);
3033 /** 0110 0001 1110 1100 retb */
3036 printf ("\033[33m%s\033[0m %02x %02x\n",
3037 "/** 0110 0001 1110 1100 retb */",
3041 #line 1008 "rl78-decode.opc"
3044 /*----------------------------------------------------------------------*/
3050 /** 0110 0001 1110 1101 halt */
3053 printf ("\033[33m%s\033[0m %02x %02x\n",
3054 "/** 0110 0001 1110 1101 halt */",
3058 #line 576 "rl78-decode.opc"
3061 /*----------------------------------------------------------------------*/
3068 /** 0110 0001 111r 1110 rolwc %0, %1 */
3069 #line 1019 "rl78-decode.opc"
3070 int r AU
= (op
[1] >> 4) & 0x01;
3073 printf ("\033[33m%s\033[0m %02x %02x\n",
3074 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3076 printf (" r = 0x%x\n", r
);
3078 SYNTAX("rolwc %0, %1");
3079 #line 1019 "rl78-decode.opc"
3080 ID(rolc
); W(); DRW(r
); SC(1);
3086 /** 0110 0001 1111 0000 xor %0, %e1 */
3089 printf ("\033[33m%s\033[0m %02x %02x\n",
3090 "/** 0110 0001 1111 0000 xor %0, %e1 */",
3093 SYNTAX("xor %0, %e1");
3094 #line 1250 "rl78-decode.opc"
3095 ID(xor); DR(A
); SM2(HL
, B
, 0); Fz
;
3101 /** 0110 0001 1111 0010 xor %0, %e1 */
3104 printf ("\033[33m%s\033[0m %02x %02x\n",
3105 "/** 0110 0001 1111 0010 xor %0, %e1 */",
3108 SYNTAX("xor %0, %e1");
3109 #line 1256 "rl78-decode.opc"
3110 ID(xor); DR(A
); SM2(HL
, C
, 0); Fz
;
3116 /** 0110 0001 1111 0011 sk%c1 */
3119 printf ("\033[33m%s\033[0m %02x %02x\n",
3120 "/** 0110 0001 1111 0011 sk%c1 */",
3124 #line 1103 "rl78-decode.opc"
3131 /** 0110 0001 1111 1000 sk%c1 */
3134 printf ("\033[33m%s\033[0m %02x %02x\n",
3135 "/** 0110 0001 1111 1000 sk%c1 */",
3139 #line 1106 "rl78-decode.opc"
3146 /** 0110 0001 1111 1001 mov %e0, %1 */
3149 printf ("\033[33m%s\033[0m %02x %02x\n",
3150 "/** 0110 0001 1111 1001 mov %e0, %1 */",
3153 SYNTAX("mov %e0, %1");
3154 #line 636 "rl78-decode.opc"
3155 ID(mov
); DM2(HL
, C
, 0); SR(A
);
3161 /** 0110 0001 1111 1011 rorc %0, %1 */
3164 printf ("\033[33m%s\033[0m %02x %02x\n",
3165 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3168 SYNTAX("rorc %0, %1");
3169 #line 1025 "rl78-decode.opc"
3170 ID(rorc
); DR(A
); SC(1);
3172 /*----------------------------------------------------------------------*/
3174 /* Note that the branch insns need to be listed before the shift
3175 ones, as "shift count of zero" means "branch insn" */
3181 /** 0110 0001 1111 1100 reti */
3184 printf ("\033[33m%s\033[0m %02x %02x\n",
3185 "/** 0110 0001 1111 1100 reti */",
3189 #line 1005 "rl78-decode.opc"
3196 /** 0110 0001 1111 1101 stop */
3199 printf ("\033[33m%s\033[0m %02x %02x\n",
3200 "/** 0110 0001 1111 1101 stop */",
3204 #line 1114 "rl78-decode.opc"
3207 /*----------------------------------------------------------------------*/
3211 default: UNSUPPORTED(); break;
3216 /** 0110 1000 movw %e0, %1 */
3219 printf ("\033[33m%s\033[0m %02x\n",
3220 "/** 0110 1000 movw %e0, %1 */",
3223 SYNTAX("movw %e0, %1");
3224 #line 874 "rl78-decode.opc"
3225 ID(mov
); W(); DM(C
, IMMU(2)); SR(AX
);
3231 /** 0110 1001 movw %0, %e1 */
3234 printf ("\033[33m%s\033[0m %02x\n",
3235 "/** 0110 1001 movw %0, %e1 */",
3238 SYNTAX("movw %0, %e1");
3239 #line 865 "rl78-decode.opc"
3240 ID(mov
); W(); DR(AX
); SM(C
, IMMU(2));
3246 /** 0110 1010 or %0, #%1 */
3249 printf ("\033[33m%s\033[0m %02x\n",
3250 "/** 0110 1010 or %0, #%1 */",
3253 SYNTAX("or %0, #%1");
3254 #line 967 "rl78-decode.opc"
3255 ID(or); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
3257 /*----------------------------------------------------------------------*/
3263 /** 0110 1011 or %0, %1 */
3266 printf ("\033[33m%s\033[0m %02x\n",
3267 "/** 0110 1011 or %0, %1 */",
3270 SYNTAX("or %0, %1");
3271 #line 964 "rl78-decode.opc"
3272 ID(or); DR(A
); SM(None
, SADDR
); Fz
;
3278 /** 0110 1100 or %0, #%1 */
3281 printf ("\033[33m%s\033[0m %02x\n",
3282 "/** 0110 1100 or %0, #%1 */",
3285 SYNTAX("or %0, #%1");
3286 #line 955 "rl78-decode.opc"
3287 ID(or); DR(A
); SC(IMMU(1)); Fz
;
3293 /** 0110 1101 or %0, %e1 */
3296 printf ("\033[33m%s\033[0m %02x\n",
3297 "/** 0110 1101 or %0, %e1 */",
3300 SYNTAX("or %0, %e1");
3301 #line 943 "rl78-decode.opc"
3302 ID(or); DR(A
); SM(HL
, 0); Fz
;
3308 /** 0110 1110 or %0, %ea1 */
3311 printf ("\033[33m%s\033[0m %02x\n",
3312 "/** 0110 1110 or %0, %ea1 */",
3315 SYNTAX("or %0, %ea1");
3316 #line 949 "rl78-decode.opc"
3317 ID(or); DR(A
); SM(HL
, IMMU(1)); Fz
;
3323 /** 0110 1111 or %0, %e!1 */
3326 printf ("\033[33m%s\033[0m %02x\n",
3327 "/** 0110 1111 or %0, %e!1 */",
3330 SYNTAX("or %0, %e!1");
3331 #line 940 "rl78-decode.opc"
3332 ID(or); DR(A
); SM(None
, IMMU(2)); Fz
;
3344 /** 0111 0rba mov %0, %1 */
3345 #line 696 "rl78-decode.opc"
3346 int rba AU
= op
[0] & 0x07;
3349 printf ("\033[33m%s\033[0m %02x\n",
3350 "/** 0111 0rba mov %0, %1 */",
3352 printf (" rba = 0x%x\n", rba
);
3354 SYNTAX("mov %0, %1");
3355 #line 696 "rl78-decode.opc"
3356 ID(mov
); DRB(rba
); SR(A
);
3362 switch (op
[1] & 0xff)
3373 /** 0111 0001 0bit 0000 set1 %e!0 */
3374 #line 1046 "rl78-decode.opc"
3375 int bit AU
= (op
[1] >> 4) & 0x07;
3378 printf ("\033[33m%s\033[0m %02x %02x\n",
3379 "/** 0111 0001 0bit 0000 set1 %e!0 */",
3381 printf (" bit = 0x%x\n", bit
);
3383 SYNTAX("set1 %e!0");
3384 #line 1046 "rl78-decode.opc"
3385 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(1);
3398 /** 0111 0001 0bit 0001 mov1 %0, cy */
3399 #line 803 "rl78-decode.opc"
3400 int bit AU
= (op
[1] >> 4) & 0x07;
3403 printf ("\033[33m%s\033[0m %02x %02x\n",
3404 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3406 printf (" bit = 0x%x\n", bit
);
3408 SYNTAX("mov1 %0, cy");
3409 #line 803 "rl78-decode.opc"
3410 ID(mov
); DM(None
, SADDR
); DB(bit
); SCY();
3423 /** 0111 0001 0bit 0010 set1 %0 */
3424 #line 1064 "rl78-decode.opc"
3425 int bit AU
= (op
[1] >> 4) & 0x07;
3428 printf ("\033[33m%s\033[0m %02x %02x\n",
3429 "/** 0111 0001 0bit 0010 set1 %0 */",
3431 printf (" bit = 0x%x\n", bit
);
3434 #line 1064 "rl78-decode.opc"
3435 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(1);
3437 /*----------------------------------------------------------------------*/
3450 /** 0111 0001 0bit 0011 clr1 %0 */
3451 #line 456 "rl78-decode.opc"
3452 int bit AU
= (op
[1] >> 4) & 0x07;
3455 printf ("\033[33m%s\033[0m %02x %02x\n",
3456 "/** 0111 0001 0bit 0011 clr1 %0 */",
3458 printf (" bit = 0x%x\n", bit
);
3461 #line 456 "rl78-decode.opc"
3462 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(0);
3464 /*----------------------------------------------------------------------*/
3477 /** 0111 0001 0bit 0100 mov1 cy, %1 */
3478 #line 797 "rl78-decode.opc"
3479 int bit AU
= (op
[1] >> 4) & 0x07;
3482 printf ("\033[33m%s\033[0m %02x %02x\n",
3483 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3485 printf (" bit = 0x%x\n", bit
);
3487 SYNTAX("mov1 cy, %1");
3488 #line 797 "rl78-decode.opc"
3489 ID(mov
); DCY(); SM(None
, SADDR
); SB(bit
);
3502 /** 0111 0001 0bit 0101 and1 cy, %s1 */
3503 #line 326 "rl78-decode.opc"
3504 int bit AU
= (op
[1] >> 4) & 0x07;
3507 printf ("\033[33m%s\033[0m %02x %02x\n",
3508 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3510 printf (" bit = 0x%x\n", bit
);
3512 SYNTAX("and1 cy, %s1");
3513 #line 326 "rl78-decode.opc"
3514 ID(and); DCY(); SM(None
, SADDR
); SB(bit
);
3516 /*----------------------------------------------------------------------*/
3518 /* Note that the branch insns need to be listed before the shift
3519 ones, as "shift count of zero" means "branch insn" */
3532 /** 0111 0001 0bit 0110 or1 cy, %s1 */
3533 #line 981 "rl78-decode.opc"
3534 int bit AU
= (op
[1] >> 4) & 0x07;
3537 printf ("\033[33m%s\033[0m %02x %02x\n",
3538 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3540 printf (" bit = 0x%x\n", bit
);
3542 SYNTAX("or1 cy, %s1");
3543 #line 981 "rl78-decode.opc"
3544 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3546 /*----------------------------------------------------------------------*/
3559 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3560 #line 1285 "rl78-decode.opc"
3561 int bit AU
= (op
[1] >> 4) & 0x07;
3564 printf ("\033[33m%s\033[0m %02x %02x\n",
3565 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3567 printf (" bit = 0x%x\n", bit
);
3569 SYNTAX("xor1 cy, %s1");
3570 #line 1285 "rl78-decode.opc"
3571 ID(xor); DCY(); SM(None
, SADDR
); SB(bit
);
3573 /*----------------------------------------------------------------------*/
3586 /** 0111 0001 0bit 1000 clr1 %e!0 */
3587 #line 438 "rl78-decode.opc"
3588 int bit AU
= (op
[1] >> 4) & 0x07;
3591 printf ("\033[33m%s\033[0m %02x %02x\n",
3592 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
3594 printf (" bit = 0x%x\n", bit
);
3596 SYNTAX("clr1 %e!0");
3597 #line 438 "rl78-decode.opc"
3598 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(0);
3611 /** 0111 0001 0bit 1001 mov1 %s0, cy */
3612 #line 806 "rl78-decode.opc"
3613 int bit AU
= (op
[1] >> 4) & 0x07;
3616 printf ("\033[33m%s\033[0m %02x %02x\n",
3617 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3619 printf (" bit = 0x%x\n", bit
);
3621 SYNTAX("mov1 %s0, cy");
3622 #line 806 "rl78-decode.opc"
3623 ID(mov
); DM(None
, SFR
); DB(bit
); SCY();
3625 /*----------------------------------------------------------------------*/
3638 /** 0111 0001 0bit 1010 set1 %s0 */
3639 #line 1058 "rl78-decode.opc"
3640 int bit AU
= (op
[1] >> 4) & 0x07;
3643 printf ("\033[33m%s\033[0m %02x %02x\n",
3644 "/** 0111 0001 0bit 1010 set1 %s0 */",
3646 printf (" bit = 0x%x\n", bit
);
3649 #line 1058 "rl78-decode.opc"
3651 ID(mov
); DM(None
, op0
); DB(bit
); SC(1);
3652 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3653 rl78
->syntax
= "ei";
3666 /** 0111 0001 0bit 1011 clr1 %s0 */
3667 #line 450 "rl78-decode.opc"
3668 int bit AU
= (op
[1] >> 4) & 0x07;
3671 printf ("\033[33m%s\033[0m %02x %02x\n",
3672 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3674 printf (" bit = 0x%x\n", bit
);
3677 #line 450 "rl78-decode.opc"
3679 ID(mov
); DM(None
, op0
); DB(bit
); SC(0);
3680 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3681 rl78
->syntax
= "di";
3694 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
3695 #line 800 "rl78-decode.opc"
3696 int bit AU
= (op
[1] >> 4) & 0x07;
3699 printf ("\033[33m%s\033[0m %02x %02x\n",
3700 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3702 printf (" bit = 0x%x\n", bit
);
3704 SYNTAX("mov1 cy, %s1");
3705 #line 800 "rl78-decode.opc"
3706 ID(mov
); DCY(); SM(None
, SFR
); SB(bit
);
3719 /** 0111 0001 0bit 1101 and1 cy, %s1 */
3720 #line 323 "rl78-decode.opc"
3721 int bit AU
= (op
[1] >> 4) & 0x07;
3724 printf ("\033[33m%s\033[0m %02x %02x\n",
3725 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3727 printf (" bit = 0x%x\n", bit
);
3729 SYNTAX("and1 cy, %s1");
3730 #line 323 "rl78-decode.opc"
3731 ID(and); DCY(); SM(None
, SFR
); SB(bit
);
3744 /** 0111 0001 0bit 1110 or1 cy, %s1 */
3745 #line 978 "rl78-decode.opc"
3746 int bit AU
= (op
[1] >> 4) & 0x07;
3749 printf ("\033[33m%s\033[0m %02x %02x\n",
3750 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3752 printf (" bit = 0x%x\n", bit
);
3754 SYNTAX("or1 cy, %s1");
3755 #line 978 "rl78-decode.opc"
3756 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3769 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3770 #line 1282 "rl78-decode.opc"
3771 int bit AU
= (op
[1] >> 4) & 0x07;
3774 printf ("\033[33m%s\033[0m %02x %02x\n",
3775 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3777 printf (" bit = 0x%x\n", bit
);
3779 SYNTAX("xor1 cy, %s1");
3780 #line 1282 "rl78-decode.opc"
3781 ID(xor); DCY(); SM(None
, SFR
); SB(bit
);
3787 /** 0111 0001 1000 0000 set1 cy */
3790 printf ("\033[33m%s\033[0m %02x %02x\n",
3791 "/** 0111 0001 1000 0000 set1 cy */",
3795 #line 1055 "rl78-decode.opc"
3796 ID(mov
); DCY(); SC(1);
3809 /** 0111 0001 1bit 0001 mov1 %e0, cy */
3810 #line 785 "rl78-decode.opc"
3811 int bit AU
= (op
[1] >> 4) & 0x07;
3814 printf ("\033[33m%s\033[0m %02x %02x\n",
3815 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
3817 printf (" bit = 0x%x\n", bit
);
3819 SYNTAX("mov1 %e0, cy");
3820 #line 785 "rl78-decode.opc"
3821 ID(mov
); DM(HL
, 0); DB(bit
); SCY();
3834 /** 0111 0001 1bit 0010 set1 %e0 */
3835 #line 1049 "rl78-decode.opc"
3836 int bit AU
= (op
[1] >> 4) & 0x07;
3839 printf ("\033[33m%s\033[0m %02x %02x\n",
3840 "/** 0111 0001 1bit 0010 set1 %e0 */",
3842 printf (" bit = 0x%x\n", bit
);
3845 #line 1049 "rl78-decode.opc"
3846 ID(mov
); DM(HL
, 0); DB(bit
); SC(1);
3859 /** 0111 0001 1bit 0011 clr1 %e0 */
3860 #line 441 "rl78-decode.opc"
3861 int bit AU
= (op
[1] >> 4) & 0x07;
3864 printf ("\033[33m%s\033[0m %02x %02x\n",
3865 "/** 0111 0001 1bit 0011 clr1 %e0 */",
3867 printf (" bit = 0x%x\n", bit
);
3870 #line 441 "rl78-decode.opc"
3871 ID(mov
); DM(HL
, 0); DB(bit
); SC(0);
3884 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
3885 #line 791 "rl78-decode.opc"
3886 int bit AU
= (op
[1] >> 4) & 0x07;
3889 printf ("\033[33m%s\033[0m %02x %02x\n",
3890 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
3892 printf (" bit = 0x%x\n", bit
);
3894 SYNTAX("mov1 cy, %e1");
3895 #line 791 "rl78-decode.opc"
3896 ID(mov
); DCY(); SM(HL
, 0); SB(bit
);
3909 /** 0111 0001 1bit 0101 and1 cy, %e1 */
3910 #line 317 "rl78-decode.opc"
3911 int bit AU
= (op
[1] >> 4) & 0x07;
3914 printf ("\033[33m%s\033[0m %02x %02x\n",
3915 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
3917 printf (" bit = 0x%x\n", bit
);
3919 SYNTAX("and1 cy, %e1");
3920 #line 317 "rl78-decode.opc"
3921 ID(and); DCY(); SM(HL
, 0); SB(bit
);
3934 /** 0111 0001 1bit 0110 or1 cy, %e1 */
3935 #line 972 "rl78-decode.opc"
3936 int bit AU
= (op
[1] >> 4) & 0x07;
3939 printf ("\033[33m%s\033[0m %02x %02x\n",
3940 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
3942 printf (" bit = 0x%x\n", bit
);
3944 SYNTAX("or1 cy, %e1");
3945 #line 972 "rl78-decode.opc"
3946 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3959 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
3960 #line 1276 "rl78-decode.opc"
3961 int bit AU
= (op
[1] >> 4) & 0x07;
3964 printf ("\033[33m%s\033[0m %02x %02x\n",
3965 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
3967 printf (" bit = 0x%x\n", bit
);
3969 SYNTAX("xor1 cy, %e1");
3970 #line 1276 "rl78-decode.opc"
3971 ID(xor); DCY(); SM(HL
, 0); SB(bit
);
3977 /** 0111 0001 1000 1000 clr1 cy */
3980 printf ("\033[33m%s\033[0m %02x %02x\n",
3981 "/** 0111 0001 1000 1000 clr1 cy */",
3985 #line 447 "rl78-decode.opc"
3986 ID(mov
); DCY(); SC(0);
3999 /** 0111 0001 1bit 1001 mov1 %e0, cy */
4000 #line 788 "rl78-decode.opc"
4001 int bit AU
= (op
[1] >> 4) & 0x07;
4004 printf ("\033[33m%s\033[0m %02x %02x\n",
4005 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
4007 printf (" bit = 0x%x\n", bit
);
4009 SYNTAX("mov1 %e0, cy");
4010 #line 788 "rl78-decode.opc"
4011 ID(mov
); DR(A
); DB(bit
); SCY();
4024 /** 0111 0001 1bit 1010 set1 %0 */
4025 #line 1052 "rl78-decode.opc"
4026 int bit AU
= (op
[1] >> 4) & 0x07;
4029 printf ("\033[33m%s\033[0m %02x %02x\n",
4030 "/** 0111 0001 1bit 1010 set1 %0 */",
4032 printf (" bit = 0x%x\n", bit
);
4035 #line 1052 "rl78-decode.opc"
4036 ID(mov
); DR(A
); DB(bit
); SC(1);
4049 /** 0111 0001 1bit 1011 clr1 %0 */
4050 #line 444 "rl78-decode.opc"
4051 int bit AU
= (op
[1] >> 4) & 0x07;
4054 printf ("\033[33m%s\033[0m %02x %02x\n",
4055 "/** 0111 0001 1bit 1011 clr1 %0 */",
4057 printf (" bit = 0x%x\n", bit
);
4060 #line 444 "rl78-decode.opc"
4061 ID(mov
); DR(A
); DB(bit
); SC(0);
4074 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
4075 #line 794 "rl78-decode.opc"
4076 int bit AU
= (op
[1] >> 4) & 0x07;
4079 printf ("\033[33m%s\033[0m %02x %02x\n",
4080 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
4082 printf (" bit = 0x%x\n", bit
);
4084 SYNTAX("mov1 cy, %e1");
4085 #line 794 "rl78-decode.opc"
4086 ID(mov
); DCY(); SR(A
); SB(bit
);
4099 /** 0111 0001 1bit 1101 and1 cy, %1 */
4100 #line 320 "rl78-decode.opc"
4101 int bit AU
= (op
[1] >> 4) & 0x07;
4104 printf ("\033[33m%s\033[0m %02x %02x\n",
4105 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4107 printf (" bit = 0x%x\n", bit
);
4109 SYNTAX("and1 cy, %1");
4110 #line 320 "rl78-decode.opc"
4111 ID(and); DCY(); SR(A
); SB(bit
);
4124 /** 0111 0001 1bit 1110 or1 cy, %1 */
4125 #line 975 "rl78-decode.opc"
4126 int bit AU
= (op
[1] >> 4) & 0x07;
4129 printf ("\033[33m%s\033[0m %02x %02x\n",
4130 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4132 printf (" bit = 0x%x\n", bit
);
4134 SYNTAX("or1 cy, %1");
4135 #line 975 "rl78-decode.opc"
4136 ID(or); DCY(); SR(A
); SB(bit
);
4149 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4150 #line 1279 "rl78-decode.opc"
4151 int bit AU
= (op
[1] >> 4) & 0x07;
4154 printf ("\033[33m%s\033[0m %02x %02x\n",
4155 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4157 printf (" bit = 0x%x\n", bit
);
4159 SYNTAX("xor1 cy, %1");
4160 #line 1279 "rl78-decode.opc"
4161 ID(xor); DCY(); SR(A
); SB(bit
);
4167 /** 0111 0001 1100 0000 not1 cy */
4170 printf ("\033[33m%s\033[0m %02x %02x\n",
4171 "/** 0111 0001 1100 0000 not1 cy */",
4175 #line 916 "rl78-decode.opc"
4176 ID(xor); DCY(); SC(1);
4178 /*----------------------------------------------------------------------*/
4182 default: UNSUPPORTED(); break;
4187 /** 0111 1000 movw %e0, %1 */
4190 printf ("\033[33m%s\033[0m %02x\n",
4191 "/** 0111 1000 movw %e0, %1 */",
4194 SYNTAX("movw %e0, %1");
4195 #line 877 "rl78-decode.opc"
4196 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4202 /** 0111 1001 movw %0, %e1 */
4205 printf ("\033[33m%s\033[0m %02x\n",
4206 "/** 0111 1001 movw %0, %e1 */",
4209 SYNTAX("movw %0, %e1");
4210 #line 868 "rl78-decode.opc"
4211 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4217 /** 0111 1010 xor %0, #%1 */
4220 printf ("\033[33m%s\033[0m %02x\n",
4221 "/** 0111 1010 xor %0, #%1 */",
4224 SYNTAX("xor %0, #%1");
4225 #line 1271 "rl78-decode.opc"
4226 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4228 /*----------------------------------------------------------------------*/
4234 /** 0111 1011 xor %0, %1 */
4237 printf ("\033[33m%s\033[0m %02x\n",
4238 "/** 0111 1011 xor %0, %1 */",
4241 SYNTAX("xor %0, %1");
4242 #line 1268 "rl78-decode.opc"
4243 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4249 /** 0111 1100 xor %0, #%1 */
4252 printf ("\033[33m%s\033[0m %02x\n",
4253 "/** 0111 1100 xor %0, #%1 */",
4256 SYNTAX("xor %0, #%1");
4257 #line 1259 "rl78-decode.opc"
4258 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4264 /** 0111 1101 xor %0, %e1 */
4267 printf ("\033[33m%s\033[0m %02x\n",
4268 "/** 0111 1101 xor %0, %e1 */",
4271 SYNTAX("xor %0, %e1");
4272 #line 1247 "rl78-decode.opc"
4273 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4279 /** 0111 1110 xor %0, %ea1 */
4282 printf ("\033[33m%s\033[0m %02x\n",
4283 "/** 0111 1110 xor %0, %ea1 */",
4286 SYNTAX("xor %0, %ea1");
4287 #line 1253 "rl78-decode.opc"
4288 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4294 /** 0111 1111 xor %0, %e!1 */
4297 printf ("\033[33m%s\033[0m %02x\n",
4298 "/** 0111 1111 xor %0, %e!1 */",
4301 SYNTAX("xor %0, %e!1");
4302 #line 1244 "rl78-decode.opc"
4303 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4316 /** 1000 0reg inc %0 */
4317 #line 587 "rl78-decode.opc"
4318 int reg AU
= op
[0] & 0x07;
4321 printf ("\033[33m%s\033[0m %02x\n",
4322 "/** 1000 0reg inc %0 */",
4324 printf (" reg = 0x%x\n", reg
);
4327 #line 587 "rl78-decode.opc"
4328 ID(add
); DRB(reg
); SC(1); Fza
;
4334 /** 1000 1000 mov %0, %ea1 */
4337 printf ("\033[33m%s\033[0m %02x\n",
4338 "/** 1000 1000 mov %0, %ea1 */",
4341 SYNTAX("mov %0, %ea1");
4342 #line 666 "rl78-decode.opc"
4343 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4349 /** 1000 1001 mov %0, %e1 */
4352 printf ("\033[33m%s\033[0m %02x\n",
4353 "/** 1000 1001 mov %0, %e1 */",
4356 SYNTAX("mov %0, %e1");
4357 #line 648 "rl78-decode.opc"
4358 ID(mov
); DR(A
); SM(DE
, 0);
4364 /** 1000 1010 mov %0, %ea1 */
4367 printf ("\033[33m%s\033[0m %02x\n",
4368 "/** 1000 1010 mov %0, %ea1 */",
4371 SYNTAX("mov %0, %ea1");
4372 #line 651 "rl78-decode.opc"
4373 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4379 /** 1000 1011 mov %0, %e1 */
4382 printf ("\033[33m%s\033[0m %02x\n",
4383 "/** 1000 1011 mov %0, %e1 */",
4386 SYNTAX("mov %0, %e1");
4387 #line 654 "rl78-decode.opc"
4388 ID(mov
); DR(A
); SM(HL
, 0);
4394 /** 1000 1100 mov %0, %ea1 */
4397 printf ("\033[33m%s\033[0m %02x\n",
4398 "/** 1000 1100 mov %0, %ea1 */",
4401 SYNTAX("mov %0, %ea1");
4402 #line 657 "rl78-decode.opc"
4403 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4409 /** 1000 1101 mov %0, %1 */
4412 printf ("\033[33m%s\033[0m %02x\n",
4413 "/** 1000 1101 mov %0, %1 */",
4416 SYNTAX("mov %0, %1");
4417 #line 690 "rl78-decode.opc"
4418 ID(mov
); DR(A
); SM(None
, SADDR
);
4424 /** 1000 1110 mov %0, %s1 */
4427 printf ("\033[33m%s\033[0m %02x\n",
4428 "/** 1000 1110 mov %0, %s1 */",
4431 SYNTAX("mov %0, %s1");
4432 #line 687 "rl78-decode.opc"
4433 ID(mov
); DR(A
); SM(None
, SFR
);
4439 /** 1000 1111 mov %0, %e!1 */
4442 printf ("\033[33m%s\033[0m %02x\n",
4443 "/** 1000 1111 mov %0, %e!1 */",
4446 SYNTAX("mov %0, %e!1");
4447 #line 645 "rl78-decode.opc"
4448 ID(mov
); DR(A
); SM(None
, IMMU(2));
4461 /** 1001 0reg dec %0 */
4462 #line 554 "rl78-decode.opc"
4463 int reg AU
= op
[0] & 0x07;
4466 printf ("\033[33m%s\033[0m %02x\n",
4467 "/** 1001 0reg dec %0 */",
4469 printf (" reg = 0x%x\n", reg
);
4472 #line 554 "rl78-decode.opc"
4473 ID(sub
); DRB(reg
); SC(1); Fza
;
4479 /** 1001 1000 mov %a0, %1 */
4482 printf ("\033[33m%s\033[0m %02x\n",
4483 "/** 1001 1000 mov %a0, %1 */",
4486 SYNTAX("mov %a0, %1");
4487 #line 642 "rl78-decode.opc"
4488 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4494 /** 1001 1001 mov %e0, %1 */
4497 printf ("\033[33m%s\033[0m %02x\n",
4498 "/** 1001 1001 mov %e0, %1 */",
4501 SYNTAX("mov %e0, %1");
4502 #line 615 "rl78-decode.opc"
4503 ID(mov
); DM(DE
, 0); SR(A
);
4509 /** 1001 1010 mov %ea0, %1 */
4512 printf ("\033[33m%s\033[0m %02x\n",
4513 "/** 1001 1010 mov %ea0, %1 */",
4516 SYNTAX("mov %ea0, %1");
4517 #line 621 "rl78-decode.opc"
4518 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4524 /** 1001 1011 mov %e0, %1 */
4527 printf ("\033[33m%s\033[0m %02x\n",
4528 "/** 1001 1011 mov %e0, %1 */",
4531 SYNTAX("mov %e0, %1");
4532 #line 624 "rl78-decode.opc"
4533 ID(mov
); DM(HL
, 0); SR(A
);
4539 /** 1001 1100 mov %ea0, %1 */
4542 printf ("\033[33m%s\033[0m %02x\n",
4543 "/** 1001 1100 mov %ea0, %1 */",
4546 SYNTAX("mov %ea0, %1");
4547 #line 633 "rl78-decode.opc"
4548 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4554 /** 1001 1101 mov %0, %1 */
4557 printf ("\033[33m%s\033[0m %02x\n",
4558 "/** 1001 1101 mov %0, %1 */",
4561 SYNTAX("mov %0, %1");
4562 #line 747 "rl78-decode.opc"
4563 ID(mov
); DM(None
, SADDR
); SR(A
);
4569 /** 1001 1110 mov %s0, %1 */
4572 printf ("\033[33m%s\033[0m %02x\n",
4573 "/** 1001 1110 mov %s0, %1 */",
4576 SYNTAX("mov %s0, %1");
4577 #line 780 "rl78-decode.opc"
4578 ID(mov
); DM(None
, SFR
); SR(A
);
4580 /*----------------------------------------------------------------------*/
4586 /** 1001 1111 mov %e!0, %1 */
4589 printf ("\033[33m%s\033[0m %02x\n",
4590 "/** 1001 1111 mov %e!0, %1 */",
4593 SYNTAX("mov %e!0, %1");
4594 #line 612 "rl78-decode.opc"
4595 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4601 /** 1010 0000 inc %e!0 */
4604 printf ("\033[33m%s\033[0m %02x\n",
4605 "/** 1010 0000 inc %e!0 */",
4609 #line 581 "rl78-decode.opc"
4610 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4619 /** 1010 0rg1 incw %0 */
4620 #line 601 "rl78-decode.opc"
4621 int rg AU
= (op
[0] >> 1) & 0x03;
4624 printf ("\033[33m%s\033[0m %02x\n",
4625 "/** 1010 0rg1 incw %0 */",
4627 printf (" rg = 0x%x\n", rg
);
4630 #line 601 "rl78-decode.opc"
4631 ID(add
); W(); DRW(rg
); SC(1);
4637 /** 1010 0010 incw %e!0 */
4640 printf ("\033[33m%s\033[0m %02x\n",
4641 "/** 1010 0010 incw %e!0 */",
4644 SYNTAX("incw %e!0");
4645 #line 595 "rl78-decode.opc"
4646 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4652 /** 1010 0100 inc %0 */
4655 printf ("\033[33m%s\033[0m %02x\n",
4656 "/** 1010 0100 inc %0 */",
4660 #line 590 "rl78-decode.opc"
4661 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4663 /*----------------------------------------------------------------------*/
4669 /** 1010 0110 incw %0 */
4672 printf ("\033[33m%s\033[0m %02x\n",
4673 "/** 1010 0110 incw %0 */",
4677 #line 604 "rl78-decode.opc"
4678 ID(add
); W(); DM(None
, SADDR
); SC(1);
4680 /*----------------------------------------------------------------------*/
4686 /** 1010 1000 movw %0, %a1 */
4689 printf ("\033[33m%s\033[0m %02x\n",
4690 "/** 1010 1000 movw %0, %a1 */",
4693 SYNTAX("movw %0, %a1");
4694 #line 850 "rl78-decode.opc"
4695 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4701 /** 1010 1001 movw %0, %e1 */
4704 printf ("\033[33m%s\033[0m %02x\n",
4705 "/** 1010 1001 movw %0, %e1 */",
4708 SYNTAX("movw %0, %e1");
4709 #line 838 "rl78-decode.opc"
4710 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4716 /** 1010 1010 movw %0, %ea1 */
4719 printf ("\033[33m%s\033[0m %02x\n",
4720 "/** 1010 1010 movw %0, %ea1 */",
4723 SYNTAX("movw %0, %ea1");
4724 #line 841 "rl78-decode.opc"
4725 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4731 /** 1010 1011 movw %0, %e1 */
4734 printf ("\033[33m%s\033[0m %02x\n",
4735 "/** 1010 1011 movw %0, %e1 */",
4738 SYNTAX("movw %0, %e1");
4739 #line 844 "rl78-decode.opc"
4740 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4746 /** 1010 1100 movw %0, %ea1 */
4749 printf ("\033[33m%s\033[0m %02x\n",
4750 "/** 1010 1100 movw %0, %ea1 */",
4753 SYNTAX("movw %0, %ea1");
4754 #line 847 "rl78-decode.opc"
4755 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4761 /** 1010 1101 movw %0, %1 */
4764 printf ("\033[33m%s\033[0m %02x\n",
4765 "/** 1010 1101 movw %0, %1 */",
4768 SYNTAX("movw %0, %1");
4769 #line 880 "rl78-decode.opc"
4770 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4776 /** 1010 1110 movw %0, %s1 */
4779 printf ("\033[33m%s\033[0m %02x\n",
4780 "/** 1010 1110 movw %0, %s1 */",
4783 SYNTAX("movw %0, %s1");
4784 #line 883 "rl78-decode.opc"
4785 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4791 /** 1010 1111 movw %0, %e!1 */
4794 printf ("\033[33m%s\033[0m %02x\n",
4795 "/** 1010 1111 movw %0, %e!1 */",
4798 SYNTAX("movw %0, %e!1");
4799 #line 834 "rl78-decode.opc"
4800 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4807 /** 1011 0000 dec %e!0 */
4810 printf ("\033[33m%s\033[0m %02x\n",
4811 "/** 1011 0000 dec %e!0 */",
4815 #line 548 "rl78-decode.opc"
4816 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4825 /** 1011 0rg1 decw %0 */
4826 #line 568 "rl78-decode.opc"
4827 int rg AU
= (op
[0] >> 1) & 0x03;
4830 printf ("\033[33m%s\033[0m %02x\n",
4831 "/** 1011 0rg1 decw %0 */",
4833 printf (" rg = 0x%x\n", rg
);
4836 #line 568 "rl78-decode.opc"
4837 ID(sub
); W(); DRW(rg
); SC(1);
4843 /** 1011 0010 decw %e!0 */
4846 printf ("\033[33m%s\033[0m %02x\n",
4847 "/** 1011 0010 decw %e!0 */",
4850 SYNTAX("decw %e!0");
4851 #line 562 "rl78-decode.opc"
4852 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4858 /** 1011 0100 dec %0 */
4861 printf ("\033[33m%s\033[0m %02x\n",
4862 "/** 1011 0100 dec %0 */",
4866 #line 557 "rl78-decode.opc"
4867 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4869 /*----------------------------------------------------------------------*/
4875 /** 1011 0110 decw %0 */
4878 printf ("\033[33m%s\033[0m %02x\n",
4879 "/** 1011 0110 decw %0 */",
4883 #line 571 "rl78-decode.opc"
4884 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4886 /*----------------------------------------------------------------------*/
4892 /** 1011 1000 movw %a0, %1 */
4895 printf ("\033[33m%s\033[0m %02x\n",
4896 "/** 1011 1000 movw %a0, %1 */",
4899 SYNTAX("movw %a0, %1");
4900 #line 831 "rl78-decode.opc"
4901 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4907 /** 1011 1001 movw %e0, %1 */
4910 printf ("\033[33m%s\033[0m %02x\n",
4911 "/** 1011 1001 movw %e0, %1 */",
4914 SYNTAX("movw %e0, %1");
4915 #line 819 "rl78-decode.opc"
4916 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4922 /** 1011 1010 movw %ea0, %1 */
4925 printf ("\033[33m%s\033[0m %02x\n",
4926 "/** 1011 1010 movw %ea0, %1 */",
4929 SYNTAX("movw %ea0, %1");
4930 #line 822 "rl78-decode.opc"
4931 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4937 /** 1011 1011 movw %e0, %1 */
4940 printf ("\033[33m%s\033[0m %02x\n",
4941 "/** 1011 1011 movw %e0, %1 */",
4944 SYNTAX("movw %e0, %1");
4945 #line 825 "rl78-decode.opc"
4946 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4952 /** 1011 1100 movw %ea0, %1 */
4955 printf ("\033[33m%s\033[0m %02x\n",
4956 "/** 1011 1100 movw %ea0, %1 */",
4959 SYNTAX("movw %ea0, %1");
4960 #line 828 "rl78-decode.opc"
4961 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4967 /** 1011 1101 movw %0, %1 */
4970 printf ("\033[33m%s\033[0m %02x\n",
4971 "/** 1011 1101 movw %0, %1 */",
4974 SYNTAX("movw %0, %1");
4975 #line 895 "rl78-decode.opc"
4976 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4982 /** 1011 1110 movw %s0, %1 */
4985 printf ("\033[33m%s\033[0m %02x\n",
4986 "/** 1011 1110 movw %s0, %1 */",
4989 SYNTAX("movw %s0, %1");
4990 #line 901 "rl78-decode.opc"
4991 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4993 /*----------------------------------------------------------------------*/
4999 /** 1011 1111 movw %e!0, %1 */
5002 printf ("\033[33m%s\033[0m %02x\n",
5003 "/** 1011 1111 movw %e!0, %1 */",
5006 SYNTAX("movw %e!0, %1");
5007 #line 816 "rl78-decode.opc"
5008 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
5017 /** 1100 0rg0 pop %0 */
5018 #line 986 "rl78-decode.opc"
5019 int rg AU
= (op
[0] >> 1) & 0x03;
5022 printf ("\033[33m%s\033[0m %02x\n",
5023 "/** 1100 0rg0 pop %0 */",
5025 printf (" rg = 0x%x\n", rg
);
5028 #line 986 "rl78-decode.opc"
5029 ID(mov
); W(); DRW(rg
); SPOP();
5038 /** 1100 0rg1 push %1 */
5039 #line 994 "rl78-decode.opc"
5040 int rg AU
= (op
[0] >> 1) & 0x03;
5043 printf ("\033[33m%s\033[0m %02x\n",
5044 "/** 1100 0rg1 push %1 */",
5046 printf (" rg = 0x%x\n", rg
);
5049 #line 994 "rl78-decode.opc"
5050 ID(mov
); W(); DPUSH(); SRW(rg
);
5056 /** 1100 1000 mov %a0, #%1 */
5059 printf ("\033[33m%s\033[0m %02x\n",
5060 "/** 1100 1000 mov %a0, #%1 */",
5063 SYNTAX("mov %a0, #%1");
5064 #line 639 "rl78-decode.opc"
5065 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5071 /** 1100 1001 movw %0, #%1 */
5074 printf ("\033[33m%s\033[0m %02x\n",
5075 "/** 1100 1001 movw %0, #%1 */",
5078 SYNTAX("movw %0, #%1");
5079 #line 892 "rl78-decode.opc"
5080 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5086 /** 1100 1010 mov %ea0, #%1 */
5089 printf ("\033[33m%s\033[0m %02x\n",
5090 "/** 1100 1010 mov %ea0, #%1 */",
5093 SYNTAX("mov %ea0, #%1");
5094 #line 618 "rl78-decode.opc"
5095 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5101 /** 1100 1011 movw %s0, #%1 */
5104 printf ("\033[33m%s\033[0m %02x\n",
5105 "/** 1100 1011 movw %s0, #%1 */",
5108 SYNTAX("movw %s0, #%1");
5109 #line 898 "rl78-decode.opc"
5110 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5116 /** 1100 1100 mov %ea0, #%1 */
5119 printf ("\033[33m%s\033[0m %02x\n",
5120 "/** 1100 1100 mov %ea0, #%1 */",
5123 SYNTAX("mov %ea0, #%1");
5124 #line 630 "rl78-decode.opc"
5125 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5131 /** 1100 1101 mov %0, #%1 */
5134 printf ("\033[33m%s\033[0m %02x\n",
5135 "/** 1100 1101 mov %0, #%1 */",
5138 SYNTAX("mov %0, #%1");
5139 #line 744 "rl78-decode.opc"
5140 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5146 /** 1100 1110 mov %s0, #%1 */
5149 printf ("\033[33m%s\033[0m %02x\n",
5150 "/** 1100 1110 mov %s0, #%1 */",
5153 SYNTAX("mov %s0, #%1");
5154 #line 750 "rl78-decode.opc"
5157 ID(mov
); DM(None
, op0
); SC(op1
);
5158 if (op0
== 0xffffb && isa
== RL78_ISA_G14
)
5162 rl78
->syntax
= "mulhu"; ID(mulhu
);
5165 rl78
->syntax
= "mulh"; ID(mulh
);
5168 rl78
->syntax
= "divhu"; ID(divhu
);
5171 rl78
->syntax
= "divwu <old-encoding>"; ID(divwu
);
5174 rl78
->syntax
= "machu"; ID(machu
);
5177 rl78
->syntax
= "mach"; ID(mach
);
5180 rl78
->syntax
= "divwu"; ID(divwu
);
5188 /** 1100 1111 mov %e!0, #%1 */
5191 printf ("\033[33m%s\033[0m %02x\n",
5192 "/** 1100 1111 mov %e!0, #%1 */",
5195 SYNTAX("mov %e!0, #%1");
5196 #line 609 "rl78-decode.opc"
5197 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5206 /** 1101 00rg cmp0 %0 */
5207 #line 518 "rl78-decode.opc"
5208 int rg AU
= op
[0] & 0x03;
5211 printf ("\033[33m%s\033[0m %02x\n",
5212 "/** 1101 00rg cmp0 %0 */",
5214 printf (" rg = 0x%x\n", rg
);
5217 #line 518 "rl78-decode.opc"
5218 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5224 /** 1101 0100 cmp0 %0 */
5227 printf ("\033[33m%s\033[0m %02x\n",
5228 "/** 1101 0100 cmp0 %0 */",
5232 #line 521 "rl78-decode.opc"
5233 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5235 /*----------------------------------------------------------------------*/
5241 /** 1101 0101 cmp0 %e!0 */
5244 printf ("\033[33m%s\033[0m %02x\n",
5245 "/** 1101 0101 cmp0 %e!0 */",
5248 SYNTAX("cmp0 %e!0");
5249 #line 515 "rl78-decode.opc"
5250 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5256 /** 1101 0110 mulu x */
5259 printf ("\033[33m%s\033[0m %02x\n",
5260 "/** 1101 0110 mulu x */",
5264 #line 906 "rl78-decode.opc"
5267 /*----------------------------------------------------------------------*/
5273 /** 1101 0111 ret */
5276 printf ("\033[33m%s\033[0m %02x\n",
5277 "/** 1101 0111 ret */",
5281 #line 1002 "rl78-decode.opc"
5288 /** 1101 1000 mov %0, %1 */
5291 printf ("\033[33m%s\033[0m %02x\n",
5292 "/** 1101 1000 mov %0, %1 */",
5295 SYNTAX("mov %0, %1");
5296 #line 711 "rl78-decode.opc"
5297 ID(mov
); DR(X
); SM(None
, SADDR
);
5303 /** 1101 1001 mov %0, %e!1 */
5306 printf ("\033[33m%s\033[0m %02x\n",
5307 "/** 1101 1001 mov %0, %e!1 */",
5310 SYNTAX("mov %0, %e!1");
5311 #line 708 "rl78-decode.opc"
5312 ID(mov
); DR(X
); SM(None
, IMMU(2));
5320 /** 11ra 1010 movw %0, %1 */
5321 #line 889 "rl78-decode.opc"
5322 int ra AU
= (op
[0] >> 4) & 0x03;
5325 printf ("\033[33m%s\033[0m %02x\n",
5326 "/** 11ra 1010 movw %0, %1 */",
5328 printf (" ra = 0x%x\n", ra
);
5330 SYNTAX("movw %0, %1");
5331 #line 889 "rl78-decode.opc"
5332 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5340 /** 11ra 1011 movw %0, %es!1 */
5341 #line 886 "rl78-decode.opc"
5342 int ra AU
= (op
[0] >> 4) & 0x03;
5345 printf ("\033[33m%s\033[0m %02x\n",
5346 "/** 11ra 1011 movw %0, %es!1 */",
5348 printf (" ra = 0x%x\n", ra
);
5350 SYNTAX("movw %0, %es!1");
5351 #line 886 "rl78-decode.opc"
5352 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5358 /** 1101 1100 bc $%a0 */
5361 printf ("\033[33m%s\033[0m %02x\n",
5362 "/** 1101 1100 bc $%a0 */",
5366 #line 334 "rl78-decode.opc"
5367 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5373 /** 1101 1101 bz $%a0 */
5376 printf ("\033[33m%s\033[0m %02x\n",
5377 "/** 1101 1101 bz $%a0 */",
5381 #line 346 "rl78-decode.opc"
5382 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5388 /** 1101 1110 bnc $%a0 */
5391 printf ("\033[33m%s\033[0m %02x\n",
5392 "/** 1101 1110 bnc $%a0 */",
5396 #line 337 "rl78-decode.opc"
5397 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5403 /** 1101 1111 bnz $%a0 */
5406 printf ("\033[33m%s\033[0m %02x\n",
5407 "/** 1101 1111 bnz $%a0 */",
5411 #line 349 "rl78-decode.opc"
5412 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5414 /*----------------------------------------------------------------------*/
5423 /** 1110 00rg oneb %0 */
5424 #line 924 "rl78-decode.opc"
5425 int rg AU
= op
[0] & 0x03;
5428 printf ("\033[33m%s\033[0m %02x\n",
5429 "/** 1110 00rg oneb %0 */",
5431 printf (" rg = 0x%x\n", rg
);
5434 #line 924 "rl78-decode.opc"
5435 ID(mov
); DRB(rg
); SC(1);
5441 /** 1110 0100 oneb %0 */
5444 printf ("\033[33m%s\033[0m %02x\n",
5445 "/** 1110 0100 oneb %0 */",
5449 #line 927 "rl78-decode.opc"
5450 ID(mov
); DM(None
, SADDR
); SC(1);
5452 /*----------------------------------------------------------------------*/
5458 /** 1110 0101 oneb %e!0 */
5461 printf ("\033[33m%s\033[0m %02x\n",
5462 "/** 1110 0101 oneb %e!0 */",
5465 SYNTAX("oneb %e!0");
5466 #line 921 "rl78-decode.opc"
5467 ID(mov
); DM(None
, IMMU(2)); SC(1);
5473 /** 1110 0110 onew %0 */
5476 printf ("\033[33m%s\033[0m %02x\n",
5477 "/** 1110 0110 onew %0 */",
5481 #line 932 "rl78-decode.opc"
5482 ID(mov
); DR(AX
); SC(1);
5488 /** 1110 0111 onew %0 */
5491 printf ("\033[33m%s\033[0m %02x\n",
5492 "/** 1110 0111 onew %0 */",
5496 #line 935 "rl78-decode.opc"
5497 ID(mov
); DR(BC
); SC(1);
5499 /*----------------------------------------------------------------------*/
5505 /** 1110 1000 mov %0, %1 */
5508 printf ("\033[33m%s\033[0m %02x\n",
5509 "/** 1110 1000 mov %0, %1 */",
5512 SYNTAX("mov %0, %1");
5513 #line 699 "rl78-decode.opc"
5514 ID(mov
); DR(B
); SM(None
, SADDR
);
5520 /** 1110 1001 mov %0, %e!1 */
5523 printf ("\033[33m%s\033[0m %02x\n",
5524 "/** 1110 1001 mov %0, %e!1 */",
5527 SYNTAX("mov %0, %e!1");
5528 #line 693 "rl78-decode.opc"
5529 ID(mov
); DR(B
); SM(None
, IMMU(2));
5535 /** 1110 1100 br !%!a0 */
5538 printf ("\033[33m%s\033[0m %02x\n",
5539 "/** 1110 1100 br !%!a0 */",
5543 #line 368 "rl78-decode.opc"
5544 ID(branch
); DC(IMMU(3));
5550 /** 1110 1101 br %!a0 */
5553 printf ("\033[33m%s\033[0m %02x\n",
5554 "/** 1110 1101 br %!a0 */",
5558 #line 371 "rl78-decode.opc"
5559 ID(branch
); DC(IMMU(2));
5565 /** 1110 1110 br $%!a0 */
5568 printf ("\033[33m%s\033[0m %02x\n",
5569 "/** 1110 1110 br $%!a0 */",
5573 #line 374 "rl78-decode.opc"
5574 ID(branch
); DC(pc
+IMMS(2)+3);
5580 /** 1110 1111 br $%a0 */
5583 printf ("\033[33m%s\033[0m %02x\n",
5584 "/** 1110 1111 br $%a0 */",
5588 #line 377 "rl78-decode.opc"
5589 ID(branch
); DC(pc
+IMMS(1)+2);
5598 /** 1111 00rg clrb %0 */
5599 #line 464 "rl78-decode.opc"
5600 int rg AU
= op
[0] & 0x03;
5603 printf ("\033[33m%s\033[0m %02x\n",
5604 "/** 1111 00rg clrb %0 */",
5606 printf (" rg = 0x%x\n", rg
);
5609 #line 464 "rl78-decode.opc"
5610 ID(mov
); DRB(rg
); SC(0);
5616 /** 1111 0100 clrb %0 */
5619 printf ("\033[33m%s\033[0m %02x\n",
5620 "/** 1111 0100 clrb %0 */",
5624 #line 467 "rl78-decode.opc"
5625 ID(mov
); DM(None
, SADDR
); SC(0);
5627 /*----------------------------------------------------------------------*/
5633 /** 1111 0101 clrb %e!0 */
5636 printf ("\033[33m%s\033[0m %02x\n",
5637 "/** 1111 0101 clrb %e!0 */",
5640 SYNTAX("clrb %e!0");
5641 #line 461 "rl78-decode.opc"
5642 ID(mov
); DM(None
, IMMU(2)); SC(0);
5648 /** 1111 0110 clrw %0 */
5651 printf ("\033[33m%s\033[0m %02x\n",
5652 "/** 1111 0110 clrw %0 */",
5656 #line 472 "rl78-decode.opc"
5657 ID(mov
); DR(AX
); SC(0);
5663 /** 1111 0111 clrw %0 */
5666 printf ("\033[33m%s\033[0m %02x\n",
5667 "/** 1111 0111 clrw %0 */",
5671 #line 475 "rl78-decode.opc"
5672 ID(mov
); DR(BC
); SC(0);
5674 /*----------------------------------------------------------------------*/
5680 /** 1111 1000 mov %0, %1 */
5683 printf ("\033[33m%s\033[0m %02x\n",
5684 "/** 1111 1000 mov %0, %1 */",
5687 SYNTAX("mov %0, %1");
5688 #line 705 "rl78-decode.opc"
5689 ID(mov
); DR(C
); SM(None
, SADDR
);
5695 /** 1111 1001 mov %0, %e!1 */
5698 printf ("\033[33m%s\033[0m %02x\n",
5699 "/** 1111 1001 mov %0, %e!1 */",
5702 SYNTAX("mov %0, %e!1");
5703 #line 702 "rl78-decode.opc"
5704 ID(mov
); DR(C
); SM(None
, IMMU(2));
5710 /** 1111 1100 call !%!a0 */
5713 printf ("\033[33m%s\033[0m %02x\n",
5714 "/** 1111 1100 call !%!a0 */",
5717 SYNTAX("call !%!a0");
5718 #line 421 "rl78-decode.opc"
5719 ID(call
); DC(IMMU(3));
5725 /** 1111 1101 call %!a0 */
5728 printf ("\033[33m%s\033[0m %02x\n",
5729 "/** 1111 1101 call %!a0 */",
5732 SYNTAX("call %!a0");
5733 #line 424 "rl78-decode.opc"
5734 ID(call
); DC(IMMU(2));
5740 /** 1111 1110 call $%!a0 */
5743 printf ("\033[33m%s\033[0m %02x\n",
5744 "/** 1111 1110 call $%!a0 */",
5747 SYNTAX("call $%!a0");
5748 #line 427 "rl78-decode.opc"
5749 ID(call
); DC(pc
+IMMS(2)+3);
5755 /** 1111 1111 brk1 */
5758 printf ("\033[33m%s\033[0m %02x\n",
5759 "/** 1111 1111 brk1 */",
5763 #line 385 "rl78-decode.opc"
5769 #line 1290 "rl78-decode.opc"
5771 return rl78
->n_bytes
;
This page took 0.150627 seconds and 4 git commands to generate.