1 #line 1 "rl78-decode.opc"
8 #include "opcode/rl78.h"
14 RL78_Opcode_Decoded
* rl78
;
15 int (* getbyte
)(void *);
20 #define ID(x) rl78->id = RLO_##x, rl78->lineno = __LINE__
21 #define OP(n,t,r,a) (rl78->op[n].type = t, \
22 rl78->op[n].reg = r, \
23 rl78->op[n].addend = a )
24 #define OPX(n,t,r1,r2,a) \
25 (rl78->op[n].type = t, \
26 rl78->op[n].reg = r1, \
27 rl78->op[n].reg2 = r2, \
28 rl78->op[n].addend = a )
30 #define W() rl78->size = RL78_Word
32 #define AU ATTRIBUTE_UNUSED
33 #define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
34 #define B ((unsigned long) GETBYTE())
36 #define SYNTAX(x) rl78->syntax = x
38 #define UNSUPPORTED() \
39 rl78->syntax = "*unknown*"
41 #define RB(x) ((x)+RL78_Reg_X)
42 #define RW(x) ((x)+RL78_Reg_AX)
44 #define Fz rl78->flags = RL78_PSW_Z
45 #define Fza rl78->flags = RL78_PSW_Z | RL78_PSW_AC
46 #define Fzc rl78->flags = RL78_PSW_Z | RL78_PSW_CY
47 #define Fzac rl78->flags = RL78_PSW_Z | RL78_PSW_AC | RL78_PSW_CY
48 #define Fa rl78->flags = RL78_PSW_AC
49 #define Fc rl78->flags = RL78_PSW_CY
50 #define Fac rl78->flags = RL78_PSW_AC | RL78_PSW_CY
52 #define IMMU(bytes) immediate (bytes, 0, ld)
53 #define IMMS(bytes) immediate (bytes, 1, ld)
56 immediate (int bytes
, int sign_extend
, LocalData
* ld
)
64 if (sign_extend
&& (i
& 0x80))
70 if (sign_extend
&& (i
& 0x8000))
77 if (sign_extend
&& (i
& 0x800000))
81 fprintf (stderr
, "Programmer error: immediate() called with invalid byte count %d\n", bytes
);
87 #define DC(c) OP (0, RL78_Operand_Immediate, 0, c)
88 #define DR(r) OP (0, RL78_Operand_Register, RL78_Reg_##r, 0)
89 #define DRB(r) OP (0, RL78_Operand_Register, RB(r), 0)
90 #define DRW(r) OP (0, RL78_Operand_Register, RW(r), 0)
91 #define DM(r,a) OP (0, RL78_Operand_Indirect, RL78_Reg_##r, a)
92 #define DM2(r1,r2,a) OPX (0, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
93 #define DE() rl78->op[0].use_es = 1
94 #define DB(b) set_bit (rl78->op, b)
95 #define DCY() DR(PSW); DB(0)
96 #define DPUSH() OP (0, RL78_Operand_PreDec, RL78_Reg_SP, 0);
98 #define SC(c) OP (1, RL78_Operand_Immediate, 0, c)
99 #define SR(r) OP (1, RL78_Operand_Register, RL78_Reg_##r, 0)
100 #define SRB(r) OP (1, RL78_Operand_Register, RB(r), 0)
101 #define SRW(r) OP (1, RL78_Operand_Register, RW(r), 0)
102 #define SM(r,a) OP (1, RL78_Operand_Indirect, RL78_Reg_##r, a)
103 #define SM2(r1,r2,a) OPX (1, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
104 #define SE() rl78->op[1].use_es = 1
105 #define SB(b) set_bit (rl78->op+1, b)
106 #define SCY() SR(PSW); SB(0)
107 #define COND(c) rl78->op[1].condition = RL78_Condition_##c
108 #define SPOP() OP (1, RL78_Operand_PostInc, RL78_Reg_SP, 0);
111 set_bit (RL78_Opcode_Operand
*op
, int bit
)
113 op
->bit_number
= bit
;
115 case RL78_Operand_Register
:
116 op
->type
= RL78_Operand_Bit
;
118 case RL78_Operand_Indirect
:
119 op
->type
= RL78_Operand_BitIndirect
;
140 #define SADDR saddr (IMMU (1))
141 #define SFR sfr (IMMU (1))
144 rl78_decode_opcode (unsigned long pc AU
,
145 RL78_Opcode_Decoded
* rl78
,
146 int (* getbyte
)(void *),
149 LocalData lds
, * ld
= &lds
;
150 unsigned char op_buf
[20] = {0};
151 unsigned char *op
= op_buf
;
155 lds
.getbyte
= getbyte
;
159 memset (rl78
, 0, sizeof (*rl78
));
163 /* Byte registers, not including A. */
164 /* Word registers, not including AX. */
166 /*----------------------------------------------------------------------*/
170 switch (op
[0] & 0xff)
177 printf ("\033[33m%s\033[0m %02x\n",
178 "/** 0000 0000 nop */",
182 #line 886 "rl78-decode.opc"
185 /*----------------------------------------------------------------------*/
194 /** 0000 0rw1 addw %0, %1 */
195 #line 252 "rl78-decode.opc"
196 int rw AU
= (op
[0] >> 1) & 0x03;
199 printf ("\033[33m%s\033[0m %02x\n",
200 "/** 0000 0rw1 addw %0, %1 */",
202 printf (" rw = 0x%x\n", rw
);
204 SYNTAX("addw %0, %1");
205 #line 252 "rl78-decode.opc"
206 ID(add
); W(); DR(AX
); SRW(rw
); Fzac
;
212 /** 0000 0010 addw %0, %e!1 */
215 printf ("\033[33m%s\033[0m %02x\n",
216 "/** 0000 0010 addw %0, %e!1 */",
219 SYNTAX("addw %0, %e!1");
220 #line 243 "rl78-decode.opc"
221 ID(add
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
227 /** 0000 0100 addw %0, #%1 */
230 printf ("\033[33m%s\033[0m %02x\n",
231 "/** 0000 0100 addw %0, #%1 */",
234 SYNTAX("addw %0, #%1");
235 #line 249 "rl78-decode.opc"
236 ID(add
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
242 /** 0000 0110 addw %0, %1 */
245 printf ("\033[33m%s\033[0m %02x\n",
246 "/** 0000 0110 addw %0, %1 */",
249 SYNTAX("addw %0, %1");
250 #line 255 "rl78-decode.opc"
251 ID(add
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
257 /** 0000 1000 xch a, x */
260 printf ("\033[33m%s\033[0m %02x\n",
261 "/** 0000 1000 xch a, x */",
265 #line 1209 "rl78-decode.opc"
266 ID(xch
); DR(A
); SR(X
);
268 /*----------------------------------------------------------------------*/
274 /** 0000 1001 mov %0, %e1 */
277 printf ("\033[33m%s\033[0m %02x\n",
278 "/** 0000 1001 mov %0, %e1 */",
281 SYNTAX("mov %0, %e1");
282 #line 656 "rl78-decode.opc"
283 ID(mov
); DR(A
); SM(B
, IMMU(2));
289 /** 0000 1010 add %0, #%1 */
292 printf ("\033[33m%s\033[0m %02x\n",
293 "/** 0000 1010 add %0, #%1 */",
296 SYNTAX("add %0, #%1");
297 #line 206 "rl78-decode.opc"
298 ID(add
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
300 /*----------------------------------------------------------------------*/
306 /** 0000 1011 add %0, %1 */
309 printf ("\033[33m%s\033[0m %02x\n",
310 "/** 0000 1011 add %0, %1 */",
313 SYNTAX("add %0, %1");
314 #line 200 "rl78-decode.opc"
315 ID(add
); DR(A
); SM(None
, SADDR
); Fzac
;
321 /** 0000 1100 add %0, #%1 */
324 printf ("\033[33m%s\033[0m %02x\n",
325 "/** 0000 1100 add %0, #%1 */",
328 SYNTAX("add %0, #%1");
329 #line 194 "rl78-decode.opc"
330 ID(add
); DR(A
); SC(IMMU(1)); Fzac
;
336 /** 0000 1101 add %0, %e1 */
339 printf ("\033[33m%s\033[0m %02x\n",
340 "/** 0000 1101 add %0, %e1 */",
343 SYNTAX("add %0, %e1");
344 #line 182 "rl78-decode.opc"
345 ID(add
); DR(A
); SM(HL
, 0); Fzac
;
351 /** 0000 1110 add %0, %e1 */
354 printf ("\033[33m%s\033[0m %02x\n",
355 "/** 0000 1110 add %0, %e1 */",
358 SYNTAX("add %0, %e1");
359 #line 188 "rl78-decode.opc"
360 ID(add
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
366 /** 0000 1111 add %0, %e!1 */
369 printf ("\033[33m%s\033[0m %02x\n",
370 "/** 0000 1111 add %0, %e!1 */",
373 SYNTAX("add %0, %e!1");
374 #line 179 "rl78-decode.opc"
375 ID(add
); DR(A
); SM(None
, IMMU(2)); Fzac
;
381 /** 0001 0000 addw %0, #%1 */
384 printf ("\033[33m%s\033[0m %02x\n",
385 "/** 0001 0000 addw %0, #%1 */",
388 SYNTAX("addw %0, #%1");
389 #line 258 "rl78-decode.opc"
390 ID(add
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
392 /*----------------------------------------------------------------------*/
401 printf ("\033[33m%s\033[0m %02x\n",
402 "/** 0001 0001 es: */",
406 #line 171 "rl78-decode.opc"
412 /*----------------------------------------------------------------------*/
420 /** 0001 0ra0 movw %0, %1 */
421 #line 834 "rl78-decode.opc"
422 int ra AU
= (op
[0] >> 1) & 0x03;
425 printf ("\033[33m%s\033[0m %02x\n",
426 "/** 0001 0ra0 movw %0, %1 */",
428 printf (" ra = 0x%x\n", ra
);
430 SYNTAX("movw %0, %1");
431 #line 834 "rl78-decode.opc"
432 ID(mov
); W(); DRW(ra
); SR(AX
);
440 /** 0001 0ra1 movw %0, %1 */
441 #line 831 "rl78-decode.opc"
442 int ra AU
= (op
[0] >> 1) & 0x03;
445 printf ("\033[33m%s\033[0m %02x\n",
446 "/** 0001 0ra1 movw %0, %1 */",
448 printf (" ra = 0x%x\n", ra
);
450 SYNTAX("movw %0, %1");
451 #line 831 "rl78-decode.opc"
452 ID(mov
); W(); DR(AX
); SRW(ra
);
458 /** 0001 1000 mov %e0, %1 */
461 printf ("\033[33m%s\033[0m %02x\n",
462 "/** 0001 1000 mov %e0, %1 */",
465 SYNTAX("mov %e0, %1");
466 #line 707 "rl78-decode.opc"
467 ID(mov
); DM(B
, IMMU(2)); SR(A
);
473 /** 0001 1001 mov %e0, #%1 */
476 printf ("\033[33m%s\033[0m %02x\n",
477 "/** 0001 1001 mov %e0, #%1 */",
480 SYNTAX("mov %e0, #%1");
481 #line 704 "rl78-decode.opc"
482 ID(mov
); DM(B
, IMMU(2)); SC(IMMU(1));
488 /** 0001 1010 addc %0, #%1 */
491 printf ("\033[33m%s\033[0m %02x\n",
492 "/** 0001 1010 addc %0, #%1 */",
495 SYNTAX("addc %0, #%1");
496 #line 238 "rl78-decode.opc"
497 ID(addc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
499 /*----------------------------------------------------------------------*/
505 /** 0001 1011 addc %0, %1 */
508 printf ("\033[33m%s\033[0m %02x\n",
509 "/** 0001 1011 addc %0, %1 */",
512 SYNTAX("addc %0, %1");
513 #line 235 "rl78-decode.opc"
514 ID(addc
); DR(A
); SM(None
, SADDR
); Fzac
;
520 /** 0001 1100 addc %0, #%1 */
523 printf ("\033[33m%s\033[0m %02x\n",
524 "/** 0001 1100 addc %0, #%1 */",
527 SYNTAX("addc %0, #%1");
528 #line 226 "rl78-decode.opc"
529 ID(addc
); DR(A
); SC(IMMU(1)); Fzac
;
535 /** 0001 1101 addc %0, %e1 */
538 printf ("\033[33m%s\033[0m %02x\n",
539 "/** 0001 1101 addc %0, %e1 */",
542 SYNTAX("addc %0, %e1");
543 #line 214 "rl78-decode.opc"
544 ID(addc
); DR(A
); SM(HL
, 0); Fzac
;
550 /** 0001 1110 addc %0, %e1 */
553 printf ("\033[33m%s\033[0m %02x\n",
554 "/** 0001 1110 addc %0, %e1 */",
557 SYNTAX("addc %0, %e1");
558 #line 223 "rl78-decode.opc"
559 ID(addc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
565 /** 0001 1111 addc %0, %e!1 */
568 printf ("\033[33m%s\033[0m %02x\n",
569 "/** 0001 1111 addc %0, %e!1 */",
572 SYNTAX("addc %0, %e!1");
573 #line 211 "rl78-decode.opc"
574 ID(addc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
580 /** 0010 0000 subw %0, #%1 */
583 printf ("\033[33m%s\033[0m %02x\n",
584 "/** 0010 0000 subw %0, #%1 */",
587 SYNTAX("subw %0, #%1");
588 #line 1173 "rl78-decode.opc"
589 ID(sub
); W(); DR(SP
); SC(IMMU(1)); Fzac
;
591 /*----------------------------------------------------------------------*/
600 /** 0010 0rw1 subw %0, %1 */
601 #line 1167 "rl78-decode.opc"
602 int rw AU
= (op
[0] >> 1) & 0x03;
605 printf ("\033[33m%s\033[0m %02x\n",
606 "/** 0010 0rw1 subw %0, %1 */",
608 printf (" rw = 0x%x\n", rw
);
610 SYNTAX("subw %0, %1");
611 #line 1167 "rl78-decode.opc"
612 ID(sub
); W(); DR(AX
); SRW(rw
); Fzac
;
618 /** 0010 0010 subw %0, %e!1 */
621 printf ("\033[33m%s\033[0m %02x\n",
622 "/** 0010 0010 subw %0, %e!1 */",
625 SYNTAX("subw %0, %e!1");
626 #line 1158 "rl78-decode.opc"
627 ID(sub
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
633 /** 0010 0100 subw %0, #%1 */
636 printf ("\033[33m%s\033[0m %02x\n",
637 "/** 0010 0100 subw %0, #%1 */",
640 SYNTAX("subw %0, #%1");
641 #line 1164 "rl78-decode.opc"
642 ID(sub
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
648 /** 0010 0110 subw %0, %1 */
651 printf ("\033[33m%s\033[0m %02x\n",
652 "/** 0010 0110 subw %0, %1 */",
655 SYNTAX("subw %0, %1");
656 #line 1170 "rl78-decode.opc"
657 ID(sub
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
663 /** 0010 1000 mov %e0, %1 */
666 printf ("\033[33m%s\033[0m %02x\n",
667 "/** 0010 1000 mov %e0, %1 */",
670 SYNTAX("mov %e0, %1");
671 #line 719 "rl78-decode.opc"
672 ID(mov
); DM(C
, IMMU(2)); SR(A
);
678 /** 0010 1001 mov %0, %e1 */
681 printf ("\033[33m%s\033[0m %02x\n",
682 "/** 0010 1001 mov %0, %e1 */",
685 SYNTAX("mov %0, %e1");
686 #line 662 "rl78-decode.opc"
687 ID(mov
); DR(A
); SM(C
, IMMU(2));
693 /** 0010 1010 sub %0, #%1 */
696 printf ("\033[33m%s\033[0m %02x\n",
697 "/** 0010 1010 sub %0, #%1 */",
700 SYNTAX("sub %0, #%1");
701 #line 1121 "rl78-decode.opc"
702 ID(sub
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
704 /*----------------------------------------------------------------------*/
710 /** 0010 1011 sub %0, %1 */
713 printf ("\033[33m%s\033[0m %02x\n",
714 "/** 0010 1011 sub %0, %1 */",
717 SYNTAX("sub %0, %1");
718 #line 1115 "rl78-decode.opc"
719 ID(sub
); DR(A
); SM(None
, SADDR
); Fzac
;
725 /** 0010 1100 sub %0, #%1 */
728 printf ("\033[33m%s\033[0m %02x\n",
729 "/** 0010 1100 sub %0, #%1 */",
732 SYNTAX("sub %0, #%1");
733 #line 1109 "rl78-decode.opc"
734 ID(sub
); DR(A
); SC(IMMU(1)); Fzac
;
740 /** 0010 1101 sub %0, %e1 */
743 printf ("\033[33m%s\033[0m %02x\n",
744 "/** 0010 1101 sub %0, %e1 */",
747 SYNTAX("sub %0, %e1");
748 #line 1097 "rl78-decode.opc"
749 ID(sub
); DR(A
); SM(HL
, 0); Fzac
;
755 /** 0010 1110 sub %0, %e1 */
758 printf ("\033[33m%s\033[0m %02x\n",
759 "/** 0010 1110 sub %0, %e1 */",
762 SYNTAX("sub %0, %e1");
763 #line 1103 "rl78-decode.opc"
764 ID(sub
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
770 /** 0010 1111 sub %0, %e!1 */
773 printf ("\033[33m%s\033[0m %02x\n",
774 "/** 0010 1111 sub %0, %e!1 */",
777 SYNTAX("sub %0, %e!1");
778 #line 1094 "rl78-decode.opc"
779 ID(sub
); DR(A
); SM(None
, IMMU(2)); Fzac
;
788 /** 0011 0rg0 movw %0, #%1 */
789 #line 828 "rl78-decode.opc"
790 int rg AU
= (op
[0] >> 1) & 0x03;
793 printf ("\033[33m%s\033[0m %02x\n",
794 "/** 0011 0rg0 movw %0, #%1 */",
796 printf (" rg = 0x%x\n", rg
);
798 SYNTAX("movw %0, #%1");
799 #line 828 "rl78-decode.opc"
800 ID(mov
); W(); DRW(rg
); SC(IMMU(2));
806 switch (op
[1] & 0x8f)
810 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
811 #line 394 "rl78-decode.opc"
812 int bit AU
= (op
[1] >> 4) & 0x07;
815 printf ("\033[33m%s\033[0m %02x %02x\n",
816 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
818 printf (" bit = 0x%x\n", bit
);
820 SYNTAX("btclr %s1, $%a0");
821 #line 394 "rl78-decode.opc"
822 ID(branch_cond_clear
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
824 /*----------------------------------------------------------------------*/
830 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
831 #line 388 "rl78-decode.opc"
832 int bit AU
= (op
[1] >> 4) & 0x07;
835 printf ("\033[33m%s\033[0m %02x %02x\n",
836 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
838 printf (" bit = 0x%x\n", bit
);
840 SYNTAX("btclr %1, $%a0");
841 #line 388 "rl78-decode.opc"
842 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
848 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
849 #line 380 "rl78-decode.opc"
850 int bit AU
= (op
[1] >> 4) & 0x07;
853 printf ("\033[33m%s\033[0m %02x %02x\n",
854 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
856 printf (" bit = 0x%x\n", bit
);
858 SYNTAX("bt %s1, $%a0");
859 #line 380 "rl78-decode.opc"
860 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
862 /*----------------------------------------------------------------------*/
868 /** 0011 0001 0bit 0011 bt %1, $%a0 */
869 #line 374 "rl78-decode.opc"
870 int bit AU
= (op
[1] >> 4) & 0x07;
873 printf ("\033[33m%s\033[0m %02x %02x\n",
874 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
876 printf (" bit = 0x%x\n", bit
);
878 SYNTAX("bt %1, $%a0");
879 #line 374 "rl78-decode.opc"
880 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(T
);
886 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
887 #line 341 "rl78-decode.opc"
888 int bit AU
= (op
[1] >> 4) & 0x07;
891 printf ("\033[33m%s\033[0m %02x %02x\n",
892 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
894 printf (" bit = 0x%x\n", bit
);
896 SYNTAX("bf %s1, $%a0");
897 #line 341 "rl78-decode.opc"
898 ID(branch_cond
); SM(None
, SADDR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
900 /*----------------------------------------------------------------------*/
906 /** 0011 0001 0bit 0101 bf %1, $%a0 */
907 #line 335 "rl78-decode.opc"
908 int bit AU
= (op
[1] >> 4) & 0x07;
911 printf ("\033[33m%s\033[0m %02x %02x\n",
912 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
914 printf (" bit = 0x%x\n", bit
);
916 SYNTAX("bf %1, $%a0");
917 #line 335 "rl78-decode.opc"
918 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(A
); SB(bit
); COND(F
);
924 /** 0011 0001 0cnt 0111 shl %0, %1 */
925 #line 1050 "rl78-decode.opc"
926 int cnt AU
= (op
[1] >> 4) & 0x07;
929 printf ("\033[33m%s\033[0m %02x %02x\n",
930 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
932 printf (" cnt = 0x%x\n", cnt
);
934 SYNTAX("shl %0, %1");
935 #line 1050 "rl78-decode.opc"
936 ID(shl
); DR(C
); SC(cnt
);
942 /** 0011 0001 0cnt 1000 shl %0, %1 */
943 #line 1047 "rl78-decode.opc"
944 int cnt AU
= (op
[1] >> 4) & 0x07;
947 printf ("\033[33m%s\033[0m %02x %02x\n",
948 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
950 printf (" cnt = 0x%x\n", cnt
);
952 SYNTAX("shl %0, %1");
953 #line 1047 "rl78-decode.opc"
954 ID(shl
); DR(B
); SC(cnt
);
960 /** 0011 0001 0cnt 1001 shl %0, %1 */
961 #line 1044 "rl78-decode.opc"
962 int cnt AU
= (op
[1] >> 4) & 0x07;
965 printf ("\033[33m%s\033[0m %02x %02x\n",
966 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
968 printf (" cnt = 0x%x\n", cnt
);
970 SYNTAX("shl %0, %1");
971 #line 1044 "rl78-decode.opc"
972 ID(shl
); DR(A
); SC(cnt
);
978 /** 0011 0001 0cnt 1010 shr %0, %1 */
979 #line 1061 "rl78-decode.opc"
980 int cnt AU
= (op
[1] >> 4) & 0x07;
983 printf ("\033[33m%s\033[0m %02x %02x\n",
984 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
986 printf (" cnt = 0x%x\n", cnt
);
988 SYNTAX("shr %0, %1");
989 #line 1061 "rl78-decode.opc"
990 ID(shr
); DR(A
); SC(cnt
);
996 /** 0011 0001 0cnt 1011 sar %0, %1 */
997 #line 1008 "rl78-decode.opc"
998 int cnt AU
= (op
[1] >> 4) & 0x07;
1001 printf ("\033[33m%s\033[0m %02x %02x\n",
1002 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1004 printf (" cnt = 0x%x\n", cnt
);
1006 SYNTAX("sar %0, %1");
1007 #line 1008 "rl78-decode.opc"
1008 ID(sar
); DR(A
); SC(cnt
);
1015 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1016 #line 1056 "rl78-decode.opc"
1017 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1020 printf ("\033[33m%s\033[0m %02x %02x\n",
1021 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1023 printf (" wcnt = 0x%x\n", wcnt
);
1025 SYNTAX("shlw %0, %1");
1026 #line 1056 "rl78-decode.opc"
1027 ID(shl
); W(); DR(BC
); SC(wcnt
);
1029 /*----------------------------------------------------------------------*/
1036 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1037 #line 1053 "rl78-decode.opc"
1038 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1041 printf ("\033[33m%s\033[0m %02x %02x\n",
1042 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1044 printf (" wcnt = 0x%x\n", wcnt
);
1046 SYNTAX("shlw %0, %1");
1047 #line 1053 "rl78-decode.opc"
1048 ID(shl
); W(); DR(AX
); SC(wcnt
);
1055 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1056 #line 1064 "rl78-decode.opc"
1057 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1060 printf ("\033[33m%s\033[0m %02x %02x\n",
1061 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1063 printf (" wcnt = 0x%x\n", wcnt
);
1065 SYNTAX("shrw %0, %1");
1066 #line 1064 "rl78-decode.opc"
1067 ID(shr
); W(); DR(AX
); SC(wcnt
);
1069 /*----------------------------------------------------------------------*/
1076 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1077 #line 1011 "rl78-decode.opc"
1078 int wcnt AU
= (op
[1] >> 4) & 0x0f;
1081 printf ("\033[33m%s\033[0m %02x %02x\n",
1082 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1084 printf (" wcnt = 0x%x\n", wcnt
);
1086 SYNTAX("sarw %0, %1");
1087 #line 1011 "rl78-decode.opc"
1088 ID(sar
); W(); DR(AX
); SC(wcnt
);
1090 /*----------------------------------------------------------------------*/
1096 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
1097 #line 391 "rl78-decode.opc"
1098 int bit AU
= (op
[1] >> 4) & 0x07;
1101 printf ("\033[33m%s\033[0m %02x %02x\n",
1102 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1104 printf (" bit = 0x%x\n", bit
);
1106 SYNTAX("btclr %s1, $%a0");
1107 #line 391 "rl78-decode.opc"
1108 ID(branch_cond_clear
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1114 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
1115 #line 385 "rl78-decode.opc"
1116 int bit AU
= (op
[1] >> 4) & 0x07;
1119 printf ("\033[33m%s\033[0m %02x %02x\n",
1120 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
1122 printf (" bit = 0x%x\n", bit
);
1124 SYNTAX("btclr %e1, $%a0");
1125 #line 385 "rl78-decode.opc"
1126 ID(branch_cond_clear
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1132 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
1133 #line 377 "rl78-decode.opc"
1134 int bit AU
= (op
[1] >> 4) & 0x07;
1137 printf ("\033[33m%s\033[0m %02x %02x\n",
1138 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1140 printf (" bit = 0x%x\n", bit
);
1142 SYNTAX("bt %s1, $%a0");
1143 #line 377 "rl78-decode.opc"
1144 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(T
);
1150 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
1151 #line 371 "rl78-decode.opc"
1152 int bit AU
= (op
[1] >> 4) & 0x07;
1155 printf ("\033[33m%s\033[0m %02x %02x\n",
1156 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
1158 printf (" bit = 0x%x\n", bit
);
1160 SYNTAX("bt %e1, $%a0");
1161 #line 371 "rl78-decode.opc"
1162 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(T
);
1168 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
1169 #line 338 "rl78-decode.opc"
1170 int bit AU
= (op
[1] >> 4) & 0x07;
1173 printf ("\033[33m%s\033[0m %02x %02x\n",
1174 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1176 printf (" bit = 0x%x\n", bit
);
1178 SYNTAX("bf %s1, $%a0");
1179 #line 338 "rl78-decode.opc"
1180 ID(branch_cond
); SM(None
, SFR
); SB(bit
); DC(pc
+IMMS(1)+4); COND(F
);
1186 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
1187 #line 332 "rl78-decode.opc"
1188 int bit AU
= (op
[1] >> 4) & 0x07;
1191 printf ("\033[33m%s\033[0m %02x %02x\n",
1192 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
1194 printf (" bit = 0x%x\n", bit
);
1196 SYNTAX("bf %e1, $%a0");
1197 #line 332 "rl78-decode.opc"
1198 ID(branch_cond
); DC(pc
+IMMS(1)+3); SM(HL
,0); SB(bit
); COND(F
);
1202 default: UNSUPPORTED(); break;
1209 /** 0011 0ra1 xchw %0, %1 */
1210 #line 1214 "rl78-decode.opc"
1211 int ra AU
= (op
[0] >> 1) & 0x03;
1214 printf ("\033[33m%s\033[0m %02x\n",
1215 "/** 0011 0ra1 xchw %0, %1 */",
1217 printf (" ra = 0x%x\n", ra
);
1219 SYNTAX("xchw %0, %1");
1220 #line 1214 "rl78-decode.opc"
1221 ID(xch
); W(); DR(AX
); SRW(ra
);
1223 /*----------------------------------------------------------------------*/
1229 /** 0011 1000 mov %e0, #%1 */
1232 printf ("\033[33m%s\033[0m %02x\n",
1233 "/** 0011 1000 mov %e0, #%1 */",
1236 SYNTAX("mov %e0, #%1");
1237 #line 716 "rl78-decode.opc"
1238 ID(mov
); DM(C
, IMMU(2)); SC(IMMU(1));
1244 /** 0011 1001 mov %e0, #%1 */
1247 printf ("\033[33m%s\033[0m %02x\n",
1248 "/** 0011 1001 mov %e0, #%1 */",
1251 SYNTAX("mov %e0, #%1");
1252 #line 710 "rl78-decode.opc"
1253 ID(mov
); DM(BC
, IMMU(2)); SC(IMMU(1));
1259 /** 0011 1010 subc %0, #%1 */
1262 printf ("\033[33m%s\033[0m %02x\n",
1263 "/** 0011 1010 subc %0, #%1 */",
1266 SYNTAX("subc %0, #%1");
1267 #line 1153 "rl78-decode.opc"
1268 ID(subc
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1270 /*----------------------------------------------------------------------*/
1276 /** 0011 1011 subc %0, %1 */
1279 printf ("\033[33m%s\033[0m %02x\n",
1280 "/** 0011 1011 subc %0, %1 */",
1283 SYNTAX("subc %0, %1");
1284 #line 1150 "rl78-decode.opc"
1285 ID(subc
); DR(A
); SM(None
, SADDR
); Fzac
;
1291 /** 0011 1100 subc %0, #%1 */
1294 printf ("\033[33m%s\033[0m %02x\n",
1295 "/** 0011 1100 subc %0, #%1 */",
1298 SYNTAX("subc %0, #%1");
1299 #line 1141 "rl78-decode.opc"
1300 ID(subc
); DR(A
); SC(IMMU(1)); Fzac
;
1306 /** 0011 1101 subc %0, %e1 */
1309 printf ("\033[33m%s\033[0m %02x\n",
1310 "/** 0011 1101 subc %0, %e1 */",
1313 SYNTAX("subc %0, %e1");
1314 #line 1129 "rl78-decode.opc"
1315 ID(subc
); DR(A
); SM(HL
, 0); Fzac
;
1321 /** 0011 1110 subc %0, %e1 */
1324 printf ("\033[33m%s\033[0m %02x\n",
1325 "/** 0011 1110 subc %0, %e1 */",
1328 SYNTAX("subc %0, %e1");
1329 #line 1138 "rl78-decode.opc"
1330 ID(subc
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1336 /** 0011 1111 subc %0, %e!1 */
1339 printf ("\033[33m%s\033[0m %02x\n",
1340 "/** 0011 1111 subc %0, %e!1 */",
1343 SYNTAX("subc %0, %e!1");
1344 #line 1126 "rl78-decode.opc"
1345 ID(subc
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1351 /** 0100 0000 cmp %e!0, #%1 */
1354 printf ("\033[33m%s\033[0m %02x\n",
1355 "/** 0100 0000 cmp %e!0, #%1 */",
1358 SYNTAX("cmp %e!0, #%1");
1359 #line 458 "rl78-decode.opc"
1360 ID(cmp
); DM(None
, IMMU(2)); SC(IMMU(1)); Fzac
;
1366 /** 0100 0001 mov %0, #%1 */
1369 printf ("\033[33m%s\033[0m %02x\n",
1370 "/** 0100 0001 mov %0, #%1 */",
1373 SYNTAX("mov %0, #%1");
1374 #line 695 "rl78-decode.opc"
1375 ID(mov
); DR(ES
); SC(IMMU(1));
1381 /** 0100 0010 cmpw %0, %e!1 */
1384 printf ("\033[33m%s\033[0m %02x\n",
1385 "/** 0100 0010 cmpw %0, %e!1 */",
1388 SYNTAX("cmpw %0, %e!1");
1389 #line 509 "rl78-decode.opc"
1390 ID(cmp
); W(); DR(AX
); SM(None
, IMMU(2)); Fzac
;
1398 /** 0100 0ra1 cmpw %0, %1 */
1399 #line 518 "rl78-decode.opc"
1400 int ra AU
= (op
[0] >> 1) & 0x03;
1403 printf ("\033[33m%s\033[0m %02x\n",
1404 "/** 0100 0ra1 cmpw %0, %1 */",
1406 printf (" ra = 0x%x\n", ra
);
1408 SYNTAX("cmpw %0, %1");
1409 #line 518 "rl78-decode.opc"
1410 ID(cmp
); W(); DR(AX
); SRW(ra
); Fzac
;
1416 /** 0100 0100 cmpw %0, #%1 */
1419 printf ("\033[33m%s\033[0m %02x\n",
1420 "/** 0100 0100 cmpw %0, #%1 */",
1423 SYNTAX("cmpw %0, #%1");
1424 #line 515 "rl78-decode.opc"
1425 ID(cmp
); W(); DR(AX
); SC(IMMU(2)); Fzac
;
1431 /** 0100 0110 cmpw %0, %1 */
1434 printf ("\033[33m%s\033[0m %02x\n",
1435 "/** 0100 0110 cmpw %0, %1 */",
1438 SYNTAX("cmpw %0, %1");
1439 #line 521 "rl78-decode.opc"
1440 ID(cmp
); W(); DR(AX
); SM(None
, SADDR
); Fzac
;
1442 /*----------------------------------------------------------------------*/
1448 /** 0100 1000 mov %e0, %1 */
1451 printf ("\033[33m%s\033[0m %02x\n",
1452 "/** 0100 1000 mov %e0, %1 */",
1455 SYNTAX("mov %e0, %1");
1456 #line 713 "rl78-decode.opc"
1457 ID(mov
); DM(BC
, IMMU(2)); SR(A
);
1463 /** 0100 1001 mov %0, %e1 */
1466 printf ("\033[33m%s\033[0m %02x\n",
1467 "/** 0100 1001 mov %0, %e1 */",
1470 SYNTAX("mov %0, %e1");
1471 #line 659 "rl78-decode.opc"
1472 ID(mov
); DR(A
); SM(BC
, IMMU(2));
1478 /** 0100 1010 cmp %0, #%1 */
1481 printf ("\033[33m%s\033[0m %02x\n",
1482 "/** 0100 1010 cmp %0, #%1 */",
1485 SYNTAX("cmp %0, #%1");
1486 #line 461 "rl78-decode.opc"
1487 ID(cmp
); DM(None
, SADDR
); SC(IMMU(1)); Fzac
;
1493 /** 0100 1011 cmp %0, %1 */
1496 printf ("\033[33m%s\033[0m %02x\n",
1497 "/** 0100 1011 cmp %0, %1 */",
1500 SYNTAX("cmp %0, %1");
1501 #line 488 "rl78-decode.opc"
1502 ID(cmp
); DR(A
); SM(None
, SADDR
); Fzac
;
1504 /*----------------------------------------------------------------------*/
1510 /** 0100 1100 cmp %0, #%1 */
1513 printf ("\033[33m%s\033[0m %02x\n",
1514 "/** 0100 1100 cmp %0, #%1 */",
1517 SYNTAX("cmp %0, #%1");
1518 #line 479 "rl78-decode.opc"
1519 ID(cmp
); DR(A
); SC(IMMU(1)); Fzac
;
1525 /** 0100 1101 cmp %0, %e1 */
1528 printf ("\033[33m%s\033[0m %02x\n",
1529 "/** 0100 1101 cmp %0, %e1 */",
1532 SYNTAX("cmp %0, %e1");
1533 #line 467 "rl78-decode.opc"
1534 ID(cmp
); DR(A
); SM(HL
, 0); Fzac
;
1540 /** 0100 1110 cmp %0, %e1 */
1543 printf ("\033[33m%s\033[0m %02x\n",
1544 "/** 0100 1110 cmp %0, %e1 */",
1547 SYNTAX("cmp %0, %e1");
1548 #line 476 "rl78-decode.opc"
1549 ID(cmp
); DR(A
); SM(HL
, IMMU(1)); Fzac
;
1555 /** 0100 1111 cmp %0, %e!1 */
1558 printf ("\033[33m%s\033[0m %02x\n",
1559 "/** 0100 1111 cmp %0, %e!1 */",
1562 SYNTAX("cmp %0, %e!1");
1563 #line 464 "rl78-decode.opc"
1564 ID(cmp
); DR(A
); SM(None
, IMMU(2)); Fzac
;
1577 /** 0101 0reg mov %0, #%1 */
1578 #line 647 "rl78-decode.opc"
1579 int reg AU
= op
[0] & 0x07;
1582 printf ("\033[33m%s\033[0m %02x\n",
1583 "/** 0101 0reg mov %0, #%1 */",
1585 printf (" reg = 0x%x\n", reg
);
1587 SYNTAX("mov %0, #%1");
1588 #line 647 "rl78-decode.opc"
1589 ID(mov
); DRB(reg
); SC(IMMU(1));
1595 /** 0101 1000 movw %e0, %1 */
1598 printf ("\033[33m%s\033[0m %02x\n",
1599 "/** 0101 1000 movw %e0, %1 */",
1602 SYNTAX("movw %e0, %1");
1603 #line 846 "rl78-decode.opc"
1604 ID(mov
); W(); DM(B
, IMMU(2)); SR(AX
);
1610 /** 0101 1001 movw %0, %e1 */
1613 printf ("\033[33m%s\033[0m %02x\n",
1614 "/** 0101 1001 movw %0, %e1 */",
1617 SYNTAX("movw %0, %e1");
1618 #line 837 "rl78-decode.opc"
1619 ID(mov
); W(); DR(AX
); SM(B
, IMMU(2));
1625 /** 0101 1010 and %0, #%1 */
1628 printf ("\033[33m%s\033[0m %02x\n",
1629 "/** 0101 1010 and %0, #%1 */",
1632 SYNTAX("and %0, #%1");
1633 #line 290 "rl78-decode.opc"
1634 ID(and); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
1636 /*----------------------------------------------------------------------*/
1642 /** 0101 1011 and %0, %1 */
1645 printf ("\033[33m%s\033[0m %02x\n",
1646 "/** 0101 1011 and %0, %1 */",
1649 SYNTAX("and %0, %1");
1650 #line 287 "rl78-decode.opc"
1651 ID(and); DR(A
); SM(None
, SADDR
); Fz
;
1657 /** 0101 1100 and %0, #%1 */
1660 printf ("\033[33m%s\033[0m %02x\n",
1661 "/** 0101 1100 and %0, #%1 */",
1664 SYNTAX("and %0, #%1");
1665 #line 278 "rl78-decode.opc"
1666 ID(and); DR(A
); SC(IMMU(1)); Fz
;
1672 /** 0101 1101 and %0, %e1 */
1675 printf ("\033[33m%s\033[0m %02x\n",
1676 "/** 0101 1101 and %0, %e1 */",
1679 SYNTAX("and %0, %e1");
1680 #line 266 "rl78-decode.opc"
1681 ID(and); DR(A
); SM(HL
, 0); Fz
;
1687 /** 0101 1110 and %0, %e1 */
1690 printf ("\033[33m%s\033[0m %02x\n",
1691 "/** 0101 1110 and %0, %e1 */",
1694 SYNTAX("and %0, %e1");
1695 #line 272 "rl78-decode.opc"
1696 ID(and); DR(A
); SM(HL
, IMMU(1)); Fz
;
1702 /** 0101 1111 and %0, %e!1 */
1705 printf ("\033[33m%s\033[0m %02x\n",
1706 "/** 0101 1111 and %0, %e!1 */",
1709 SYNTAX("and %0, %e!1");
1710 #line 263 "rl78-decode.opc"
1711 ID(and); DR(A
); SM(None
, IMMU(2)); Fz
;
1723 /** 0110 0rba mov %0, %1 */
1724 #line 650 "rl78-decode.opc"
1725 int rba AU
= op
[0] & 0x07;
1728 printf ("\033[33m%s\033[0m %02x\n",
1729 "/** 0110 0rba mov %0, %1 */",
1731 printf (" rba = 0x%x\n", rba
);
1733 SYNTAX("mov %0, %1");
1734 #line 650 "rl78-decode.opc"
1735 ID(mov
); DR(A
); SRB(rba
);
1741 switch (op
[1] & 0xff)
1752 /** 0110 0001 0000 0reg add %0, %1 */
1753 #line 203 "rl78-decode.opc"
1754 int reg AU
= op
[1] & 0x07;
1757 printf ("\033[33m%s\033[0m %02x %02x\n",
1758 "/** 0110 0001 0000 0reg add %0, %1 */",
1760 printf (" reg = 0x%x\n", reg
);
1762 SYNTAX("add %0, %1");
1763 #line 203 "rl78-decode.opc"
1764 ID(add
); DRB(reg
); SR(A
); Fzac
;
1776 /** 0110 0001 0000 1rba add %0, %1 */
1777 #line 197 "rl78-decode.opc"
1778 int rba AU
= op
[1] & 0x07;
1781 printf ("\033[33m%s\033[0m %02x %02x\n",
1782 "/** 0110 0001 0000 1rba add %0, %1 */",
1784 printf (" rba = 0x%x\n", rba
);
1786 SYNTAX("add %0, %1");
1787 #line 197 "rl78-decode.opc"
1788 ID(add
); DR(A
); SRB(rba
); Fzac
;
1794 /** 0110 0001 0000 1001 addw %0, %e1 */
1797 printf ("\033[33m%s\033[0m %02x %02x\n",
1798 "/** 0110 0001 0000 1001 addw %0, %e1 */",
1801 SYNTAX("addw %0, %e1");
1802 #line 246 "rl78-decode.opc"
1803 ID(add
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1816 /** 0110 0001 0001 0reg addc %0, %1 */
1817 #line 232 "rl78-decode.opc"
1818 int reg AU
= op
[1] & 0x07;
1821 printf ("\033[33m%s\033[0m %02x %02x\n",
1822 "/** 0110 0001 0001 0reg addc %0, %1 */",
1824 printf (" reg = 0x%x\n", reg
);
1826 SYNTAX("addc %0, %1");
1827 #line 232 "rl78-decode.opc"
1828 ID(addc
); DRB(reg
); SR(A
); Fzac
;
1840 /** 0110 0001 0001 1rba addc %0, %1 */
1841 #line 229 "rl78-decode.opc"
1842 int rba AU
= op
[1] & 0x07;
1845 printf ("\033[33m%s\033[0m %02x %02x\n",
1846 "/** 0110 0001 0001 1rba addc %0, %1 */",
1848 printf (" rba = 0x%x\n", rba
);
1850 SYNTAX("addc %0, %1");
1851 #line 229 "rl78-decode.opc"
1852 ID(addc
); DR(A
); SRB(rba
); Fzac
;
1865 /** 0110 0001 0010 0reg sub %0, %1 */
1866 #line 1118 "rl78-decode.opc"
1867 int reg AU
= op
[1] & 0x07;
1870 printf ("\033[33m%s\033[0m %02x %02x\n",
1871 "/** 0110 0001 0010 0reg sub %0, %1 */",
1873 printf (" reg = 0x%x\n", reg
);
1875 SYNTAX("sub %0, %1");
1876 #line 1118 "rl78-decode.opc"
1877 ID(sub
); DRB(reg
); SR(A
); Fzac
;
1889 /** 0110 0001 0010 1rba sub %0, %1 */
1890 #line 1112 "rl78-decode.opc"
1891 int rba AU
= op
[1] & 0x07;
1894 printf ("\033[33m%s\033[0m %02x %02x\n",
1895 "/** 0110 0001 0010 1rba sub %0, %1 */",
1897 printf (" rba = 0x%x\n", rba
);
1899 SYNTAX("sub %0, %1");
1900 #line 1112 "rl78-decode.opc"
1901 ID(sub
); DR(A
); SRB(rba
); Fzac
;
1907 /** 0110 0001 0010 1001 subw %0, %e1 */
1910 printf ("\033[33m%s\033[0m %02x %02x\n",
1911 "/** 0110 0001 0010 1001 subw %0, %e1 */",
1914 SYNTAX("subw %0, %e1");
1915 #line 1161 "rl78-decode.opc"
1916 ID(sub
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
1929 /** 0110 0001 0011 0reg subc %0, %1 */
1930 #line 1147 "rl78-decode.opc"
1931 int reg AU
= op
[1] & 0x07;
1934 printf ("\033[33m%s\033[0m %02x %02x\n",
1935 "/** 0110 0001 0011 0reg subc %0, %1 */",
1937 printf (" reg = 0x%x\n", reg
);
1939 SYNTAX("subc %0, %1");
1940 #line 1147 "rl78-decode.opc"
1941 ID(subc
); DRB(reg
); SR(A
); Fzac
;
1953 /** 0110 0001 0011 1rba subc %0, %1 */
1954 #line 1144 "rl78-decode.opc"
1955 int rba AU
= op
[1] & 0x07;
1958 printf ("\033[33m%s\033[0m %02x %02x\n",
1959 "/** 0110 0001 0011 1rba subc %0, %1 */",
1961 printf (" rba = 0x%x\n", rba
);
1963 SYNTAX("subc %0, %1");
1964 #line 1144 "rl78-decode.opc"
1965 ID(subc
); DR(A
); SRB(rba
); Fzac
;
1978 /** 0110 0001 0100 0reg cmp %0, %1 */
1979 #line 485 "rl78-decode.opc"
1980 int reg AU
= op
[1] & 0x07;
1983 printf ("\033[33m%s\033[0m %02x %02x\n",
1984 "/** 0110 0001 0100 0reg cmp %0, %1 */",
1986 printf (" reg = 0x%x\n", reg
);
1988 SYNTAX("cmp %0, %1");
1989 #line 485 "rl78-decode.opc"
1990 ID(cmp
); DRB(reg
); SR(A
); Fzac
;
2002 /** 0110 0001 0100 1rba cmp %0, %1 */
2003 #line 482 "rl78-decode.opc"
2004 int rba AU
= op
[1] & 0x07;
2007 printf ("\033[33m%s\033[0m %02x %02x\n",
2008 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2010 printf (" rba = 0x%x\n", rba
);
2012 SYNTAX("cmp %0, %1");
2013 #line 482 "rl78-decode.opc"
2014 ID(cmp
); DR(A
); SRB(rba
); Fzac
;
2020 /** 0110 0001 0100 1001 cmpw %0, %e1 */
2023 printf ("\033[33m%s\033[0m %02x %02x\n",
2024 "/** 0110 0001 0100 1001 cmpw %0, %e1 */",
2027 SYNTAX("cmpw %0, %e1");
2028 #line 512 "rl78-decode.opc"
2029 ID(cmp
); W(); DR(AX
); SM(HL
, IMMU(1)); Fzac
;
2042 /** 0110 0001 0101 0reg and %0, %1 */
2043 #line 284 "rl78-decode.opc"
2044 int reg AU
= op
[1] & 0x07;
2047 printf ("\033[33m%s\033[0m %02x %02x\n",
2048 "/** 0110 0001 0101 0reg and %0, %1 */",
2050 printf (" reg = 0x%x\n", reg
);
2052 SYNTAX("and %0, %1");
2053 #line 284 "rl78-decode.opc"
2054 ID(and); DRB(reg
); SR(A
); Fz
;
2066 /** 0110 0001 0101 1rba and %0, %1 */
2067 #line 281 "rl78-decode.opc"
2068 int rba AU
= op
[1] & 0x07;
2071 printf ("\033[33m%s\033[0m %02x %02x\n",
2072 "/** 0110 0001 0101 1rba and %0, %1 */",
2074 printf (" rba = 0x%x\n", rba
);
2076 SYNTAX("and %0, %1");
2077 #line 281 "rl78-decode.opc"
2078 ID(and); DR(A
); SRB(rba
); Fz
;
2084 /** 0110 0001 0101 1001 inc %e0 */
2087 printf ("\033[33m%s\033[0m %02x %02x\n",
2088 "/** 0110 0001 0101 1001 inc %e0 */",
2092 #line 562 "rl78-decode.opc"
2093 ID(add
); DM(HL
, IMMU(1)); SC(1); Fza
;
2106 /** 0110 0001 0110 0reg or %0, %1 */
2107 #line 936 "rl78-decode.opc"
2108 int reg AU
= op
[1] & 0x07;
2111 printf ("\033[33m%s\033[0m %02x %02x\n",
2112 "/** 0110 0001 0110 0reg or %0, %1 */",
2114 printf (" reg = 0x%x\n", reg
);
2116 SYNTAX("or %0, %1");
2117 #line 936 "rl78-decode.opc"
2118 ID(or); DRB(reg
); SR(A
); Fz
;
2130 /** 0110 0001 0110 1rba or %0, %1 */
2131 #line 933 "rl78-decode.opc"
2132 int rba AU
= op
[1] & 0x07;
2135 printf ("\033[33m%s\033[0m %02x %02x\n",
2136 "/** 0110 0001 0110 1rba or %0, %1 */",
2138 printf (" rba = 0x%x\n", rba
);
2140 SYNTAX("or %0, %1");
2141 #line 933 "rl78-decode.opc"
2142 ID(or); DR(A
); SRB(rba
); Fz
;
2148 /** 0110 0001 0110 1001 dec %e0 */
2151 printf ("\033[33m%s\033[0m %02x %02x\n",
2152 "/** 0110 0001 0110 1001 dec %e0 */",
2156 #line 529 "rl78-decode.opc"
2157 ID(sub
); DM(HL
, IMMU(1)); SC(1); Fza
;
2170 /** 0110 0001 0111 0reg xor %0, %1 */
2171 #line 1240 "rl78-decode.opc"
2172 int reg AU
= op
[1] & 0x07;
2175 printf ("\033[33m%s\033[0m %02x %02x\n",
2176 "/** 0110 0001 0111 0reg xor %0, %1 */",
2178 printf (" reg = 0x%x\n", reg
);
2180 SYNTAX("xor %0, %1");
2181 #line 1240 "rl78-decode.opc"
2182 ID(xor); DRB(reg
); SR(A
); Fz
;
2194 /** 0110 0001 0111 1rba xor %0, %1 */
2195 #line 1237 "rl78-decode.opc"
2196 int rba AU
= op
[1] & 0x07;
2199 printf ("\033[33m%s\033[0m %02x %02x\n",
2200 "/** 0110 0001 0111 1rba xor %0, %1 */",
2202 printf (" rba = 0x%x\n", rba
);
2204 SYNTAX("xor %0, %1");
2205 #line 1237 "rl78-decode.opc"
2206 ID(xor); DR(A
); SRB(rba
); Fz
;
2212 /** 0110 0001 0111 1001 incw %e0 */
2215 printf ("\033[33m%s\033[0m %02x %02x\n",
2216 "/** 0110 0001 0111 1001 incw %e0 */",
2220 #line 576 "rl78-decode.opc"
2221 ID(add
); W(); DM(HL
, IMMU(1)); SC(1);
2228 /** 0110 0001 1000 000 add %0, %e1 */
2231 printf ("\033[33m%s\033[0m %02x %02x\n",
2232 "/** 0110 0001 1000 000 add %0, %e1 */",
2235 SYNTAX("add %0, %e1");
2236 #line 185 "rl78-decode.opc"
2237 ID(add
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2243 /** 0110 0001 1000 0010 add %0, %e1 */
2246 printf ("\033[33m%s\033[0m %02x %02x\n",
2247 "/** 0110 0001 1000 0010 add %0, %e1 */",
2250 SYNTAX("add %0, %e1");
2251 #line 191 "rl78-decode.opc"
2252 ID(add
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2289 /** 0110 0001 1nnn 01mm callt [%x0] */
2290 #line 411 "rl78-decode.opc"
2291 int nnn AU
= (op
[1] >> 4) & 0x07;
2292 #line 411 "rl78-decode.opc"
2293 int mm AU
= op
[1] & 0x03;
2296 printf ("\033[33m%s\033[0m %02x %02x\n",
2297 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2299 printf (" nnn = 0x%x,", nnn
);
2300 printf (" mm = 0x%x\n", mm
);
2302 SYNTAX("callt [%x0]");
2303 #line 411 "rl78-decode.opc"
2304 ID(call
); DM(None
, 0x80 + mm
*16 + nnn
*2);
2306 /*----------------------------------------------------------------------*/
2318 /** 0110 0001 1000 1reg xch %0, %1 */
2319 #line 1199 "rl78-decode.opc"
2320 int reg AU
= op
[1] & 0x07;
2323 printf ("\033[33m%s\033[0m %02x %02x\n",
2324 "/** 0110 0001 1000 1reg xch %0, %1 */",
2326 printf (" reg = 0x%x\n", reg
);
2328 SYNTAX("xch %0, %1");
2329 #line 1199 "rl78-decode.opc"
2330 /* Note: DECW uses reg == X, so this must follow DECW */
2331 ID(xch
); DR(A
); SRB(reg
);
2337 /** 0110 0001 1000 1001 decw %e0 */
2340 printf ("\033[33m%s\033[0m %02x %02x\n",
2341 "/** 0110 0001 1000 1001 decw %e0 */",
2345 #line 543 "rl78-decode.opc"
2346 ID(sub
); W(); DM(HL
, IMMU(1)); SC(1);
2352 /** 0110 0001 1001 0000 addc %0, %e1 */
2355 printf ("\033[33m%s\033[0m %02x %02x\n",
2356 "/** 0110 0001 1001 0000 addc %0, %e1 */",
2359 SYNTAX("addc %0, %e1");
2360 #line 217 "rl78-decode.opc"
2361 ID(addc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2367 /** 0110 0001 1001 0010 addc %0, %e1 */
2370 printf ("\033[33m%s\033[0m %02x %02x\n",
2371 "/** 0110 0001 1001 0010 addc %0, %e1 */",
2374 SYNTAX("addc %0, %e1");
2375 #line 220 "rl78-decode.opc"
2376 ID(addc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2383 /** 0110 0001 1010 000 sub %0, %e1 */
2386 printf ("\033[33m%s\033[0m %02x %02x\n",
2387 "/** 0110 0001 1010 000 sub %0, %e1 */",
2390 SYNTAX("sub %0, %e1");
2391 #line 1100 "rl78-decode.opc"
2392 ID(sub
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2398 /** 0110 0001 1010 0010 sub %0, %e1 */
2401 printf ("\033[33m%s\033[0m %02x %02x\n",
2402 "/** 0110 0001 1010 0010 sub %0, %e1 */",
2405 SYNTAX("sub %0, %e1");
2406 #line 1106 "rl78-decode.opc"
2407 ID(sub
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2413 /** 0110 0001 1010 1000 xch %0, %1 */
2416 printf ("\033[33m%s\033[0m %02x %02x\n",
2417 "/** 0110 0001 1010 1000 xch %0, %1 */",
2420 SYNTAX("xch %0, %1");
2421 #line 1203 "rl78-decode.opc"
2422 ID(xch
); DR(A
); SM(None
, SADDR
);
2428 /** 0110 0001 1010 1001 xch %0, %e1 */
2431 printf ("\033[33m%s\033[0m %02x %02x\n",
2432 "/** 0110 0001 1010 1001 xch %0, %e1 */",
2435 SYNTAX("xch %0, %e1");
2436 #line 1196 "rl78-decode.opc"
2437 ID(xch
); DR(A
); SM2(HL
, C
, 0);
2443 /** 0110 0001 1010 1010 xch %0, %e!1 */
2446 printf ("\033[33m%s\033[0m %02x %02x\n",
2447 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
2450 SYNTAX("xch %0, %e!1");
2451 #line 1178 "rl78-decode.opc"
2452 ID(xch
); DR(A
); SM(None
, IMMU(2));
2458 /** 0110 0001 1010 1011 xch %0, %1 */
2461 printf ("\033[33m%s\033[0m %02x %02x\n",
2462 "/** 0110 0001 1010 1011 xch %0, %1 */",
2465 SYNTAX("xch %0, %1");
2466 #line 1206 "rl78-decode.opc"
2467 ID(xch
); DR(A
); SM(None
, SFR
);
2473 /** 0110 0001 1010 1100 xch %0, %e1 */
2476 printf ("\033[33m%s\033[0m %02x %02x\n",
2477 "/** 0110 0001 1010 1100 xch %0, %e1 */",
2480 SYNTAX("xch %0, %e1");
2481 #line 1187 "rl78-decode.opc"
2482 ID(xch
); DR(A
); SM(HL
, 0);
2488 /** 0110 0001 1010 1101 xch %0, %e1 */
2491 printf ("\033[33m%s\033[0m %02x %02x\n",
2492 "/** 0110 0001 1010 1101 xch %0, %e1 */",
2495 SYNTAX("xch %0, %e1");
2496 #line 1193 "rl78-decode.opc"
2497 ID(xch
); DR(A
); SM(HL
, IMMU(1));
2503 /** 0110 0001 1010 1110 xch %0, %e1 */
2506 printf ("\033[33m%s\033[0m %02x %02x\n",
2507 "/** 0110 0001 1010 1110 xch %0, %e1 */",
2510 SYNTAX("xch %0, %e1");
2511 #line 1181 "rl78-decode.opc"
2512 ID(xch
); DR(A
); SM(DE
, 0);
2518 /** 0110 0001 1010 1111 xch %0, %e1 */
2521 printf ("\033[33m%s\033[0m %02x %02x\n",
2522 "/** 0110 0001 1010 1111 xch %0, %e1 */",
2525 SYNTAX("xch %0, %e1");
2526 #line 1184 "rl78-decode.opc"
2527 ID(xch
); DR(A
); SM(DE
, IMMU(1));
2533 /** 0110 0001 1011 0000 subc %0, %e1 */
2536 printf ("\033[33m%s\033[0m %02x %02x\n",
2537 "/** 0110 0001 1011 0000 subc %0, %e1 */",
2540 SYNTAX("subc %0, %e1");
2541 #line 1132 "rl78-decode.opc"
2542 ID(subc
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2548 /** 0110 0001 1011 0010 subc %0, %e1 */
2551 printf ("\033[33m%s\033[0m %02x %02x\n",
2552 "/** 0110 0001 1011 0010 subc %0, %e1 */",
2555 SYNTAX("subc %0, %e1");
2556 #line 1135 "rl78-decode.opc"
2557 ID(subc
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2563 /** 0110 0001 1011 1000 mov %0, %1 */
2566 printf ("\033[33m%s\033[0m %02x %02x\n",
2567 "/** 0110 0001 1011 1000 mov %0, %1 */",
2570 SYNTAX("mov %0, %1");
2571 #line 701 "rl78-decode.opc"
2572 ID(mov
); DR(ES
); SM(None
, SADDR
);
2578 /** 0110 0001 1011 1001 xch %0, %e1 */
2581 printf ("\033[33m%s\033[0m %02x %02x\n",
2582 "/** 0110 0001 1011 1001 xch %0, %e1 */",
2585 SYNTAX("xch %0, %e1");
2586 #line 1190 "rl78-decode.opc"
2587 ID(xch
); DR(A
); SM2(HL
, B
, 0);
2593 /** 0110 0001 1100 0000 cmp %0, %e1 */
2596 printf ("\033[33m%s\033[0m %02x %02x\n",
2597 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
2600 SYNTAX("cmp %0, %e1");
2601 #line 470 "rl78-decode.opc"
2602 ID(cmp
); DR(A
); SM2(HL
, B
, 0); Fzac
;
2608 /** 0110 0001 1100 0010 cmp %0, %e1 */
2611 printf ("\033[33m%s\033[0m %02x %02x\n",
2612 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
2615 SYNTAX("cmp %0, %e1");
2616 #line 473 "rl78-decode.opc"
2617 ID(cmp
); DR(A
); SM2(HL
, C
, 0); Fzac
;
2623 /** 0110 0001 1100 0011 bh $%a0 */
2626 printf ("\033[33m%s\033[0m %02x %02x\n",
2627 "/** 0110 0001 1100 0011 bh $%a0 */",
2631 #line 318 "rl78-decode.opc"
2632 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(H
);
2638 /** 0110 0001 1100 1000 sk%c1 */
2641 printf ("\033[33m%s\033[0m %02x %02x\n",
2642 "/** 0110 0001 1100 1000 sk%c1 */",
2646 #line 1069 "rl78-decode.opc"
2653 /** 0110 0001 1100 1001 mov %0, %e1 */
2656 printf ("\033[33m%s\033[0m %02x %02x\n",
2657 "/** 0110 0001 1100 1001 mov %0, %e1 */",
2660 SYNTAX("mov %0, %e1");
2661 #line 638 "rl78-decode.opc"
2662 ID(mov
); DR(A
); SM2(HL
, B
, 0);
2671 /** 0110 0001 11rg 1010 call %0 */
2672 #line 408 "rl78-decode.opc"
2673 int rg AU
= (op
[1] >> 4) & 0x03;
2676 printf ("\033[33m%s\033[0m %02x %02x\n",
2677 "/** 0110 0001 11rg 1010 call %0 */",
2679 printf (" rg = 0x%x\n", rg
);
2682 #line 408 "rl78-decode.opc"
2689 /** 0110 0001 1100 1011 br ax */
2692 printf ("\033[33m%s\033[0m %02x %02x\n",
2693 "/** 0110 0001 1100 1011 br ax */",
2697 #line 358 "rl78-decode.opc"
2700 /*----------------------------------------------------------------------*/
2706 /** 0110 0001 1100 1100 brk */
2709 printf ("\033[33m%s\033[0m %02x %02x\n",
2710 "/** 0110 0001 1100 1100 brk */",
2714 #line 366 "rl78-decode.opc"
2717 /*----------------------------------------------------------------------*/
2723 /** 0110 0001 1100 1101 pop %s0 */
2726 printf ("\033[33m%s\033[0m %02x %02x\n",
2727 "/** 0110 0001 1100 1101 pop %s0 */",
2731 #line 964 "rl78-decode.opc"
2732 ID(mov
); W(); DR(PSW
); SPOP();
2734 /*----------------------------------------------------------------------*/
2740 /** 0110 0001 1100 1110 movs %e0, %1 */
2743 printf ("\033[33m%s\033[0m %02x %02x\n",
2744 "/** 0110 0001 1100 1110 movs %e0, %1 */",
2747 SYNTAX("movs %e0, %1");
2748 #line 786 "rl78-decode.opc"
2749 ID(mov
); DM(HL
, IMMU(1)); SR(X
); Fzc
;
2751 /*----------------------------------------------------------------------*/
2760 /** 0110 0001 11rb 1111 sel rb%1 */
2761 #line 1016 "rl78-decode.opc"
2762 int rb AU
= (op
[1] >> 4) & 0x03;
2765 printf ("\033[33m%s\033[0m %02x %02x\n",
2766 "/** 0110 0001 11rb 1111 sel rb%1 */",
2768 printf (" rb = 0x%x\n", rb
);
2771 #line 1016 "rl78-decode.opc"
2774 /*----------------------------------------------------------------------*/
2780 /** 0110 0001 1101 0000 and %0, %e1 */
2783 printf ("\033[33m%s\033[0m %02x %02x\n",
2784 "/** 0110 0001 1101 0000 and %0, %e1 */",
2787 SYNTAX("and %0, %e1");
2788 #line 269 "rl78-decode.opc"
2789 ID(and); DR(A
); SM2(HL
, B
, 0); Fz
;
2795 /** 0110 0001 1101 0010 and %0, %e1 */
2798 printf ("\033[33m%s\033[0m %02x %02x\n",
2799 "/** 0110 0001 1101 0010 and %0, %e1 */",
2802 SYNTAX("and %0, %e1");
2803 #line 275 "rl78-decode.opc"
2804 ID(and); DR(A
); SM2(HL
, C
, 0); Fz
;
2810 /** 0110 0001 1101 0011 bnh $%a0 */
2813 printf ("\033[33m%s\033[0m %02x %02x\n",
2814 "/** 0110 0001 1101 0011 bnh $%a0 */",
2818 #line 321 "rl78-decode.opc"
2819 ID(branch_cond
); DC(pc
+IMMS(1)+3); SR(None
); COND(NH
);
2825 /** 0110 0001 1101 1000 sk%c1 */
2828 printf ("\033[33m%s\033[0m %02x %02x\n",
2829 "/** 0110 0001 1101 1000 sk%c1 */",
2833 #line 1075 "rl78-decode.opc"
2840 /** 0110 0001 1101 1001 mov %e0, %1 */
2843 printf ("\033[33m%s\033[0m %02x %02x\n",
2844 "/** 0110 0001 1101 1001 mov %e0, %1 */",
2847 SYNTAX("mov %e0, %1");
2848 #line 605 "rl78-decode.opc"
2849 ID(mov
); DM2(HL
, B
, 0); SR(A
);
2855 /** 0110 0001 1101 1011 ror %0, %1 */
2858 printf ("\033[33m%s\033[0m %02x %02x\n",
2859 "/** 0110 0001 1101 1011 ror %0, %1 */",
2862 SYNTAX("ror %0, %1");
2863 #line 997 "rl78-decode.opc"
2864 ID(ror
); DR(A
); SC(1);
2870 /** 0110 0001 1101 1100 rolc %0, %1 */
2873 printf ("\033[33m%s\033[0m %02x %02x\n",
2874 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2877 SYNTAX("rolc %0, %1");
2878 #line 991 "rl78-decode.opc"
2879 ID(rolc
); DR(A
); SC(1);
2885 /** 0110 0001 1101 1101 push %s1 */
2888 printf ("\033[33m%s\033[0m %02x %02x\n",
2889 "/** 0110 0001 1101 1101 push %s1 */",
2893 #line 972 "rl78-decode.opc"
2894 ID(mov
); W(); DPUSH(); SR(PSW
);
2896 /*----------------------------------------------------------------------*/
2902 /** 0110 0001 1101 1110 cmps %0, %e1 */
2905 printf ("\033[33m%s\033[0m %02x %02x\n",
2906 "/** 0110 0001 1101 1110 cmps %0, %e1 */",
2909 SYNTAX("cmps %0, %e1");
2910 #line 504 "rl78-decode.opc"
2911 ID(cmp
); DR(X
); SM(HL
, IMMU(1)); Fzac
;
2913 /*----------------------------------------------------------------------*/
2919 /** 0110 0001 1110 0000 or %0, %e1 */
2922 printf ("\033[33m%s\033[0m %02x %02x\n",
2923 "/** 0110 0001 1110 0000 or %0, %e1 */",
2926 SYNTAX("or %0, %e1");
2927 #line 921 "rl78-decode.opc"
2928 ID(or); DR(A
); SM2(HL
, B
, 0); Fz
;
2934 /** 0110 0001 1110 0010 or %0, %e1 */
2937 printf ("\033[33m%s\033[0m %02x %02x\n",
2938 "/** 0110 0001 1110 0010 or %0, %e1 */",
2941 SYNTAX("or %0, %e1");
2942 #line 927 "rl78-decode.opc"
2943 ID(or); DR(A
); SM2(HL
, C
, 0); Fz
;
2949 /** 0110 0001 1110 0011 sk%c1 */
2952 printf ("\033[33m%s\033[0m %02x %02x\n",
2953 "/** 0110 0001 1110 0011 sk%c1 */",
2957 #line 1072 "rl78-decode.opc"
2964 /** 0110 0001 1110 1000 sk%c1 */
2967 printf ("\033[33m%s\033[0m %02x %02x\n",
2968 "/** 0110 0001 1110 1000 sk%c1 */",
2972 #line 1084 "rl78-decode.opc"
2975 /*----------------------------------------------------------------------*/
2981 /** 0110 0001 1110 1001 mov %0, %e1 */
2984 printf ("\033[33m%s\033[0m %02x %02x\n",
2985 "/** 0110 0001 1110 1001 mov %0, %e1 */",
2988 SYNTAX("mov %0, %e1");
2989 #line 641 "rl78-decode.opc"
2990 ID(mov
); DR(A
); SM2(HL
, C
, 0);
2996 /** 0110 0001 1110 1011 rol %0, %1 */
2999 printf ("\033[33m%s\033[0m %02x %02x\n",
3000 "/** 0110 0001 1110 1011 rol %0, %1 */",
3003 SYNTAX("rol %0, %1");
3004 #line 988 "rl78-decode.opc"
3005 ID(rol
); DR(A
); SC(1);
3011 /** 0110 0001 1110 1100 retb */
3014 printf ("\033[33m%s\033[0m %02x %02x\n",
3015 "/** 0110 0001 1110 1100 retb */",
3019 #line 983 "rl78-decode.opc"
3022 /*----------------------------------------------------------------------*/
3028 /** 0110 0001 1110 1101 halt */
3031 printf ("\033[33m%s\033[0m %02x %02x\n",
3032 "/** 0110 0001 1110 1101 halt */",
3036 #line 554 "rl78-decode.opc"
3039 /*----------------------------------------------------------------------*/
3046 /** 0110 0001 111r 1110 rolwc %0, %1 */
3047 #line 994 "rl78-decode.opc"
3048 int r AU
= (op
[1] >> 4) & 0x01;
3051 printf ("\033[33m%s\033[0m %02x %02x\n",
3052 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3054 printf (" r = 0x%x\n", r
);
3056 SYNTAX("rolwc %0, %1");
3057 #line 994 "rl78-decode.opc"
3058 ID(rolc
); W(); DRW(r
); SC(1);
3064 /** 0110 0001 1111 0000 xor %0, %e1 */
3067 printf ("\033[33m%s\033[0m %02x %02x\n",
3068 "/** 0110 0001 1111 0000 xor %0, %e1 */",
3071 SYNTAX("xor %0, %e1");
3072 #line 1225 "rl78-decode.opc"
3073 ID(xor); DR(A
); SM2(HL
, B
, 0); Fz
;
3079 /** 0110 0001 1111 0010 xor %0, %e1 */
3082 printf ("\033[33m%s\033[0m %02x %02x\n",
3083 "/** 0110 0001 1111 0010 xor %0, %e1 */",
3086 SYNTAX("xor %0, %e1");
3087 #line 1231 "rl78-decode.opc"
3088 ID(xor); DR(A
); SM2(HL
, C
, 0); Fz
;
3094 /** 0110 0001 1111 0011 sk%c1 */
3097 printf ("\033[33m%s\033[0m %02x %02x\n",
3098 "/** 0110 0001 1111 0011 sk%c1 */",
3102 #line 1078 "rl78-decode.opc"
3109 /** 0110 0001 1111 1000 sk%c1 */
3112 printf ("\033[33m%s\033[0m %02x %02x\n",
3113 "/** 0110 0001 1111 1000 sk%c1 */",
3117 #line 1081 "rl78-decode.opc"
3124 /** 0110 0001 1111 1001 mov %e0, %1 */
3127 printf ("\033[33m%s\033[0m %02x %02x\n",
3128 "/** 0110 0001 1111 1001 mov %e0, %1 */",
3131 SYNTAX("mov %e0, %1");
3132 #line 614 "rl78-decode.opc"
3133 ID(mov
); DM2(HL
, C
, 0); SR(A
);
3139 /** 0110 0001 1111 1011 rorc %0, %1 */
3142 printf ("\033[33m%s\033[0m %02x %02x\n",
3143 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3146 SYNTAX("rorc %0, %1");
3147 #line 1000 "rl78-decode.opc"
3148 ID(rorc
); DR(A
); SC(1);
3150 /*----------------------------------------------------------------------*/
3152 /* Note that the branch insns need to be listed before the shift
3153 ones, as "shift count of zero" means "branch insn" */
3159 /** 0110 0001 1111 1100 reti */
3162 printf ("\033[33m%s\033[0m %02x %02x\n",
3163 "/** 0110 0001 1111 1100 reti */",
3167 #line 980 "rl78-decode.opc"
3174 /** 0110 0001 1111 1101 stop */
3177 printf ("\033[33m%s\033[0m %02x %02x\n",
3178 "/** 0110 0001 1111 1101 stop */",
3182 #line 1089 "rl78-decode.opc"
3185 /*----------------------------------------------------------------------*/
3189 default: UNSUPPORTED(); break;
3194 /** 0110 1000 movw %e0, %1 */
3197 printf ("\033[33m%s\033[0m %02x\n",
3198 "/** 0110 1000 movw %e0, %1 */",
3201 SYNTAX("movw %e0, %1");
3202 #line 849 "rl78-decode.opc"
3203 ID(mov
); W(); DM(C
, IMMU(2)); SR(AX
);
3209 /** 0110 1001 movw %0, %e1 */
3212 printf ("\033[33m%s\033[0m %02x\n",
3213 "/** 0110 1001 movw %0, %e1 */",
3216 SYNTAX("movw %0, %e1");
3217 #line 840 "rl78-decode.opc"
3218 ID(mov
); W(); DR(AX
); SM(C
, IMMU(2));
3224 /** 0110 1010 or %0, #%1 */
3227 printf ("\033[33m%s\033[0m %02x\n",
3228 "/** 0110 1010 or %0, #%1 */",
3231 SYNTAX("or %0, #%1");
3232 #line 942 "rl78-decode.opc"
3233 ID(or); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
3235 /*----------------------------------------------------------------------*/
3241 /** 0110 1011 or %0, %1 */
3244 printf ("\033[33m%s\033[0m %02x\n",
3245 "/** 0110 1011 or %0, %1 */",
3248 SYNTAX("or %0, %1");
3249 #line 939 "rl78-decode.opc"
3250 ID(or); DR(A
); SM(None
, SADDR
); Fz
;
3256 /** 0110 1100 or %0, #%1 */
3259 printf ("\033[33m%s\033[0m %02x\n",
3260 "/** 0110 1100 or %0, #%1 */",
3263 SYNTAX("or %0, #%1");
3264 #line 930 "rl78-decode.opc"
3265 ID(or); DR(A
); SC(IMMU(1)); Fz
;
3271 /** 0110 1101 or %0, %e1 */
3274 printf ("\033[33m%s\033[0m %02x\n",
3275 "/** 0110 1101 or %0, %e1 */",
3278 SYNTAX("or %0, %e1");
3279 #line 918 "rl78-decode.opc"
3280 ID(or); DR(A
); SM(HL
, 0); Fz
;
3286 /** 0110 1110 or %0, %e1 */
3289 printf ("\033[33m%s\033[0m %02x\n",
3290 "/** 0110 1110 or %0, %e1 */",
3293 SYNTAX("or %0, %e1");
3294 #line 924 "rl78-decode.opc"
3295 ID(or); DR(A
); SM(HL
, IMMU(1)); Fz
;
3301 /** 0110 1111 or %0, %e!1 */
3304 printf ("\033[33m%s\033[0m %02x\n",
3305 "/** 0110 1111 or %0, %e!1 */",
3308 SYNTAX("or %0, %e!1");
3309 #line 915 "rl78-decode.opc"
3310 ID(or); DR(A
); SM(None
, IMMU(2)); Fz
;
3322 /** 0111 0rba mov %0, %1 */
3323 #line 674 "rl78-decode.opc"
3324 int rba AU
= op
[0] & 0x07;
3327 printf ("\033[33m%s\033[0m %02x\n",
3328 "/** 0111 0rba mov %0, %1 */",
3330 printf (" rba = 0x%x\n", rba
);
3332 SYNTAX("mov %0, %1");
3333 #line 674 "rl78-decode.opc"
3334 ID(mov
); DRB(rba
); SR(A
);
3340 switch (op
[1] & 0xff)
3351 /** 0111 0001 0bit 0000 set1 %e!0 */
3352 #line 1021 "rl78-decode.opc"
3353 int bit AU
= (op
[1] >> 4) & 0x07;
3356 printf ("\033[33m%s\033[0m %02x %02x\n",
3357 "/** 0111 0001 0bit 0000 set1 %e!0 */",
3359 printf (" bit = 0x%x\n", bit
);
3361 SYNTAX("set1 %e!0");
3362 #line 1021 "rl78-decode.opc"
3363 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(1);
3376 /** 0111 0001 0bit 0001 mov1 %0, cy */
3377 #line 778 "rl78-decode.opc"
3378 int bit AU
= (op
[1] >> 4) & 0x07;
3381 printf ("\033[33m%s\033[0m %02x %02x\n",
3382 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3384 printf (" bit = 0x%x\n", bit
);
3386 SYNTAX("mov1 %0, cy");
3387 #line 778 "rl78-decode.opc"
3388 ID(mov
); DM(None
, SADDR
); DB(bit
); SCY();
3401 /** 0111 0001 0bit 0010 set1 %0 */
3402 #line 1039 "rl78-decode.opc"
3403 int bit AU
= (op
[1] >> 4) & 0x07;
3406 printf ("\033[33m%s\033[0m %02x %02x\n",
3407 "/** 0111 0001 0bit 0010 set1 %0 */",
3409 printf (" bit = 0x%x\n", bit
);
3412 #line 1039 "rl78-decode.opc"
3413 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(1);
3415 /*----------------------------------------------------------------------*/
3428 /** 0111 0001 0bit 0011 clr1 %0 */
3429 #line 434 "rl78-decode.opc"
3430 int bit AU
= (op
[1] >> 4) & 0x07;
3433 printf ("\033[33m%s\033[0m %02x %02x\n",
3434 "/** 0111 0001 0bit 0011 clr1 %0 */",
3436 printf (" bit = 0x%x\n", bit
);
3439 #line 434 "rl78-decode.opc"
3440 ID(mov
); DM(None
, SADDR
); DB(bit
); SC(0);
3442 /*----------------------------------------------------------------------*/
3455 /** 0111 0001 0bit 0100 mov1 cy, %1 */
3456 #line 772 "rl78-decode.opc"
3457 int bit AU
= (op
[1] >> 4) & 0x07;
3460 printf ("\033[33m%s\033[0m %02x %02x\n",
3461 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3463 printf (" bit = 0x%x\n", bit
);
3465 SYNTAX("mov1 cy, %1");
3466 #line 772 "rl78-decode.opc"
3467 ID(mov
); DCY(); SM(None
, SADDR
); SB(bit
);
3480 /** 0111 0001 0bit 0101 and1 cy, %s1 */
3481 #line 304 "rl78-decode.opc"
3482 int bit AU
= (op
[1] >> 4) & 0x07;
3485 printf ("\033[33m%s\033[0m %02x %02x\n",
3486 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3488 printf (" bit = 0x%x\n", bit
);
3490 SYNTAX("and1 cy, %s1");
3491 #line 304 "rl78-decode.opc"
3492 ID(and); DCY(); SM(None
, SADDR
); SB(bit
);
3494 /*----------------------------------------------------------------------*/
3496 /* Note that the branch insns need to be listed before the shift
3497 ones, as "shift count of zero" means "branch insn" */
3510 /** 0111 0001 0bit 0110 or1 cy, %s1 */
3511 #line 956 "rl78-decode.opc"
3512 int bit AU
= (op
[1] >> 4) & 0x07;
3515 printf ("\033[33m%s\033[0m %02x %02x\n",
3516 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3518 printf (" bit = 0x%x\n", bit
);
3520 SYNTAX("or1 cy, %s1");
3521 #line 956 "rl78-decode.opc"
3522 ID(or); DCY(); SM(None
, SADDR
); SB(bit
);
3524 /*----------------------------------------------------------------------*/
3537 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
3538 #line 1260 "rl78-decode.opc"
3539 int bit AU
= (op
[1] >> 4) & 0x07;
3542 printf ("\033[33m%s\033[0m %02x %02x\n",
3543 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3545 printf (" bit = 0x%x\n", bit
);
3547 SYNTAX("xor1 cy, %s1");
3548 #line 1260 "rl78-decode.opc"
3549 ID(xor); DCY(); SM(None
, SADDR
); SB(bit
);
3551 /*----------------------------------------------------------------------*/
3564 /** 0111 0001 0bit 1000 clr1 %e!0 */
3565 #line 416 "rl78-decode.opc"
3566 int bit AU
= (op
[1] >> 4) & 0x07;
3569 printf ("\033[33m%s\033[0m %02x %02x\n",
3570 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
3572 printf (" bit = 0x%x\n", bit
);
3574 SYNTAX("clr1 %e!0");
3575 #line 416 "rl78-decode.opc"
3576 ID(mov
); DM(None
, IMMU(2)); DB(bit
); SC(0);
3589 /** 0111 0001 0bit 1001 mov1 %s0, cy */
3590 #line 781 "rl78-decode.opc"
3591 int bit AU
= (op
[1] >> 4) & 0x07;
3594 printf ("\033[33m%s\033[0m %02x %02x\n",
3595 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3597 printf (" bit = 0x%x\n", bit
);
3599 SYNTAX("mov1 %s0, cy");
3600 #line 781 "rl78-decode.opc"
3601 ID(mov
); DM(None
, SFR
); DB(bit
); SCY();
3603 /*----------------------------------------------------------------------*/
3616 /** 0111 0001 0bit 1010 set1 %s0 */
3617 #line 1033 "rl78-decode.opc"
3618 int bit AU
= (op
[1] >> 4) & 0x07;
3621 printf ("\033[33m%s\033[0m %02x %02x\n",
3622 "/** 0111 0001 0bit 1010 set1 %s0 */",
3624 printf (" bit = 0x%x\n", bit
);
3627 #line 1033 "rl78-decode.opc"
3629 ID(mov
); DM(None
, op0
); DB(bit
); SC(1);
3630 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3631 rl78
->syntax
= "ei";
3644 /** 0111 0001 0bit 1011 clr1 %s0 */
3645 #line 428 "rl78-decode.opc"
3646 int bit AU
= (op
[1] >> 4) & 0x07;
3649 printf ("\033[33m%s\033[0m %02x %02x\n",
3650 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3652 printf (" bit = 0x%x\n", bit
);
3655 #line 428 "rl78-decode.opc"
3657 ID(mov
); DM(None
, op0
); DB(bit
); SC(0);
3658 if (op0
== RL78_SFR_PSW
&& bit
== 7)
3659 rl78
->syntax
= "di";
3672 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
3673 #line 775 "rl78-decode.opc"
3674 int bit AU
= (op
[1] >> 4) & 0x07;
3677 printf ("\033[33m%s\033[0m %02x %02x\n",
3678 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3680 printf (" bit = 0x%x\n", bit
);
3682 SYNTAX("mov1 cy, %s1");
3683 #line 775 "rl78-decode.opc"
3684 ID(mov
); DCY(); SM(None
, SFR
); SB(bit
);
3697 /** 0111 0001 0bit 1101 and1 cy, %s1 */
3698 #line 301 "rl78-decode.opc"
3699 int bit AU
= (op
[1] >> 4) & 0x07;
3702 printf ("\033[33m%s\033[0m %02x %02x\n",
3703 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3705 printf (" bit = 0x%x\n", bit
);
3707 SYNTAX("and1 cy, %s1");
3708 #line 301 "rl78-decode.opc"
3709 ID(and); DCY(); SM(None
, SFR
); SB(bit
);
3722 /** 0111 0001 0bit 1110 or1 cy, %s1 */
3723 #line 953 "rl78-decode.opc"
3724 int bit AU
= (op
[1] >> 4) & 0x07;
3727 printf ("\033[33m%s\033[0m %02x %02x\n",
3728 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3730 printf (" bit = 0x%x\n", bit
);
3732 SYNTAX("or1 cy, %s1");
3733 #line 953 "rl78-decode.opc"
3734 ID(or); DCY(); SM(None
, SFR
); SB(bit
);
3747 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
3748 #line 1257 "rl78-decode.opc"
3749 int bit AU
= (op
[1] >> 4) & 0x07;
3752 printf ("\033[33m%s\033[0m %02x %02x\n",
3753 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3755 printf (" bit = 0x%x\n", bit
);
3757 SYNTAX("xor1 cy, %s1");
3758 #line 1257 "rl78-decode.opc"
3759 ID(xor); DCY(); SM(None
, SFR
); SB(bit
);
3765 /** 0111 0001 1000 0000 set1 cy */
3768 printf ("\033[33m%s\033[0m %02x %02x\n",
3769 "/** 0111 0001 1000 0000 set1 cy */",
3773 #line 1030 "rl78-decode.opc"
3774 ID(mov
); DCY(); SC(1);
3787 /** 0111 0001 1bit 0001 mov1 %e0, cy */
3788 #line 760 "rl78-decode.opc"
3789 int bit AU
= (op
[1] >> 4) & 0x07;
3792 printf ("\033[33m%s\033[0m %02x %02x\n",
3793 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
3795 printf (" bit = 0x%x\n", bit
);
3797 SYNTAX("mov1 %e0, cy");
3798 #line 760 "rl78-decode.opc"
3799 ID(mov
); DM(HL
, 0); DB(bit
); SCY();
3812 /** 0111 0001 1bit 0010 set1 %e0 */
3813 #line 1024 "rl78-decode.opc"
3814 int bit AU
= (op
[1] >> 4) & 0x07;
3817 printf ("\033[33m%s\033[0m %02x %02x\n",
3818 "/** 0111 0001 1bit 0010 set1 %e0 */",
3820 printf (" bit = 0x%x\n", bit
);
3823 #line 1024 "rl78-decode.opc"
3824 ID(mov
); DM(HL
, 0); DB(bit
); SC(1);
3837 /** 0111 0001 1bit 0011 clr1 %e0 */
3838 #line 419 "rl78-decode.opc"
3839 int bit AU
= (op
[1] >> 4) & 0x07;
3842 printf ("\033[33m%s\033[0m %02x %02x\n",
3843 "/** 0111 0001 1bit 0011 clr1 %e0 */",
3845 printf (" bit = 0x%x\n", bit
);
3848 #line 419 "rl78-decode.opc"
3849 ID(mov
); DM(HL
, 0); DB(bit
); SC(0);
3862 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
3863 #line 766 "rl78-decode.opc"
3864 int bit AU
= (op
[1] >> 4) & 0x07;
3867 printf ("\033[33m%s\033[0m %02x %02x\n",
3868 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
3870 printf (" bit = 0x%x\n", bit
);
3872 SYNTAX("mov1 cy, %e1");
3873 #line 766 "rl78-decode.opc"
3874 ID(mov
); DCY(); SM(HL
, 0); SB(bit
);
3887 /** 0111 0001 1bit 0101 and1 cy, %e1 */
3888 #line 295 "rl78-decode.opc"
3889 int bit AU
= (op
[1] >> 4) & 0x07;
3892 printf ("\033[33m%s\033[0m %02x %02x\n",
3893 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
3895 printf (" bit = 0x%x\n", bit
);
3897 SYNTAX("and1 cy, %e1");
3898 #line 295 "rl78-decode.opc"
3899 ID(and); DCY(); SM(HL
, 0); SB(bit
);
3912 /** 0111 0001 1bit 0110 or1 cy, %e1 */
3913 #line 947 "rl78-decode.opc"
3914 int bit AU
= (op
[1] >> 4) & 0x07;
3917 printf ("\033[33m%s\033[0m %02x %02x\n",
3918 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
3920 printf (" bit = 0x%x\n", bit
);
3922 SYNTAX("or1 cy, %e1");
3923 #line 947 "rl78-decode.opc"
3924 ID(or); DCY(); SM(HL
, 0); SB(bit
);
3937 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
3938 #line 1251 "rl78-decode.opc"
3939 int bit AU
= (op
[1] >> 4) & 0x07;
3942 printf ("\033[33m%s\033[0m %02x %02x\n",
3943 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
3945 printf (" bit = 0x%x\n", bit
);
3947 SYNTAX("xor1 cy, %e1");
3948 #line 1251 "rl78-decode.opc"
3949 ID(xor); DCY(); SM(HL
, 0); SB(bit
);
3955 /** 0111 0001 1000 1000 clr1 cy */
3958 printf ("\033[33m%s\033[0m %02x %02x\n",
3959 "/** 0111 0001 1000 1000 clr1 cy */",
3963 #line 425 "rl78-decode.opc"
3964 ID(mov
); DCY(); SC(0);
3977 /** 0111 0001 1bit 1001 mov1 %e0, cy */
3978 #line 763 "rl78-decode.opc"
3979 int bit AU
= (op
[1] >> 4) & 0x07;
3982 printf ("\033[33m%s\033[0m %02x %02x\n",
3983 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
3985 printf (" bit = 0x%x\n", bit
);
3987 SYNTAX("mov1 %e0, cy");
3988 #line 763 "rl78-decode.opc"
3989 ID(mov
); DR(A
); DB(bit
); SCY();
4002 /** 0111 0001 1bit 1010 set1 %0 */
4003 #line 1027 "rl78-decode.opc"
4004 int bit AU
= (op
[1] >> 4) & 0x07;
4007 printf ("\033[33m%s\033[0m %02x %02x\n",
4008 "/** 0111 0001 1bit 1010 set1 %0 */",
4010 printf (" bit = 0x%x\n", bit
);
4013 #line 1027 "rl78-decode.opc"
4014 ID(mov
); DR(A
); DB(bit
); SC(1);
4027 /** 0111 0001 1bit 1011 clr1 %0 */
4028 #line 422 "rl78-decode.opc"
4029 int bit AU
= (op
[1] >> 4) & 0x07;
4032 printf ("\033[33m%s\033[0m %02x %02x\n",
4033 "/** 0111 0001 1bit 1011 clr1 %0 */",
4035 printf (" bit = 0x%x\n", bit
);
4038 #line 422 "rl78-decode.opc"
4039 ID(mov
); DR(A
); DB(bit
); SC(0);
4052 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
4053 #line 769 "rl78-decode.opc"
4054 int bit AU
= (op
[1] >> 4) & 0x07;
4057 printf ("\033[33m%s\033[0m %02x %02x\n",
4058 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
4060 printf (" bit = 0x%x\n", bit
);
4062 SYNTAX("mov1 cy, %e1");
4063 #line 769 "rl78-decode.opc"
4064 ID(mov
); DCY(); SR(A
); SB(bit
);
4077 /** 0111 0001 1bit 1101 and1 cy, %1 */
4078 #line 298 "rl78-decode.opc"
4079 int bit AU
= (op
[1] >> 4) & 0x07;
4082 printf ("\033[33m%s\033[0m %02x %02x\n",
4083 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4085 printf (" bit = 0x%x\n", bit
);
4087 SYNTAX("and1 cy, %1");
4088 #line 298 "rl78-decode.opc"
4089 ID(and); DCY(); SR(A
); SB(bit
);
4102 /** 0111 0001 1bit 1110 or1 cy, %1 */
4103 #line 950 "rl78-decode.opc"
4104 int bit AU
= (op
[1] >> 4) & 0x07;
4107 printf ("\033[33m%s\033[0m %02x %02x\n",
4108 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4110 printf (" bit = 0x%x\n", bit
);
4112 SYNTAX("or1 cy, %1");
4113 #line 950 "rl78-decode.opc"
4114 ID(or); DCY(); SR(A
); SB(bit
);
4127 /** 0111 0001 1bit 1111 xor1 cy, %1 */
4128 #line 1254 "rl78-decode.opc"
4129 int bit AU
= (op
[1] >> 4) & 0x07;
4132 printf ("\033[33m%s\033[0m %02x %02x\n",
4133 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4135 printf (" bit = 0x%x\n", bit
);
4137 SYNTAX("xor1 cy, %1");
4138 #line 1254 "rl78-decode.opc"
4139 ID(xor); DCY(); SR(A
); SB(bit
);
4145 /** 0111 0001 1100 0000 not1 cy */
4148 printf ("\033[33m%s\033[0m %02x %02x\n",
4149 "/** 0111 0001 1100 0000 not1 cy */",
4153 #line 891 "rl78-decode.opc"
4154 ID(xor); DCY(); SC(1);
4156 /*----------------------------------------------------------------------*/
4160 default: UNSUPPORTED(); break;
4165 /** 0111 1000 movw %e0, %1 */
4168 printf ("\033[33m%s\033[0m %02x\n",
4169 "/** 0111 1000 movw %e0, %1 */",
4172 SYNTAX("movw %e0, %1");
4173 #line 852 "rl78-decode.opc"
4174 ID(mov
); W(); DM(BC
, IMMU(2)); SR(AX
);
4180 /** 0111 1001 movw %0, %e1 */
4183 printf ("\033[33m%s\033[0m %02x\n",
4184 "/** 0111 1001 movw %0, %e1 */",
4187 SYNTAX("movw %0, %e1");
4188 #line 843 "rl78-decode.opc"
4189 ID(mov
); W(); DR(AX
); SM(BC
, IMMU(2));
4195 /** 0111 1010 xor %0, #%1 */
4198 printf ("\033[33m%s\033[0m %02x\n",
4199 "/** 0111 1010 xor %0, #%1 */",
4202 SYNTAX("xor %0, #%1");
4203 #line 1246 "rl78-decode.opc"
4204 ID(xor); DM(None
, SADDR
); SC(IMMU(1)); Fz
;
4206 /*----------------------------------------------------------------------*/
4212 /** 0111 1011 xor %0, %1 */
4215 printf ("\033[33m%s\033[0m %02x\n",
4216 "/** 0111 1011 xor %0, %1 */",
4219 SYNTAX("xor %0, %1");
4220 #line 1243 "rl78-decode.opc"
4221 ID(xor); DR(A
); SM(None
, SADDR
); Fz
;
4227 /** 0111 1100 xor %0, #%1 */
4230 printf ("\033[33m%s\033[0m %02x\n",
4231 "/** 0111 1100 xor %0, #%1 */",
4234 SYNTAX("xor %0, #%1");
4235 #line 1234 "rl78-decode.opc"
4236 ID(xor); DR(A
); SC(IMMU(1)); Fz
;
4242 /** 0111 1101 xor %0, %e1 */
4245 printf ("\033[33m%s\033[0m %02x\n",
4246 "/** 0111 1101 xor %0, %e1 */",
4249 SYNTAX("xor %0, %e1");
4250 #line 1222 "rl78-decode.opc"
4251 ID(xor); DR(A
); SM(HL
, 0); Fz
;
4257 /** 0111 1110 xor %0, %e1 */
4260 printf ("\033[33m%s\033[0m %02x\n",
4261 "/** 0111 1110 xor %0, %e1 */",
4264 SYNTAX("xor %0, %e1");
4265 #line 1228 "rl78-decode.opc"
4266 ID(xor); DR(A
); SM(HL
, IMMU(1)); Fz
;
4272 /** 0111 1111 xor %0, %e!1 */
4275 printf ("\033[33m%s\033[0m %02x\n",
4276 "/** 0111 1111 xor %0, %e!1 */",
4279 SYNTAX("xor %0, %e!1");
4280 #line 1219 "rl78-decode.opc"
4281 ID(xor); DR(A
); SM(None
, IMMU(2)); Fz
;
4294 /** 1000 0reg inc %0 */
4295 #line 565 "rl78-decode.opc"
4296 int reg AU
= op
[0] & 0x07;
4299 printf ("\033[33m%s\033[0m %02x\n",
4300 "/** 1000 0reg inc %0 */",
4302 printf (" reg = 0x%x\n", reg
);
4305 #line 565 "rl78-decode.opc"
4306 ID(add
); DRB(reg
); SC(1); Fza
;
4312 /** 1000 1000 mov %0, %e1 */
4315 printf ("\033[33m%s\033[0m %02x\n",
4316 "/** 1000 1000 mov %0, %e1 */",
4319 SYNTAX("mov %0, %e1");
4320 #line 644 "rl78-decode.opc"
4321 ID(mov
); DR(A
); SM(SP
, IMMU(1));
4327 /** 1000 1001 mov %0, %e1 */
4330 printf ("\033[33m%s\033[0m %02x\n",
4331 "/** 1000 1001 mov %0, %e1 */",
4334 SYNTAX("mov %0, %e1");
4335 #line 626 "rl78-decode.opc"
4336 ID(mov
); DR(A
); SM(DE
, 0);
4342 /** 1000 1010 mov %0, %e1 */
4345 printf ("\033[33m%s\033[0m %02x\n",
4346 "/** 1000 1010 mov %0, %e1 */",
4349 SYNTAX("mov %0, %e1");
4350 #line 629 "rl78-decode.opc"
4351 ID(mov
); DR(A
); SM(DE
, IMMU(1));
4357 /** 1000 1011 mov %0, %e1 */
4360 printf ("\033[33m%s\033[0m %02x\n",
4361 "/** 1000 1011 mov %0, %e1 */",
4364 SYNTAX("mov %0, %e1");
4365 #line 632 "rl78-decode.opc"
4366 ID(mov
); DR(A
); SM(HL
, 0);
4372 /** 1000 1100 mov %0, %e1 */
4375 printf ("\033[33m%s\033[0m %02x\n",
4376 "/** 1000 1100 mov %0, %e1 */",
4379 SYNTAX("mov %0, %e1");
4380 #line 635 "rl78-decode.opc"
4381 ID(mov
); DR(A
); SM(HL
, IMMU(1));
4387 /** 1000 1101 mov %0, %1 */
4390 printf ("\033[33m%s\033[0m %02x\n",
4391 "/** 1000 1101 mov %0, %1 */",
4394 SYNTAX("mov %0, %1");
4395 #line 668 "rl78-decode.opc"
4396 ID(mov
); DR(A
); SM(None
, SADDR
);
4402 /** 1000 1110 mov %0, %s1 */
4405 printf ("\033[33m%s\033[0m %02x\n",
4406 "/** 1000 1110 mov %0, %s1 */",
4409 SYNTAX("mov %0, %s1");
4410 #line 665 "rl78-decode.opc"
4411 ID(mov
); DR(A
); SM(None
, SFR
);
4417 /** 1000 1111 mov %0, %e!1 */
4420 printf ("\033[33m%s\033[0m %02x\n",
4421 "/** 1000 1111 mov %0, %e!1 */",
4424 SYNTAX("mov %0, %e!1");
4425 #line 623 "rl78-decode.opc"
4426 ID(mov
); DR(A
); SM(None
, IMMU(2));
4439 /** 1001 0reg dec %0 */
4440 #line 532 "rl78-decode.opc"
4441 int reg AU
= op
[0] & 0x07;
4444 printf ("\033[33m%s\033[0m %02x\n",
4445 "/** 1001 0reg dec %0 */",
4447 printf (" reg = 0x%x\n", reg
);
4450 #line 532 "rl78-decode.opc"
4451 ID(sub
); DRB(reg
); SC(1); Fza
;
4457 /** 1001 1000 mov %0, %1 */
4460 printf ("\033[33m%s\033[0m %02x\n",
4461 "/** 1001 1000 mov %0, %1 */",
4464 SYNTAX("mov %0, %1");
4465 #line 620 "rl78-decode.opc"
4466 ID(mov
); DM(SP
, IMMU(1)); SR(A
);
4472 /** 1001 1001 mov %e0,%1 */
4475 printf ("\033[33m%s\033[0m %02x\n",
4476 "/** 1001 1001 mov %e0,%1 */",
4479 SYNTAX("mov %e0,%1");
4480 #line 593 "rl78-decode.opc"
4481 ID(mov
); DM(DE
, 0); SR(A
);
4487 /** 1001 1010 mov %e0, %1 */
4490 printf ("\033[33m%s\033[0m %02x\n",
4491 "/** 1001 1010 mov %e0, %1 */",
4494 SYNTAX("mov %e0, %1");
4495 #line 599 "rl78-decode.opc"
4496 ID(mov
); DM(DE
, IMMU(1)); SR(A
);
4502 /** 1001 1011 mov %e0,%1 */
4505 printf ("\033[33m%s\033[0m %02x\n",
4506 "/** 1001 1011 mov %e0,%1 */",
4509 SYNTAX("mov %e0,%1");
4510 #line 602 "rl78-decode.opc"
4511 ID(mov
); DM(HL
, 0); SR(A
);
4517 /** 1001 1100 mov %e0, %1 */
4520 printf ("\033[33m%s\033[0m %02x\n",
4521 "/** 1001 1100 mov %e0, %1 */",
4524 SYNTAX("mov %e0, %1");
4525 #line 611 "rl78-decode.opc"
4526 ID(mov
); DM(HL
, IMMU(1)); SR(A
);
4532 /** 1001 1101 mov %0, %1 */
4535 printf ("\033[33m%s\033[0m %02x\n",
4536 "/** 1001 1101 mov %0, %1 */",
4539 SYNTAX("mov %0, %1");
4540 #line 725 "rl78-decode.opc"
4541 ID(mov
); DM(None
, SADDR
); SR(A
);
4547 /** 1001 1110 mov %0, %1 */
4550 printf ("\033[33m%s\033[0m %02x\n",
4551 "/** 1001 1110 mov %0, %1 */",
4554 SYNTAX("mov %0, %1");
4555 #line 755 "rl78-decode.opc"
4556 ID(mov
); DM(None
, SFR
); SR(A
);
4558 /*----------------------------------------------------------------------*/
4564 /** 1001 1111 mov %e!0, %1 */
4567 printf ("\033[33m%s\033[0m %02x\n",
4568 "/** 1001 1111 mov %e!0, %1 */",
4571 SYNTAX("mov %e!0, %1");
4572 #line 590 "rl78-decode.opc"
4573 ID(mov
); DM(None
, IMMU(2)); SR(A
);
4579 /** 1010 0000 inc %e!0 */
4582 printf ("\033[33m%s\033[0m %02x\n",
4583 "/** 1010 0000 inc %e!0 */",
4587 #line 559 "rl78-decode.opc"
4588 ID(add
); DM(None
, IMMU(2)); SC(1); Fza
;
4597 /** 1010 0rg1 incw %0 */
4598 #line 579 "rl78-decode.opc"
4599 int rg AU
= (op
[0] >> 1) & 0x03;
4602 printf ("\033[33m%s\033[0m %02x\n",
4603 "/** 1010 0rg1 incw %0 */",
4605 printf (" rg = 0x%x\n", rg
);
4608 #line 579 "rl78-decode.opc"
4609 ID(add
); W(); DRW(rg
); SC(1);
4615 /** 1010 0010 incw %e!0 */
4618 printf ("\033[33m%s\033[0m %02x\n",
4619 "/** 1010 0010 incw %e!0 */",
4622 SYNTAX("incw %e!0");
4623 #line 573 "rl78-decode.opc"
4624 ID(add
); W(); DM(None
, IMMU(2)); SC(1);
4630 /** 1010 0100 inc %0 */
4633 printf ("\033[33m%s\033[0m %02x\n",
4634 "/** 1010 0100 inc %0 */",
4638 #line 568 "rl78-decode.opc"
4639 ID(add
); DM(None
, SADDR
); SC(1); Fza
;
4641 /*----------------------------------------------------------------------*/
4647 /** 1010 0110 incw %0 */
4650 printf ("\033[33m%s\033[0m %02x\n",
4651 "/** 1010 0110 incw %0 */",
4655 #line 582 "rl78-decode.opc"
4656 ID(add
); W(); DM(None
, SADDR
); SC(1);
4658 /*----------------------------------------------------------------------*/
4664 /** 1010 1000 movw %0, %1 */
4667 printf ("\033[33m%s\033[0m %02x\n",
4668 "/** 1010 1000 movw %0, %1 */",
4671 SYNTAX("movw %0, %1");
4672 #line 825 "rl78-decode.opc"
4673 ID(mov
); W(); DR(AX
); SM(SP
, IMMU(1));
4679 /** 1010 1001 movw %0, %e1 */
4682 printf ("\033[33m%s\033[0m %02x\n",
4683 "/** 1010 1001 movw %0, %e1 */",
4686 SYNTAX("movw %0, %e1");
4687 #line 813 "rl78-decode.opc"
4688 ID(mov
); W(); DR(AX
); SM(DE
, 0);
4694 /** 1010 1010 movw %0, %e1 */
4697 printf ("\033[33m%s\033[0m %02x\n",
4698 "/** 1010 1010 movw %0, %e1 */",
4701 SYNTAX("movw %0, %e1");
4702 #line 816 "rl78-decode.opc"
4703 ID(mov
); W(); DR(AX
); SM(DE
, IMMU(1));
4709 /** 1010 1011 movw %0, %e1 */
4712 printf ("\033[33m%s\033[0m %02x\n",
4713 "/** 1010 1011 movw %0, %e1 */",
4716 SYNTAX("movw %0, %e1");
4717 #line 819 "rl78-decode.opc"
4718 ID(mov
); W(); DR(AX
); SM(HL
, 0);
4724 /** 1010 1100 movw %0, %e1 */
4727 printf ("\033[33m%s\033[0m %02x\n",
4728 "/** 1010 1100 movw %0, %e1 */",
4731 SYNTAX("movw %0, %e1");
4732 #line 822 "rl78-decode.opc"
4733 ID(mov
); W(); DR(AX
); SM(HL
, IMMU(1));
4739 /** 1010 1101 movw %0, %1 */
4742 printf ("\033[33m%s\033[0m %02x\n",
4743 "/** 1010 1101 movw %0, %1 */",
4746 SYNTAX("movw %0, %1");
4747 #line 855 "rl78-decode.opc"
4748 ID(mov
); W(); DR(AX
); SM(None
, SADDR
);
4754 /** 1010 1110 movw %0, %s1 */
4757 printf ("\033[33m%s\033[0m %02x\n",
4758 "/** 1010 1110 movw %0, %s1 */",
4761 SYNTAX("movw %0, %s1");
4762 #line 858 "rl78-decode.opc"
4763 ID(mov
); W(); DR(AX
); SM(None
, SFR
);
4769 /** 1010 1111 movw %0, %e!1 */
4772 printf ("\033[33m%s\033[0m %02x\n",
4773 "/** 1010 1111 movw %0, %e!1 */",
4776 SYNTAX("movw %0, %e!1");
4777 #line 809 "rl78-decode.opc"
4778 ID(mov
); W(); DR(AX
); SM(None
, IMMU(2));
4785 /** 1011 0000 dec %e!0 */
4788 printf ("\033[33m%s\033[0m %02x\n",
4789 "/** 1011 0000 dec %e!0 */",
4793 #line 526 "rl78-decode.opc"
4794 ID(sub
); DM(None
, IMMU(2)); SC(1); Fza
;
4803 /** 1011 0rg1 decw %0 */
4804 #line 546 "rl78-decode.opc"
4805 int rg AU
= (op
[0] >> 1) & 0x03;
4808 printf ("\033[33m%s\033[0m %02x\n",
4809 "/** 1011 0rg1 decw %0 */",
4811 printf (" rg = 0x%x\n", rg
);
4814 #line 546 "rl78-decode.opc"
4815 ID(sub
); W(); DRW(rg
); SC(1);
4821 /** 1011 0010 decw %e!0 */
4824 printf ("\033[33m%s\033[0m %02x\n",
4825 "/** 1011 0010 decw %e!0 */",
4828 SYNTAX("decw %e!0");
4829 #line 540 "rl78-decode.opc"
4830 ID(sub
); W(); DM(None
, IMMU(2)); SC(1);
4836 /** 1011 0100 dec %0 */
4839 printf ("\033[33m%s\033[0m %02x\n",
4840 "/** 1011 0100 dec %0 */",
4844 #line 535 "rl78-decode.opc"
4845 ID(sub
); DM(None
, SADDR
); SC(1); Fza
;
4847 /*----------------------------------------------------------------------*/
4853 /** 1011 0110 decw %0 */
4856 printf ("\033[33m%s\033[0m %02x\n",
4857 "/** 1011 0110 decw %0 */",
4861 #line 549 "rl78-decode.opc"
4862 ID(sub
); W(); DM(None
, SADDR
); SC(1);
4864 /*----------------------------------------------------------------------*/
4870 /** 1011 1000 movw %0, %1 */
4873 printf ("\033[33m%s\033[0m %02x\n",
4874 "/** 1011 1000 movw %0, %1 */",
4877 SYNTAX("movw %0, %1");
4878 #line 806 "rl78-decode.opc"
4879 ID(mov
); W(); DM(SP
, IMMU(1)); SR(AX
);
4885 /** 1011 1001 movw %e0, %1 */
4888 printf ("\033[33m%s\033[0m %02x\n",
4889 "/** 1011 1001 movw %e0, %1 */",
4892 SYNTAX("movw %e0, %1");
4893 #line 794 "rl78-decode.opc"
4894 ID(mov
); W(); DM(DE
, 0); SR(AX
);
4900 /** 1011 1010 movw %e0, %1 */
4903 printf ("\033[33m%s\033[0m %02x\n",
4904 "/** 1011 1010 movw %e0, %1 */",
4907 SYNTAX("movw %e0, %1");
4908 #line 797 "rl78-decode.opc"
4909 ID(mov
); W(); DM(DE
, IMMU(1)); SR(AX
);
4915 /** 1011 1011 movw %e0, %1 */
4918 printf ("\033[33m%s\033[0m %02x\n",
4919 "/** 1011 1011 movw %e0, %1 */",
4922 SYNTAX("movw %e0, %1");
4923 #line 800 "rl78-decode.opc"
4924 ID(mov
); W(); DM(HL
, 0); SR(AX
);
4930 /** 1011 1100 movw %e0, %1 */
4933 printf ("\033[33m%s\033[0m %02x\n",
4934 "/** 1011 1100 movw %e0, %1 */",
4937 SYNTAX("movw %e0, %1");
4938 #line 803 "rl78-decode.opc"
4939 ID(mov
); W(); DM(HL
, IMMU(1)); SR(AX
);
4945 /** 1011 1101 movw %0, %1 */
4948 printf ("\033[33m%s\033[0m %02x\n",
4949 "/** 1011 1101 movw %0, %1 */",
4952 SYNTAX("movw %0, %1");
4953 #line 870 "rl78-decode.opc"
4954 ID(mov
); W(); DM(None
, SADDR
); SR(AX
);
4960 /** 1011 1110 movw %0, %1 */
4963 printf ("\033[33m%s\033[0m %02x\n",
4964 "/** 1011 1110 movw %0, %1 */",
4967 SYNTAX("movw %0, %1");
4968 #line 876 "rl78-decode.opc"
4969 ID(mov
); W(); DM(None
, SFR
); SR(AX
);
4971 /*----------------------------------------------------------------------*/
4977 /** 1011 1111 movw %e!0, %1 */
4980 printf ("\033[33m%s\033[0m %02x\n",
4981 "/** 1011 1111 movw %e!0, %1 */",
4984 SYNTAX("movw %e!0, %1");
4985 #line 791 "rl78-decode.opc"
4986 ID(mov
); W(); DM(None
, IMMU(2)); SR(AX
);
4995 /** 1100 0rg0 pop %0 */
4996 #line 961 "rl78-decode.opc"
4997 int rg AU
= (op
[0] >> 1) & 0x03;
5000 printf ("\033[33m%s\033[0m %02x\n",
5001 "/** 1100 0rg0 pop %0 */",
5003 printf (" rg = 0x%x\n", rg
);
5006 #line 961 "rl78-decode.opc"
5007 ID(mov
); W(); DRW(rg
); SPOP();
5016 /** 1100 0rg1 push %1 */
5017 #line 969 "rl78-decode.opc"
5018 int rg AU
= (op
[0] >> 1) & 0x03;
5021 printf ("\033[33m%s\033[0m %02x\n",
5022 "/** 1100 0rg1 push %1 */",
5024 printf (" rg = 0x%x\n", rg
);
5027 #line 969 "rl78-decode.opc"
5028 ID(mov
); W(); DPUSH(); SRW(rg
);
5034 /** 1100 1000 mov %0, #%1 */
5037 printf ("\033[33m%s\033[0m %02x\n",
5038 "/** 1100 1000 mov %0, #%1 */",
5041 SYNTAX("mov %0, #%1");
5042 #line 617 "rl78-decode.opc"
5043 ID(mov
); DM(SP
, IMMU(1)); SC(IMMU(1));
5049 /** 1100 1001 movw %0, #%1 */
5052 printf ("\033[33m%s\033[0m %02x\n",
5053 "/** 1100 1001 movw %0, #%1 */",
5056 SYNTAX("movw %0, #%1");
5057 #line 867 "rl78-decode.opc"
5058 ID(mov
); W(); DM(None
, SADDR
); SC(IMMU(2));
5064 /** 1100 1010 mov %e0, #%1 */
5067 printf ("\033[33m%s\033[0m %02x\n",
5068 "/** 1100 1010 mov %e0, #%1 */",
5071 SYNTAX("mov %e0, #%1");
5072 #line 596 "rl78-decode.opc"
5073 ID(mov
); DM(DE
, IMMU(1)); SC(IMMU(1));
5079 /** 1100 1011 movw %0, #%1 */
5082 printf ("\033[33m%s\033[0m %02x\n",
5083 "/** 1100 1011 movw %0, #%1 */",
5086 SYNTAX("movw %0, #%1");
5087 #line 873 "rl78-decode.opc"
5088 ID(mov
); W(); DM(None
, SFR
); SC(IMMU(2));
5094 /** 1100 1100 mov %e0, #%1 */
5097 printf ("\033[33m%s\033[0m %02x\n",
5098 "/** 1100 1100 mov %e0, #%1 */",
5101 SYNTAX("mov %e0, #%1");
5102 #line 608 "rl78-decode.opc"
5103 ID(mov
); DM(HL
, IMMU(1)); SC(IMMU(1));
5109 /** 1100 1101 mov %0, #%1 */
5112 printf ("\033[33m%s\033[0m %02x\n",
5113 "/** 1100 1101 mov %0, #%1 */",
5116 SYNTAX("mov %0, #%1");
5117 #line 722 "rl78-decode.opc"
5118 ID(mov
); DM(None
, SADDR
); SC(IMMU(1));
5124 /** 1100 1110 mov %s0, #%1 */
5127 printf ("\033[33m%s\033[0m %02x\n",
5128 "/** 1100 1110 mov %s0, #%1 */",
5131 SYNTAX("mov %s0, #%1");
5132 #line 728 "rl78-decode.opc"
5135 ID(mov
); DM(None
, op0
); SC(op1
);
5140 rl78
->syntax
= "mulhu"; ID(mulhu
);
5143 rl78
->syntax
= "mulh"; ID(mulh
);
5146 rl78
->syntax
= "divhu"; ID(divhu
);
5149 rl78
->syntax
= "divwu"; ID(divwu
);
5152 rl78
->syntax
= "machu"; ID(machu
);
5155 rl78
->syntax
= "mach"; ID(mach
);
5163 /** 1100 1111 mov %e!0, #%1 */
5166 printf ("\033[33m%s\033[0m %02x\n",
5167 "/** 1100 1111 mov %e!0, #%1 */",
5170 SYNTAX("mov %e!0, #%1");
5171 #line 587 "rl78-decode.opc"
5172 ID(mov
); DM(None
, IMMU(2)); SC(IMMU(1));
5181 /** 1101 00rg cmp0 %0 */
5182 #line 496 "rl78-decode.opc"
5183 int rg AU
= op
[0] & 0x03;
5186 printf ("\033[33m%s\033[0m %02x\n",
5187 "/** 1101 00rg cmp0 %0 */",
5189 printf (" rg = 0x%x\n", rg
);
5192 #line 496 "rl78-decode.opc"
5193 ID(cmp
); DRB(rg
); SC(0); Fzac
;
5199 /** 1101 0100 cmp0 %0 */
5202 printf ("\033[33m%s\033[0m %02x\n",
5203 "/** 1101 0100 cmp0 %0 */",
5207 #line 499 "rl78-decode.opc"
5208 ID(cmp
); DM(None
, SADDR
); SC(0); Fzac
;
5210 /*----------------------------------------------------------------------*/
5216 /** 1101 0101 cmp0 %e!0 */
5219 printf ("\033[33m%s\033[0m %02x\n",
5220 "/** 1101 0101 cmp0 %e!0 */",
5223 SYNTAX("cmp0 %e!0");
5224 #line 493 "rl78-decode.opc"
5225 ID(cmp
); DM(None
, IMMU(2)); SC(0); Fzac
;
5231 /** 1101 0110 mulu x */
5234 printf ("\033[33m%s\033[0m %02x\n",
5235 "/** 1101 0110 mulu x */",
5239 #line 881 "rl78-decode.opc"
5242 /*----------------------------------------------------------------------*/
5248 /** 1101 0111 ret */
5251 printf ("\033[33m%s\033[0m %02x\n",
5252 "/** 1101 0111 ret */",
5256 #line 977 "rl78-decode.opc"
5263 /** 1101 1000 mov %0, %1 */
5266 printf ("\033[33m%s\033[0m %02x\n",
5267 "/** 1101 1000 mov %0, %1 */",
5270 SYNTAX("mov %0, %1");
5271 #line 689 "rl78-decode.opc"
5272 ID(mov
); DR(X
); SM(None
, SADDR
);
5278 /** 1101 1001 mov %0, %e!1 */
5281 printf ("\033[33m%s\033[0m %02x\n",
5282 "/** 1101 1001 mov %0, %e!1 */",
5285 SYNTAX("mov %0, %e!1");
5286 #line 686 "rl78-decode.opc"
5287 ID(mov
); DR(X
); SM(None
, IMMU(2));
5295 /** 11ra 1010 movw %0, %1 */
5296 #line 864 "rl78-decode.opc"
5297 int ra AU
= (op
[0] >> 4) & 0x03;
5300 printf ("\033[33m%s\033[0m %02x\n",
5301 "/** 11ra 1010 movw %0, %1 */",
5303 printf (" ra = 0x%x\n", ra
);
5305 SYNTAX("movw %0, %1");
5306 #line 864 "rl78-decode.opc"
5307 ID(mov
); W(); DRW(ra
); SM(None
, SADDR
);
5315 /** 11ra 1011 movw %0, %e!1 */
5316 #line 861 "rl78-decode.opc"
5317 int ra AU
= (op
[0] >> 4) & 0x03;
5320 printf ("\033[33m%s\033[0m %02x\n",
5321 "/** 11ra 1011 movw %0, %e!1 */",
5323 printf (" ra = 0x%x\n", ra
);
5325 SYNTAX("movw %0, %e!1");
5326 #line 861 "rl78-decode.opc"
5327 ID(mov
); W(); DRW(ra
); SM(None
, IMMU(2));
5333 /** 1101 1100 bc $%a0 */
5336 printf ("\033[33m%s\033[0m %02x\n",
5337 "/** 1101 1100 bc $%a0 */",
5341 #line 312 "rl78-decode.opc"
5342 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(C
);
5348 /** 1101 1101 bz $%a0 */
5351 printf ("\033[33m%s\033[0m %02x\n",
5352 "/** 1101 1101 bz $%a0 */",
5356 #line 324 "rl78-decode.opc"
5357 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(Z
);
5363 /** 1101 1110 bnc $%a0 */
5366 printf ("\033[33m%s\033[0m %02x\n",
5367 "/** 1101 1110 bnc $%a0 */",
5371 #line 315 "rl78-decode.opc"
5372 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NC
);
5378 /** 1101 1111 bnz $%a0 */
5381 printf ("\033[33m%s\033[0m %02x\n",
5382 "/** 1101 1111 bnz $%a0 */",
5386 #line 327 "rl78-decode.opc"
5387 ID(branch_cond
); DC(pc
+IMMS(1)+2); SR(None
); COND(NZ
);
5389 /*----------------------------------------------------------------------*/
5398 /** 1110 00rg oneb %0 */
5399 #line 899 "rl78-decode.opc"
5400 int rg AU
= op
[0] & 0x03;
5403 printf ("\033[33m%s\033[0m %02x\n",
5404 "/** 1110 00rg oneb %0 */",
5406 printf (" rg = 0x%x\n", rg
);
5409 #line 899 "rl78-decode.opc"
5410 ID(mov
); DRB(rg
); SC(1);
5416 /** 1110 0100 oneb %0 */
5419 printf ("\033[33m%s\033[0m %02x\n",
5420 "/** 1110 0100 oneb %0 */",
5424 #line 902 "rl78-decode.opc"
5425 ID(mov
); DM(None
, SADDR
); SC(1);
5427 /*----------------------------------------------------------------------*/
5433 /** 1110 0101 oneb %e!0 */
5436 printf ("\033[33m%s\033[0m %02x\n",
5437 "/** 1110 0101 oneb %e!0 */",
5440 SYNTAX("oneb %e!0");
5441 #line 896 "rl78-decode.opc"
5442 ID(mov
); DM(None
, IMMU(2)); SC(1);
5448 /** 1110 0110 onew %0 */
5451 printf ("\033[33m%s\033[0m %02x\n",
5452 "/** 1110 0110 onew %0 */",
5456 #line 907 "rl78-decode.opc"
5457 ID(mov
); DR(AX
); SC(1);
5463 /** 1110 0111 onew %0 */
5466 printf ("\033[33m%s\033[0m %02x\n",
5467 "/** 1110 0111 onew %0 */",
5471 #line 910 "rl78-decode.opc"
5472 ID(mov
); DR(BC
); SC(1);
5474 /*----------------------------------------------------------------------*/
5480 /** 1110 1000 mov %0, %1 */
5483 printf ("\033[33m%s\033[0m %02x\n",
5484 "/** 1110 1000 mov %0, %1 */",
5487 SYNTAX("mov %0, %1");
5488 #line 677 "rl78-decode.opc"
5489 ID(mov
); DR(B
); SM(None
, SADDR
);
5495 /** 1110 1001 mov %0, %e!1 */
5498 printf ("\033[33m%s\033[0m %02x\n",
5499 "/** 1110 1001 mov %0, %e!1 */",
5502 SYNTAX("mov %0, %e!1");
5503 #line 671 "rl78-decode.opc"
5504 ID(mov
); DR(B
); SM(None
, IMMU(2));
5510 /** 1110 1100 br !%!a0 */
5513 printf ("\033[33m%s\033[0m %02x\n",
5514 "/** 1110 1100 br !%!a0 */",
5518 #line 346 "rl78-decode.opc"
5519 ID(branch
); DC(IMMU(3));
5525 /** 1110 1101 br %!a0 */
5528 printf ("\033[33m%s\033[0m %02x\n",
5529 "/** 1110 1101 br %!a0 */",
5533 #line 349 "rl78-decode.opc"
5534 ID(branch
); DC(IMMU(2));
5540 /** 1110 1110 br $%!a0 */
5543 printf ("\033[33m%s\033[0m %02x\n",
5544 "/** 1110 1110 br $%!a0 */",
5548 #line 352 "rl78-decode.opc"
5549 ID(branch
); DC(pc
+IMMS(2)+3);
5555 /** 1110 1111 br $%a0 */
5558 printf ("\033[33m%s\033[0m %02x\n",
5559 "/** 1110 1111 br $%a0 */",
5563 #line 355 "rl78-decode.opc"
5564 ID(branch
); DC(pc
+IMMS(1)+2);
5573 /** 1111 00rg clrb %0 */
5574 #line 442 "rl78-decode.opc"
5575 int rg AU
= op
[0] & 0x03;
5578 printf ("\033[33m%s\033[0m %02x\n",
5579 "/** 1111 00rg clrb %0 */",
5581 printf (" rg = 0x%x\n", rg
);
5584 #line 442 "rl78-decode.opc"
5585 ID(mov
); DRB(rg
); SC(0);
5591 /** 1111 0100 clrb %0 */
5594 printf ("\033[33m%s\033[0m %02x\n",
5595 "/** 1111 0100 clrb %0 */",
5599 #line 445 "rl78-decode.opc"
5600 ID(mov
); DM(None
, SADDR
); SC(0);
5602 /*----------------------------------------------------------------------*/
5608 /** 1111 0101 clrb %e!0 */
5611 printf ("\033[33m%s\033[0m %02x\n",
5612 "/** 1111 0101 clrb %e!0 */",
5615 SYNTAX("clrb %e!0");
5616 #line 439 "rl78-decode.opc"
5617 ID(mov
); DM(None
, IMMU(2)); SC(0);
5623 /** 1111 0110 clrw %0 */
5626 printf ("\033[33m%s\033[0m %02x\n",
5627 "/** 1111 0110 clrw %0 */",
5631 #line 450 "rl78-decode.opc"
5632 ID(mov
); DR(AX
); SC(0);
5638 /** 1111 0111 clrw %0 */
5641 printf ("\033[33m%s\033[0m %02x\n",
5642 "/** 1111 0111 clrw %0 */",
5646 #line 453 "rl78-decode.opc"
5647 ID(mov
); DR(BC
); SC(0);
5649 /*----------------------------------------------------------------------*/
5655 /** 1111 1000 mov %0, %1 */
5658 printf ("\033[33m%s\033[0m %02x\n",
5659 "/** 1111 1000 mov %0, %1 */",
5662 SYNTAX("mov %0, %1");
5663 #line 683 "rl78-decode.opc"
5664 ID(mov
); DR(C
); SM(None
, SADDR
);
5670 /** 1111 1001 mov %0, %e!1 */
5673 printf ("\033[33m%s\033[0m %02x\n",
5674 "/** 1111 1001 mov %0, %e!1 */",
5677 SYNTAX("mov %0, %e!1");
5678 #line 680 "rl78-decode.opc"
5679 ID(mov
); DR(C
); SM(None
, IMMU(2));
5685 /** 1111 1100 call !%!a0 */
5688 printf ("\033[33m%s\033[0m %02x\n",
5689 "/** 1111 1100 call !%!a0 */",
5692 SYNTAX("call !%!a0");
5693 #line 399 "rl78-decode.opc"
5694 ID(call
); DC(IMMU(3));
5700 /** 1111 1101 call %!a0 */
5703 printf ("\033[33m%s\033[0m %02x\n",
5704 "/** 1111 1101 call %!a0 */",
5707 SYNTAX("call %!a0");
5708 #line 402 "rl78-decode.opc"
5709 ID(call
); DC(IMMU(2));
5715 /** 1111 1110 call $%!a0 */
5718 printf ("\033[33m%s\033[0m %02x\n",
5719 "/** 1111 1110 call $%!a0 */",
5722 SYNTAX("call $%!a0");
5723 #line 405 "rl78-decode.opc"
5724 ID(call
); DC(pc
+IMMS(2)+3);
5730 /** 1111 1111 brk1 */
5733 printf ("\033[33m%s\033[0m %02x\n",
5734 "/** 1111 1111 brk1 */",
5738 #line 363 "rl78-decode.opc"
5744 #line 1265 "rl78-decode.opc"
5746 return rl78
->n_bytes
;
This page took 0.180906 seconds and 4 git commands to generate.