Fix display of RL78 MOVW instructions that use the stack pointer.
[deliverable/binutils-gdb.git] / opcodes / rl78-decode.c
CommitLineData
99c513f6
DD
1#line 1 "rl78-decode.opc"
2/* -*- c -*- */
6f2750fe 3/* Copyright (C) 2012-2016 Free Software Foundation, Inc.
5bf135a7
NC
4 Contributed by Red Hat.
5 Written by DJ Delorie.
6
7 This file is part of the GNU opcodes library.
8
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)
12 any later version.
13
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.
18
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. */
23
df7b86aa 24#include "sysdep.h"
99c513f6
DD
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
99c513f6
DD
28#include "ansidecl.h"
29#include "opcode/rl78.h"
30
31static int trace = 0;
32
33typedef struct
34{
35 RL78_Opcode_Decoded * rl78;
36 int (* getbyte)(void *);
37 void * ptr;
38 unsigned char * op;
39} LocalData;
40
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 )
50
51#define W() rl78->size = RL78_Word
52
53#define AU ATTRIBUTE_UNUSED
54#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
55#define B ((unsigned long) GETBYTE())
56
57#define SYNTAX(x) rl78->syntax = x
58
59#define UNSUPPORTED() \
60 rl78->syntax = "*unknown*"
61
62#define RB(x) ((x)+RL78_Reg_X)
63#define RW(x) ((x)+RL78_Reg_AX)
64
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
72
73#define IMMU(bytes) immediate (bytes, 0, ld)
74#define IMMS(bytes) immediate (bytes, 1, ld)
75
76static int
77immediate (int bytes, int sign_extend, LocalData * ld)
78{
79 unsigned long i = 0;
80
81 switch (bytes)
82 {
83 case 1:
84 i |= B;
85 if (sign_extend && (i & 0x80))
86 i -= 0x100;
87 break;
88 case 2:
89 i |= B;
90 i |= B << 8;
91 if (sign_extend && (i & 0x8000))
92 i -= 0x10000;
93 break;
94 case 3:
95 i |= B;
96 i |= B << 8;
97 i |= B << 16;
98 if (sign_extend && (i & 0x800000))
99 i -= 0x1000000;
100 break;
101 default:
102 fprintf (stderr, "Programmer error: immediate() called with invalid byte count %d\n", bytes);
103 abort();
104 }
105 return i;
106}
107
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);
118
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);
130
131static void
132set_bit (RL78_Opcode_Operand *op, int bit)
133{
134 op->bit_number = bit;
135 switch (op->type) {
136 case RL78_Operand_Register:
137 op->type = RL78_Operand_Bit;
138 break;
139 case RL78_Operand_Indirect:
140 op->type = RL78_Operand_BitIndirect;
141 break;
142 default:
143 break;
144 }
145}
146
147static int
148saddr (int x)
149{
150 if (x < 0x20)
151 return 0xfff00 + x;
152 return 0xffe00 + x;
153}
154
155static int
156sfr (int x)
157{
158 return 0xfff00 + x;
159}
160
161#define SADDR saddr (IMMU (1))
162#define SFR sfr (IMMU (1))
163
164int
165rl78_decode_opcode (unsigned long pc AU,
166 RL78_Opcode_Decoded * rl78,
167 int (* getbyte)(void *),
0952813b
DD
168 void * ptr,
169 RL78_Dis_Isa isa)
99c513f6
DD
170{
171 LocalData lds, * ld = &lds;
172 unsigned char op_buf[20] = {0};
173 unsigned char *op = op_buf;
174 int op0, op1;
175
176 lds.rl78 = rl78;
177 lds.getbyte = getbyte;
178 lds.ptr = ptr;
179 lds.op = op;
180
181 memset (rl78, 0, sizeof (*rl78));
182
183 start_again:
184
185/* Byte registers, not including A. */
186/* Word registers, not including AX. */
187
188/*----------------------------------------------------------------------*/
189/* ES: prefix */
190
191 GETBYTE ();
192 switch (op[0] & 0xff)
193 {
194 case 0x00:
195 {
196 /** 0000 0000 nop */
197 if (trace)
198 {
199 printf ("\033[33m%s\033[0m %02x\n",
200 "/** 0000 0000 nop */",
201 op[0]);
202 }
203 SYNTAX("nop");
1eac08cc 204#line 911 "rl78-decode.opc"
99c513f6 205 ID(nop);
43e65147 206
99c513f6 207 /*----------------------------------------------------------------------*/
43e65147 208
99c513f6
DD
209 }
210 break;
211 case 0x01:
212 case 0x03:
213 case 0x05:
214 case 0x07:
215 {
216 /** 0000 0rw1 addw %0, %1 */
0952813b 217#line 274 "rl78-decode.opc"
99c513f6
DD
218 int rw AU = (op[0] >> 1) & 0x03;
219 if (trace)
220 {
221 printf ("\033[33m%s\033[0m %02x\n",
222 "/** 0000 0rw1 addw %0, %1 */",
223 op[0]);
224 printf (" rw = 0x%x\n", rw);
225 }
226 SYNTAX("addw %0, %1");
0952813b 227#line 274 "rl78-decode.opc"
99c513f6 228 ID(add); W(); DR(AX); SRW(rw); Fzac;
43e65147 229
99c513f6
DD
230 }
231 break;
232 case 0x02:
233 {
1d43092d 234 /** 0000 0010 addw %0, %e!1 */
99c513f6
DD
235 if (trace)
236 {
237 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 238 "/** 0000 0010 addw %0, %e!1 */",
99c513f6
DD
239 op[0]);
240 }
1d43092d 241 SYNTAX("addw %0, %e!1");
0952813b 242#line 265 "rl78-decode.opc"
99c513f6 243 ID(add); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 244
99c513f6
DD
245 }
246 break;
247 case 0x04:
248 {
249 /** 0000 0100 addw %0, #%1 */
250 if (trace)
251 {
252 printf ("\033[33m%s\033[0m %02x\n",
253 "/** 0000 0100 addw %0, #%1 */",
254 op[0]);
255 }
256 SYNTAX("addw %0, #%1");
0952813b 257#line 271 "rl78-decode.opc"
99c513f6 258 ID(add); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 259
99c513f6
DD
260 }
261 break;
262 case 0x06:
263 {
264 /** 0000 0110 addw %0, %1 */
265 if (trace)
266 {
267 printf ("\033[33m%s\033[0m %02x\n",
268 "/** 0000 0110 addw %0, %1 */",
269 op[0]);
270 }
271 SYNTAX("addw %0, %1");
0952813b 272#line 277 "rl78-decode.opc"
99c513f6 273 ID(add); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 274
99c513f6
DD
275 }
276 break;
277 case 0x08:
278 {
279 /** 0000 1000 xch a, x */
280 if (trace)
281 {
282 printf ("\033[33m%s\033[0m %02x\n",
283 "/** 0000 1000 xch a, x */",
284 op[0]);
285 }
286 SYNTAX("xch a, x");
1eac08cc 287#line 1234 "rl78-decode.opc"
99c513f6 288 ID(xch); DR(A); SR(X);
43e65147 289
99c513f6 290 /*----------------------------------------------------------------------*/
43e65147 291
99c513f6
DD
292 }
293 break;
294 case 0x09:
295 {
1d43092d 296 /** 0000 1001 mov %0, %e1 */
99c513f6
DD
297 if (trace)
298 {
299 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 300 "/** 0000 1001 mov %0, %e1 */",
99c513f6
DD
301 op[0]);
302 }
1d43092d 303 SYNTAX("mov %0, %e1");
0952813b 304#line 678 "rl78-decode.opc"
99c513f6 305 ID(mov); DR(A); SM(B, IMMU(2));
43e65147 306
99c513f6
DD
307 }
308 break;
309 case 0x0a:
310 {
311 /** 0000 1010 add %0, #%1 */
312 if (trace)
313 {
314 printf ("\033[33m%s\033[0m %02x\n",
315 "/** 0000 1010 add %0, #%1 */",
316 op[0]);
317 }
318 SYNTAX("add %0, #%1");
0952813b 319#line 228 "rl78-decode.opc"
99c513f6 320 ID(add); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 321
99c513f6 322 /*----------------------------------------------------------------------*/
43e65147 323
99c513f6
DD
324 }
325 break;
326 case 0x0b:
327 {
328 /** 0000 1011 add %0, %1 */
329 if (trace)
330 {
331 printf ("\033[33m%s\033[0m %02x\n",
332 "/** 0000 1011 add %0, %1 */",
333 op[0]);
334 }
335 SYNTAX("add %0, %1");
0952813b 336#line 222 "rl78-decode.opc"
99c513f6 337 ID(add); DR(A); SM(None, SADDR); Fzac;
43e65147 338
99c513f6
DD
339 }
340 break;
341 case 0x0c:
342 {
343 /** 0000 1100 add %0, #%1 */
344 if (trace)
345 {
346 printf ("\033[33m%s\033[0m %02x\n",
347 "/** 0000 1100 add %0, #%1 */",
348 op[0]);
349 }
350 SYNTAX("add %0, #%1");
0952813b 351#line 216 "rl78-decode.opc"
99c513f6 352 ID(add); DR(A); SC(IMMU(1)); Fzac;
43e65147 353
99c513f6
DD
354 }
355 break;
356 case 0x0d:
357 {
1d43092d 358 /** 0000 1101 add %0, %e1 */
99c513f6
DD
359 if (trace)
360 {
361 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 362 "/** 0000 1101 add %0, %e1 */",
99c513f6
DD
363 op[0]);
364 }
1d43092d 365 SYNTAX("add %0, %e1");
0952813b 366#line 204 "rl78-decode.opc"
99c513f6 367 ID(add); DR(A); SM(HL, 0); Fzac;
43e65147 368
99c513f6
DD
369 }
370 break;
371 case 0x0e:
372 {
90092e73 373 /** 0000 1110 add %0, %ea1 */
99c513f6
DD
374 if (trace)
375 {
376 printf ("\033[33m%s\033[0m %02x\n",
90092e73 377 "/** 0000 1110 add %0, %ea1 */",
99c513f6
DD
378 op[0]);
379 }
90092e73 380 SYNTAX("add %0, %ea1");
0952813b 381#line 210 "rl78-decode.opc"
99c513f6 382 ID(add); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 383
99c513f6
DD
384 }
385 break;
386 case 0x0f:
387 {
1d43092d 388 /** 0000 1111 add %0, %e!1 */
99c513f6
DD
389 if (trace)
390 {
391 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 392 "/** 0000 1111 add %0, %e!1 */",
99c513f6
DD
393 op[0]);
394 }
1d43092d 395 SYNTAX("add %0, %e!1");
0952813b 396#line 201 "rl78-decode.opc"
99c513f6 397 ID(add); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 398
99c513f6
DD
399 }
400 break;
401 case 0x10:
402 {
403 /** 0001 0000 addw %0, #%1 */
404 if (trace)
405 {
406 printf ("\033[33m%s\033[0m %02x\n",
407 "/** 0001 0000 addw %0, #%1 */",
408 op[0]);
409 }
410 SYNTAX("addw %0, #%1");
0952813b 411#line 280 "rl78-decode.opc"
99c513f6 412 ID(add); W(); DR(SP); SC(IMMU(1)); Fzac;
43e65147 413
99c513f6 414 /*----------------------------------------------------------------------*/
43e65147 415
99c513f6
DD
416 }
417 break;
418 case 0x11:
419 {
420 /** 0001 0001 es: */
421 if (trace)
422 {
423 printf ("\033[33m%s\033[0m %02x\n",
424 "/** 0001 0001 es: */",
425 op[0]);
426 }
427 SYNTAX("es:");
0952813b 428#line 193 "rl78-decode.opc"
99c513f6
DD
429 DE(); SE();
430 op ++;
431 pc ++;
432 goto start_again;
43e65147 433
99c513f6 434 /*----------------------------------------------------------------------*/
43e65147 435
99c513f6
DD
436 }
437 break;
438 case 0x12:
439 case 0x14:
440 case 0x16:
441 {
442 /** 0001 0ra0 movw %0, %1 */
0952813b 443#line 859 "rl78-decode.opc"
99c513f6
DD
444 int ra AU = (op[0] >> 1) & 0x03;
445 if (trace)
446 {
447 printf ("\033[33m%s\033[0m %02x\n",
448 "/** 0001 0ra0 movw %0, %1 */",
449 op[0]);
450 printf (" ra = 0x%x\n", ra);
451 }
452 SYNTAX("movw %0, %1");
0952813b 453#line 859 "rl78-decode.opc"
99c513f6 454 ID(mov); W(); DRW(ra); SR(AX);
43e65147 455
99c513f6
DD
456 }
457 break;
458 case 0x13:
459 case 0x15:
460 case 0x17:
461 {
462 /** 0001 0ra1 movw %0, %1 */
0952813b 463#line 856 "rl78-decode.opc"
99c513f6
DD
464 int ra AU = (op[0] >> 1) & 0x03;
465 if (trace)
466 {
467 printf ("\033[33m%s\033[0m %02x\n",
468 "/** 0001 0ra1 movw %0, %1 */",
469 op[0]);
470 printf (" ra = 0x%x\n", ra);
471 }
472 SYNTAX("movw %0, %1");
0952813b 473#line 856 "rl78-decode.opc"
99c513f6 474 ID(mov); W(); DR(AX); SRW(ra);
43e65147 475
99c513f6
DD
476 }
477 break;
478 case 0x18:
479 {
1d43092d 480 /** 0001 1000 mov %e0, %1 */
99c513f6
DD
481 if (trace)
482 {
483 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 484 "/** 0001 1000 mov %e0, %1 */",
99c513f6
DD
485 op[0]);
486 }
1d43092d 487 SYNTAX("mov %e0, %1");
0952813b 488#line 729 "rl78-decode.opc"
43e65147
L
489 ID(mov); DM(B, IMMU(2)); SR(A);
490
99c513f6
DD
491 }
492 break;
493 case 0x19:
494 {
1d43092d 495 /** 0001 1001 mov %e0, #%1 */
99c513f6
DD
496 if (trace)
497 {
498 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 499 "/** 0001 1001 mov %e0, #%1 */",
99c513f6
DD
500 op[0]);
501 }
1d43092d 502 SYNTAX("mov %e0, #%1");
0952813b 503#line 726 "rl78-decode.opc"
43e65147
L
504 ID(mov); DM(B, IMMU(2)); SC(IMMU(1));
505
99c513f6
DD
506 }
507 break;
508 case 0x1a:
509 {
510 /** 0001 1010 addc %0, #%1 */
511 if (trace)
512 {
513 printf ("\033[33m%s\033[0m %02x\n",
514 "/** 0001 1010 addc %0, #%1 */",
515 op[0]);
516 }
517 SYNTAX("addc %0, #%1");
0952813b 518#line 260 "rl78-decode.opc"
99c513f6 519 ID(addc); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 520
99c513f6 521 /*----------------------------------------------------------------------*/
43e65147 522
99c513f6
DD
523 }
524 break;
525 case 0x1b:
526 {
527 /** 0001 1011 addc %0, %1 */
528 if (trace)
529 {
530 printf ("\033[33m%s\033[0m %02x\n",
531 "/** 0001 1011 addc %0, %1 */",
532 op[0]);
533 }
534 SYNTAX("addc %0, %1");
0952813b 535#line 257 "rl78-decode.opc"
99c513f6 536 ID(addc); DR(A); SM(None, SADDR); Fzac;
43e65147 537
99c513f6
DD
538 }
539 break;
540 case 0x1c:
541 {
542 /** 0001 1100 addc %0, #%1 */
543 if (trace)
544 {
545 printf ("\033[33m%s\033[0m %02x\n",
546 "/** 0001 1100 addc %0, #%1 */",
547 op[0]);
548 }
549 SYNTAX("addc %0, #%1");
0952813b 550#line 248 "rl78-decode.opc"
99c513f6 551 ID(addc); DR(A); SC(IMMU(1)); Fzac;
43e65147 552
99c513f6
DD
553 }
554 break;
555 case 0x1d:
556 {
1d43092d 557 /** 0001 1101 addc %0, %e1 */
99c513f6
DD
558 if (trace)
559 {
560 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 561 "/** 0001 1101 addc %0, %e1 */",
99c513f6
DD
562 op[0]);
563 }
1d43092d 564 SYNTAX("addc %0, %e1");
0952813b 565#line 236 "rl78-decode.opc"
99c513f6 566 ID(addc); DR(A); SM(HL, 0); Fzac;
43e65147 567
99c513f6
DD
568 }
569 break;
570 case 0x1e:
571 {
0952813b 572 /** 0001 1110 addc %0, %ea1 */
99c513f6
DD
573 if (trace)
574 {
575 printf ("\033[33m%s\033[0m %02x\n",
0952813b 576 "/** 0001 1110 addc %0, %ea1 */",
99c513f6
DD
577 op[0]);
578 }
90092e73 579 SYNTAX("addc %0, %ea1");
0952813b 580#line 245 "rl78-decode.opc"
99c513f6 581 ID(addc); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 582
99c513f6
DD
583 }
584 break;
585 case 0x1f:
586 {
1d43092d 587 /** 0001 1111 addc %0, %e!1 */
99c513f6
DD
588 if (trace)
589 {
590 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 591 "/** 0001 1111 addc %0, %e!1 */",
99c513f6
DD
592 op[0]);
593 }
1d43092d 594 SYNTAX("addc %0, %e!1");
0952813b 595#line 233 "rl78-decode.opc"
99c513f6 596 ID(addc); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 597
99c513f6
DD
598 }
599 break;
600 case 0x20:
601 {
602 /** 0010 0000 subw %0, #%1 */
603 if (trace)
604 {
605 printf ("\033[33m%s\033[0m %02x\n",
606 "/** 0010 0000 subw %0, #%1 */",
607 op[0]);
608 }
609 SYNTAX("subw %0, #%1");
1eac08cc 610#line 1198 "rl78-decode.opc"
99c513f6 611 ID(sub); W(); DR(SP); SC(IMMU(1)); Fzac;
43e65147 612
99c513f6 613 /*----------------------------------------------------------------------*/
43e65147 614
99c513f6
DD
615 }
616 break;
617 case 0x21:
618 case 0x23:
619 case 0x25:
620 case 0x27:
621 {
622 /** 0010 0rw1 subw %0, %1 */
1eac08cc 623#line 1192 "rl78-decode.opc"
99c513f6
DD
624 int rw AU = (op[0] >> 1) & 0x03;
625 if (trace)
626 {
627 printf ("\033[33m%s\033[0m %02x\n",
628 "/** 0010 0rw1 subw %0, %1 */",
629 op[0]);
630 printf (" rw = 0x%x\n", rw);
631 }
632 SYNTAX("subw %0, %1");
1eac08cc 633#line 1192 "rl78-decode.opc"
99c513f6 634 ID(sub); W(); DR(AX); SRW(rw); Fzac;
43e65147 635
99c513f6
DD
636 }
637 break;
638 case 0x22:
639 {
1d43092d 640 /** 0010 0010 subw %0, %e!1 */
99c513f6
DD
641 if (trace)
642 {
643 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 644 "/** 0010 0010 subw %0, %e!1 */",
99c513f6
DD
645 op[0]);
646 }
1d43092d 647 SYNTAX("subw %0, %e!1");
1eac08cc 648#line 1183 "rl78-decode.opc"
99c513f6 649 ID(sub); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 650
99c513f6
DD
651 }
652 break;
653 case 0x24:
654 {
655 /** 0010 0100 subw %0, #%1 */
656 if (trace)
657 {
658 printf ("\033[33m%s\033[0m %02x\n",
659 "/** 0010 0100 subw %0, #%1 */",
660 op[0]);
661 }
662 SYNTAX("subw %0, #%1");
1eac08cc 663#line 1189 "rl78-decode.opc"
99c513f6 664 ID(sub); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 665
99c513f6
DD
666 }
667 break;
668 case 0x26:
669 {
670 /** 0010 0110 subw %0, %1 */
671 if (trace)
672 {
673 printf ("\033[33m%s\033[0m %02x\n",
674 "/** 0010 0110 subw %0, %1 */",
675 op[0]);
676 }
677 SYNTAX("subw %0, %1");
1eac08cc 678#line 1195 "rl78-decode.opc"
99c513f6 679 ID(sub); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 680
99c513f6
DD
681 }
682 break;
683 case 0x28:
684 {
1d43092d 685 /** 0010 1000 mov %e0, %1 */
99c513f6
DD
686 if (trace)
687 {
688 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 689 "/** 0010 1000 mov %e0, %1 */",
99c513f6
DD
690 op[0]);
691 }
1d43092d 692 SYNTAX("mov %e0, %1");
0952813b 693#line 741 "rl78-decode.opc"
99c513f6 694 ID(mov); DM(C, IMMU(2)); SR(A);
43e65147 695
99c513f6
DD
696 }
697 break;
698 case 0x29:
699 {
1d43092d 700 /** 0010 1001 mov %0, %e1 */
99c513f6
DD
701 if (trace)
702 {
703 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 704 "/** 0010 1001 mov %0, %e1 */",
99c513f6
DD
705 op[0]);
706 }
1d43092d 707 SYNTAX("mov %0, %e1");
0952813b 708#line 684 "rl78-decode.opc"
99c513f6 709 ID(mov); DR(A); SM(C, IMMU(2));
43e65147 710
99c513f6
DD
711 }
712 break;
713 case 0x2a:
714 {
715 /** 0010 1010 sub %0, #%1 */
716 if (trace)
717 {
718 printf ("\033[33m%s\033[0m %02x\n",
719 "/** 0010 1010 sub %0, #%1 */",
720 op[0]);
721 }
722 SYNTAX("sub %0, #%1");
1eac08cc 723#line 1146 "rl78-decode.opc"
99c513f6 724 ID(sub); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 725
99c513f6 726 /*----------------------------------------------------------------------*/
43e65147 727
99c513f6
DD
728 }
729 break;
730 case 0x2b:
731 {
732 /** 0010 1011 sub %0, %1 */
733 if (trace)
734 {
735 printf ("\033[33m%s\033[0m %02x\n",
736 "/** 0010 1011 sub %0, %1 */",
737 op[0]);
738 }
739 SYNTAX("sub %0, %1");
1eac08cc 740#line 1140 "rl78-decode.opc"
99c513f6 741 ID(sub); DR(A); SM(None, SADDR); Fzac;
43e65147 742
99c513f6
DD
743 }
744 break;
745 case 0x2c:
746 {
747 /** 0010 1100 sub %0, #%1 */
748 if (trace)
749 {
750 printf ("\033[33m%s\033[0m %02x\n",
751 "/** 0010 1100 sub %0, #%1 */",
752 op[0]);
753 }
754 SYNTAX("sub %0, #%1");
1eac08cc 755#line 1134 "rl78-decode.opc"
99c513f6 756 ID(sub); DR(A); SC(IMMU(1)); Fzac;
43e65147 757
99c513f6
DD
758 }
759 break;
760 case 0x2d:
761 {
1d43092d 762 /** 0010 1101 sub %0, %e1 */
99c513f6
DD
763 if (trace)
764 {
765 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 766 "/** 0010 1101 sub %0, %e1 */",
99c513f6
DD
767 op[0]);
768 }
1d43092d 769 SYNTAX("sub %0, %e1");
1eac08cc 770#line 1122 "rl78-decode.opc"
99c513f6 771 ID(sub); DR(A); SM(HL, 0); Fzac;
43e65147 772
99c513f6
DD
773 }
774 break;
775 case 0x2e:
776 {
0952813b 777 /** 0010 1110 sub %0, %ea1 */
99c513f6
DD
778 if (trace)
779 {
780 printf ("\033[33m%s\033[0m %02x\n",
0952813b 781 "/** 0010 1110 sub %0, %ea1 */",
99c513f6
DD
782 op[0]);
783 }
90092e73 784 SYNTAX("sub %0, %ea1");
1eac08cc 785#line 1128 "rl78-decode.opc"
99c513f6 786 ID(sub); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 787
99c513f6
DD
788 }
789 break;
790 case 0x2f:
791 {
1d43092d 792 /** 0010 1111 sub %0, %e!1 */
99c513f6
DD
793 if (trace)
794 {
795 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 796 "/** 0010 1111 sub %0, %e!1 */",
99c513f6
DD
797 op[0]);
798 }
1d43092d 799 SYNTAX("sub %0, %e!1");
1eac08cc 800#line 1119 "rl78-decode.opc"
99c513f6 801 ID(sub); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 802
99c513f6
DD
803 }
804 break;
805 case 0x30:
806 case 0x32:
807 case 0x34:
808 case 0x36:
809 {
810 /** 0011 0rg0 movw %0, #%1 */
0952813b 811#line 853 "rl78-decode.opc"
99c513f6
DD
812 int rg AU = (op[0] >> 1) & 0x03;
813 if (trace)
814 {
815 printf ("\033[33m%s\033[0m %02x\n",
816 "/** 0011 0rg0 movw %0, #%1 */",
817 op[0]);
818 printf (" rg = 0x%x\n", rg);
819 }
820 SYNTAX("movw %0, #%1");
0952813b 821#line 853 "rl78-decode.opc"
99c513f6 822 ID(mov); W(); DRW(rg); SC(IMMU(2));
43e65147 823
99c513f6
DD
824 }
825 break;
826 case 0x31:
827 GETBYTE ();
828 switch (op[1] & 0x8f)
829 {
830 case 0x00:
831 {
832 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
0952813b 833#line 416 "rl78-decode.opc"
99c513f6
DD
834 int bit AU = (op[1] >> 4) & 0x07;
835 if (trace)
836 {
837 printf ("\033[33m%s\033[0m %02x %02x\n",
838 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
839 op[0], op[1]);
840 printf (" bit = 0x%x\n", bit);
841 }
842 SYNTAX("btclr %s1, $%a0");
0952813b 843#line 416 "rl78-decode.opc"
99c513f6 844 ID(branch_cond_clear); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 845
99c513f6 846 /*----------------------------------------------------------------------*/
43e65147 847
99c513f6
DD
848 }
849 break;
850 case 0x01:
851 {
852 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
0952813b 853#line 410 "rl78-decode.opc"
99c513f6
DD
854 int bit AU = (op[1] >> 4) & 0x07;
855 if (trace)
856 {
857 printf ("\033[33m%s\033[0m %02x %02x\n",
858 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
859 op[0], op[1]);
860 printf (" bit = 0x%x\n", bit);
861 }
862 SYNTAX("btclr %1, $%a0");
0952813b 863#line 410 "rl78-decode.opc"
99c513f6 864 ID(branch_cond_clear); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
43e65147 865
99c513f6
DD
866 }
867 break;
868 case 0x02:
869 {
870 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
0952813b 871#line 402 "rl78-decode.opc"
99c513f6
DD
872 int bit AU = (op[1] >> 4) & 0x07;
873 if (trace)
874 {
875 printf ("\033[33m%s\033[0m %02x %02x\n",
876 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
877 op[0], op[1]);
878 printf (" bit = 0x%x\n", bit);
879 }
880 SYNTAX("bt %s1, $%a0");
0952813b 881#line 402 "rl78-decode.opc"
99c513f6 882 ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 883
99c513f6 884 /*----------------------------------------------------------------------*/
43e65147 885
99c513f6
DD
886 }
887 break;
888 case 0x03:
889 {
890 /** 0011 0001 0bit 0011 bt %1, $%a0 */
0952813b 891#line 396 "rl78-decode.opc"
99c513f6
DD
892 int bit AU = (op[1] >> 4) & 0x07;
893 if (trace)
894 {
895 printf ("\033[33m%s\033[0m %02x %02x\n",
896 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
897 op[0], op[1]);
898 printf (" bit = 0x%x\n", bit);
899 }
900 SYNTAX("bt %1, $%a0");
0952813b 901#line 396 "rl78-decode.opc"
99c513f6 902 ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
43e65147 903
99c513f6
DD
904 }
905 break;
906 case 0x04:
907 {
908 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
0952813b 909#line 363 "rl78-decode.opc"
99c513f6
DD
910 int bit AU = (op[1] >> 4) & 0x07;
911 if (trace)
912 {
913 printf ("\033[33m%s\033[0m %02x %02x\n",
914 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
915 op[0], op[1]);
916 printf (" bit = 0x%x\n", bit);
917 }
918 SYNTAX("bf %s1, $%a0");
0952813b 919#line 363 "rl78-decode.opc"
99c513f6 920 ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
43e65147 921
99c513f6 922 /*----------------------------------------------------------------------*/
43e65147 923
99c513f6
DD
924 }
925 break;
926 case 0x05:
927 {
928 /** 0011 0001 0bit 0101 bf %1, $%a0 */
0952813b 929#line 357 "rl78-decode.opc"
99c513f6
DD
930 int bit AU = (op[1] >> 4) & 0x07;
931 if (trace)
932 {
933 printf ("\033[33m%s\033[0m %02x %02x\n",
934 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
935 op[0], op[1]);
936 printf (" bit = 0x%x\n", bit);
937 }
938 SYNTAX("bf %1, $%a0");
0952813b 939#line 357 "rl78-decode.opc"
99c513f6 940 ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(F);
43e65147 941
99c513f6
DD
942 }
943 break;
944 case 0x07:
945 {
946 /** 0011 0001 0cnt 0111 shl %0, %1 */
1eac08cc 947#line 1075 "rl78-decode.opc"
99c513f6
DD
948 int cnt AU = (op[1] >> 4) & 0x07;
949 if (trace)
950 {
951 printf ("\033[33m%s\033[0m %02x %02x\n",
952 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
953 op[0], op[1]);
954 printf (" cnt = 0x%x\n", cnt);
955 }
956 SYNTAX("shl %0, %1");
1eac08cc 957#line 1075 "rl78-decode.opc"
99c513f6 958 ID(shl); DR(C); SC(cnt);
43e65147 959
99c513f6
DD
960 }
961 break;
962 case 0x08:
963 {
964 /** 0011 0001 0cnt 1000 shl %0, %1 */
1eac08cc 965#line 1072 "rl78-decode.opc"
99c513f6
DD
966 int cnt AU = (op[1] >> 4) & 0x07;
967 if (trace)
968 {
969 printf ("\033[33m%s\033[0m %02x %02x\n",
970 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
971 op[0], op[1]);
972 printf (" cnt = 0x%x\n", cnt);
973 }
974 SYNTAX("shl %0, %1");
1eac08cc 975#line 1072 "rl78-decode.opc"
99c513f6 976 ID(shl); DR(B); SC(cnt);
43e65147 977
99c513f6
DD
978 }
979 break;
980 case 0x09:
981 {
982 /** 0011 0001 0cnt 1001 shl %0, %1 */
1eac08cc 983#line 1069 "rl78-decode.opc"
99c513f6
DD
984 int cnt AU = (op[1] >> 4) & 0x07;
985 if (trace)
986 {
987 printf ("\033[33m%s\033[0m %02x %02x\n",
988 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
989 op[0], op[1]);
990 printf (" cnt = 0x%x\n", cnt);
991 }
992 SYNTAX("shl %0, %1");
1eac08cc 993#line 1069 "rl78-decode.opc"
99c513f6 994 ID(shl); DR(A); SC(cnt);
43e65147 995
99c513f6
DD
996 }
997 break;
998 case 0x0a:
999 {
1000 /** 0011 0001 0cnt 1010 shr %0, %1 */
1eac08cc 1001#line 1086 "rl78-decode.opc"
99c513f6
DD
1002 int cnt AU = (op[1] >> 4) & 0x07;
1003 if (trace)
1004 {
1005 printf ("\033[33m%s\033[0m %02x %02x\n",
1006 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
1007 op[0], op[1]);
1008 printf (" cnt = 0x%x\n", cnt);
1009 }
1010 SYNTAX("shr %0, %1");
1eac08cc 1011#line 1086 "rl78-decode.opc"
99c513f6 1012 ID(shr); DR(A); SC(cnt);
43e65147 1013
99c513f6
DD
1014 }
1015 break;
1016 case 0x0b:
1017 {
1018 /** 0011 0001 0cnt 1011 sar %0, %1 */
1eac08cc 1019#line 1033 "rl78-decode.opc"
99c513f6
DD
1020 int cnt AU = (op[1] >> 4) & 0x07;
1021 if (trace)
1022 {
1023 printf ("\033[33m%s\033[0m %02x %02x\n",
1024 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1025 op[0], op[1]);
1026 printf (" cnt = 0x%x\n", cnt);
1027 }
1028 SYNTAX("sar %0, %1");
1eac08cc 1029#line 1033 "rl78-decode.opc"
99c513f6 1030 ID(sar); DR(A); SC(cnt);
43e65147 1031
99c513f6
DD
1032 }
1033 break;
1034 case 0x0c:
1035 case 0x8c:
1036 {
1037 /** 0011 0001 wcnt 1100 shlw %0, %1 */
1eac08cc 1038#line 1081 "rl78-decode.opc"
99c513f6
DD
1039 int wcnt AU = (op[1] >> 4) & 0x0f;
1040 if (trace)
1041 {
1042 printf ("\033[33m%s\033[0m %02x %02x\n",
1043 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1044 op[0], op[1]);
1045 printf (" wcnt = 0x%x\n", wcnt);
1046 }
1047 SYNTAX("shlw %0, %1");
1eac08cc 1048#line 1081 "rl78-decode.opc"
99c513f6 1049 ID(shl); W(); DR(BC); SC(wcnt);
43e65147 1050
99c513f6 1051 /*----------------------------------------------------------------------*/
43e65147 1052
99c513f6
DD
1053 }
1054 break;
1055 case 0x0d:
1056 case 0x8d:
1057 {
1058 /** 0011 0001 wcnt 1101 shlw %0, %1 */
1eac08cc 1059#line 1078 "rl78-decode.opc"
99c513f6
DD
1060 int wcnt AU = (op[1] >> 4) & 0x0f;
1061 if (trace)
1062 {
1063 printf ("\033[33m%s\033[0m %02x %02x\n",
1064 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1065 op[0], op[1]);
1066 printf (" wcnt = 0x%x\n", wcnt);
1067 }
1068 SYNTAX("shlw %0, %1");
1eac08cc 1069#line 1078 "rl78-decode.opc"
99c513f6 1070 ID(shl); W(); DR(AX); SC(wcnt);
43e65147 1071
99c513f6
DD
1072 }
1073 break;
1074 case 0x0e:
1075 case 0x8e:
1076 {
1077 /** 0011 0001 wcnt 1110 shrw %0, %1 */
1eac08cc 1078#line 1089 "rl78-decode.opc"
99c513f6
DD
1079 int wcnt AU = (op[1] >> 4) & 0x0f;
1080 if (trace)
1081 {
1082 printf ("\033[33m%s\033[0m %02x %02x\n",
1083 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1084 op[0], op[1]);
1085 printf (" wcnt = 0x%x\n", wcnt);
1086 }
1087 SYNTAX("shrw %0, %1");
1eac08cc 1088#line 1089 "rl78-decode.opc"
99c513f6 1089 ID(shr); W(); DR(AX); SC(wcnt);
43e65147 1090
99c513f6 1091 /*----------------------------------------------------------------------*/
43e65147 1092
99c513f6
DD
1093 }
1094 break;
1095 case 0x0f:
1096 case 0x8f:
1097 {
1098 /** 0011 0001 wcnt 1111 sarw %0, %1 */
1eac08cc 1099#line 1036 "rl78-decode.opc"
99c513f6
DD
1100 int wcnt AU = (op[1] >> 4) & 0x0f;
1101 if (trace)
1102 {
1103 printf ("\033[33m%s\033[0m %02x %02x\n",
1104 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1105 op[0], op[1]);
1106 printf (" wcnt = 0x%x\n", wcnt);
1107 }
1108 SYNTAX("sarw %0, %1");
1eac08cc 1109#line 1036 "rl78-decode.opc"
99c513f6 1110 ID(sar); W(); DR(AX); SC(wcnt);
43e65147 1111
99c513f6 1112 /*----------------------------------------------------------------------*/
43e65147 1113
99c513f6
DD
1114 }
1115 break;
1116 case 0x80:
1117 {
1118 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
0952813b 1119#line 413 "rl78-decode.opc"
99c513f6
DD
1120 int bit AU = (op[1] >> 4) & 0x07;
1121 if (trace)
1122 {
1123 printf ("\033[33m%s\033[0m %02x %02x\n",
1124 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1125 op[0], op[1]);
1126 printf (" bit = 0x%x\n", bit);
1127 }
1128 SYNTAX("btclr %s1, $%a0");
0952813b 1129#line 413 "rl78-decode.opc"
99c513f6 1130 ID(branch_cond_clear); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 1131
99c513f6
DD
1132 }
1133 break;
1134 case 0x81:
1135 {
1d43092d 1136 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
0952813b 1137#line 407 "rl78-decode.opc"
99c513f6
DD
1138 int bit AU = (op[1] >> 4) & 0x07;
1139 if (trace)
1140 {
1141 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1142 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
99c513f6
DD
1143 op[0], op[1]);
1144 printf (" bit = 0x%x\n", bit);
1145 }
1d43092d 1146 SYNTAX("btclr %e1, $%a0");
0952813b 1147#line 407 "rl78-decode.opc"
99c513f6 1148 ID(branch_cond_clear); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
43e65147 1149
99c513f6
DD
1150 }
1151 break;
1152 case 0x82:
1153 {
1154 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
0952813b 1155#line 399 "rl78-decode.opc"
99c513f6
DD
1156 int bit AU = (op[1] >> 4) & 0x07;
1157 if (trace)
1158 {
1159 printf ("\033[33m%s\033[0m %02x %02x\n",
1160 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1161 op[0], op[1]);
1162 printf (" bit = 0x%x\n", bit);
1163 }
1164 SYNTAX("bt %s1, $%a0");
0952813b 1165#line 399 "rl78-decode.opc"
99c513f6 1166 ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 1167
99c513f6
DD
1168 }
1169 break;
1170 case 0x83:
1171 {
1d43092d 1172 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
0952813b 1173#line 393 "rl78-decode.opc"
99c513f6
DD
1174 int bit AU = (op[1] >> 4) & 0x07;
1175 if (trace)
1176 {
1177 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1178 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
99c513f6
DD
1179 op[0], op[1]);
1180 printf (" bit = 0x%x\n", bit);
1181 }
1d43092d 1182 SYNTAX("bt %e1, $%a0");
0952813b 1183#line 393 "rl78-decode.opc"
99c513f6 1184 ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
43e65147 1185
99c513f6
DD
1186 }
1187 break;
1188 case 0x84:
1189 {
1190 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
0952813b 1191#line 360 "rl78-decode.opc"
99c513f6
DD
1192 int bit AU = (op[1] >> 4) & 0x07;
1193 if (trace)
1194 {
1195 printf ("\033[33m%s\033[0m %02x %02x\n",
1196 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1197 op[0], op[1]);
1198 printf (" bit = 0x%x\n", bit);
1199 }
1200 SYNTAX("bf %s1, $%a0");
0952813b 1201#line 360 "rl78-decode.opc"
99c513f6 1202 ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
43e65147 1203
99c513f6
DD
1204 }
1205 break;
1206 case 0x85:
1207 {
1d43092d 1208 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
0952813b 1209#line 354 "rl78-decode.opc"
99c513f6
DD
1210 int bit AU = (op[1] >> 4) & 0x07;
1211 if (trace)
1212 {
1213 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1214 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
99c513f6
DD
1215 op[0], op[1]);
1216 printf (" bit = 0x%x\n", bit);
1217 }
1d43092d 1218 SYNTAX("bf %e1, $%a0");
0952813b 1219#line 354 "rl78-decode.opc"
99c513f6 1220 ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(F);
43e65147 1221
99c513f6
DD
1222 }
1223 break;
1224 default: UNSUPPORTED(); break;
1225 }
1226 break;
1227 case 0x33:
1228 case 0x35:
1229 case 0x37:
1230 {
1231 /** 0011 0ra1 xchw %0, %1 */
1eac08cc 1232#line 1239 "rl78-decode.opc"
99c513f6
DD
1233 int ra AU = (op[0] >> 1) & 0x03;
1234 if (trace)
1235 {
1236 printf ("\033[33m%s\033[0m %02x\n",
1237 "/** 0011 0ra1 xchw %0, %1 */",
1238 op[0]);
1239 printf (" ra = 0x%x\n", ra);
1240 }
1241 SYNTAX("xchw %0, %1");
1eac08cc 1242#line 1239 "rl78-decode.opc"
99c513f6 1243 ID(xch); W(); DR(AX); SRW(ra);
43e65147 1244
99c513f6 1245 /*----------------------------------------------------------------------*/
43e65147 1246
99c513f6
DD
1247 }
1248 break;
1249 case 0x38:
1250 {
1d43092d 1251 /** 0011 1000 mov %e0, #%1 */
99c513f6
DD
1252 if (trace)
1253 {
1254 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1255 "/** 0011 1000 mov %e0, #%1 */",
99c513f6
DD
1256 op[0]);
1257 }
1d43092d 1258 SYNTAX("mov %e0, #%1");
0952813b 1259#line 738 "rl78-decode.opc"
43e65147
L
1260 ID(mov); DM(C, IMMU(2)); SC(IMMU(1));
1261
99c513f6
DD
1262 }
1263 break;
1264 case 0x39:
1265 {
1d43092d 1266 /** 0011 1001 mov %e0, #%1 */
99c513f6
DD
1267 if (trace)
1268 {
1269 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1270 "/** 0011 1001 mov %e0, #%1 */",
99c513f6
DD
1271 op[0]);
1272 }
1d43092d 1273 SYNTAX("mov %e0, #%1");
0952813b 1274#line 732 "rl78-decode.opc"
43e65147
L
1275 ID(mov); DM(BC, IMMU(2)); SC(IMMU(1));
1276
99c513f6
DD
1277 }
1278 break;
1279 case 0x3a:
1280 {
1281 /** 0011 1010 subc %0, #%1 */
1282 if (trace)
1283 {
1284 printf ("\033[33m%s\033[0m %02x\n",
1285 "/** 0011 1010 subc %0, #%1 */",
1286 op[0]);
1287 }
1288 SYNTAX("subc %0, #%1");
1eac08cc 1289#line 1178 "rl78-decode.opc"
99c513f6 1290 ID(subc); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 1291
99c513f6 1292 /*----------------------------------------------------------------------*/
43e65147 1293
99c513f6
DD
1294 }
1295 break;
1296 case 0x3b:
1297 {
1298 /** 0011 1011 subc %0, %1 */
1299 if (trace)
1300 {
1301 printf ("\033[33m%s\033[0m %02x\n",
1302 "/** 0011 1011 subc %0, %1 */",
1303 op[0]);
1304 }
1305 SYNTAX("subc %0, %1");
1eac08cc 1306#line 1175 "rl78-decode.opc"
99c513f6 1307 ID(subc); DR(A); SM(None, SADDR); Fzac;
43e65147 1308
99c513f6
DD
1309 }
1310 break;
1311 case 0x3c:
1312 {
1313 /** 0011 1100 subc %0, #%1 */
1314 if (trace)
1315 {
1316 printf ("\033[33m%s\033[0m %02x\n",
1317 "/** 0011 1100 subc %0, #%1 */",
1318 op[0]);
1319 }
1320 SYNTAX("subc %0, #%1");
1eac08cc 1321#line 1166 "rl78-decode.opc"
99c513f6 1322 ID(subc); DR(A); SC(IMMU(1)); Fzac;
43e65147 1323
99c513f6
DD
1324 }
1325 break;
1326 case 0x3d:
1327 {
1d43092d 1328 /** 0011 1101 subc %0, %e1 */
99c513f6
DD
1329 if (trace)
1330 {
1331 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1332 "/** 0011 1101 subc %0, %e1 */",
99c513f6
DD
1333 op[0]);
1334 }
1d43092d 1335 SYNTAX("subc %0, %e1");
1eac08cc 1336#line 1154 "rl78-decode.opc"
99c513f6 1337 ID(subc); DR(A); SM(HL, 0); Fzac;
43e65147 1338
99c513f6
DD
1339 }
1340 break;
1341 case 0x3e:
1342 {
0952813b 1343 /** 0011 1110 subc %0, %ea1 */
99c513f6
DD
1344 if (trace)
1345 {
1346 printf ("\033[33m%s\033[0m %02x\n",
0952813b 1347 "/** 0011 1110 subc %0, %ea1 */",
99c513f6
DD
1348 op[0]);
1349 }
90092e73 1350 SYNTAX("subc %0, %ea1");
1eac08cc 1351#line 1163 "rl78-decode.opc"
99c513f6 1352 ID(subc); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 1353
99c513f6
DD
1354 }
1355 break;
1356 case 0x3f:
1357 {
1d43092d 1358 /** 0011 1111 subc %0, %e!1 */
99c513f6
DD
1359 if (trace)
1360 {
1361 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1362 "/** 0011 1111 subc %0, %e!1 */",
99c513f6
DD
1363 op[0]);
1364 }
1d43092d 1365 SYNTAX("subc %0, %e!1");
1eac08cc 1366#line 1151 "rl78-decode.opc"
99c513f6 1367 ID(subc); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 1368
99c513f6
DD
1369 }
1370 break;
1371 case 0x40:
1372 {
1d43092d 1373 /** 0100 0000 cmp %e!0, #%1 */
99c513f6
DD
1374 if (trace)
1375 {
1376 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1377 "/** 0100 0000 cmp %e!0, #%1 */",
99c513f6
DD
1378 op[0]);
1379 }
1d43092d 1380 SYNTAX("cmp %e!0, #%1");
0952813b 1381#line 480 "rl78-decode.opc"
99c513f6 1382 ID(cmp); DM(None, IMMU(2)); SC(IMMU(1)); Fzac;
43e65147 1383
99c513f6
DD
1384 }
1385 break;
1386 case 0x41:
1387 {
1388 /** 0100 0001 mov %0, #%1 */
1389 if (trace)
1390 {
1391 printf ("\033[33m%s\033[0m %02x\n",
1392 "/** 0100 0001 mov %0, #%1 */",
1393 op[0]);
1394 }
1395 SYNTAX("mov %0, #%1");
0952813b 1396#line 717 "rl78-decode.opc"
43e65147
L
1397 ID(mov); DR(ES); SC(IMMU(1));
1398
99c513f6
DD
1399 }
1400 break;
1401 case 0x42:
1402 {
1d43092d 1403 /** 0100 0010 cmpw %0, %e!1 */
99c513f6
DD
1404 if (trace)
1405 {
1406 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1407 "/** 0100 0010 cmpw %0, %e!1 */",
99c513f6
DD
1408 op[0]);
1409 }
1d43092d 1410 SYNTAX("cmpw %0, %e!1");
0952813b 1411#line 531 "rl78-decode.opc"
99c513f6 1412 ID(cmp); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 1413
99c513f6
DD
1414 }
1415 break;
1416 case 0x43:
1417 case 0x45:
1418 case 0x47:
1419 {
1420 /** 0100 0ra1 cmpw %0, %1 */
0952813b 1421#line 540 "rl78-decode.opc"
99c513f6
DD
1422 int ra AU = (op[0] >> 1) & 0x03;
1423 if (trace)
1424 {
1425 printf ("\033[33m%s\033[0m %02x\n",
1426 "/** 0100 0ra1 cmpw %0, %1 */",
1427 op[0]);
1428 printf (" ra = 0x%x\n", ra);
1429 }
1430 SYNTAX("cmpw %0, %1");
0952813b 1431#line 540 "rl78-decode.opc"
99c513f6 1432 ID(cmp); W(); DR(AX); SRW(ra); Fzac;
43e65147 1433
99c513f6
DD
1434 }
1435 break;
1436 case 0x44:
1437 {
1438 /** 0100 0100 cmpw %0, #%1 */
1439 if (trace)
1440 {
1441 printf ("\033[33m%s\033[0m %02x\n",
1442 "/** 0100 0100 cmpw %0, #%1 */",
1443 op[0]);
1444 }
1445 SYNTAX("cmpw %0, #%1");
0952813b 1446#line 537 "rl78-decode.opc"
99c513f6 1447 ID(cmp); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 1448
99c513f6
DD
1449 }
1450 break;
1451 case 0x46:
1452 {
1453 /** 0100 0110 cmpw %0, %1 */
1454 if (trace)
1455 {
1456 printf ("\033[33m%s\033[0m %02x\n",
1457 "/** 0100 0110 cmpw %0, %1 */",
1458 op[0]);
1459 }
1460 SYNTAX("cmpw %0, %1");
0952813b 1461#line 543 "rl78-decode.opc"
99c513f6 1462 ID(cmp); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 1463
99c513f6 1464 /*----------------------------------------------------------------------*/
43e65147 1465
99c513f6
DD
1466 }
1467 break;
1468 case 0x48:
1469 {
1d43092d 1470 /** 0100 1000 mov %e0, %1 */
99c513f6
DD
1471 if (trace)
1472 {
1473 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1474 "/** 0100 1000 mov %e0, %1 */",
99c513f6
DD
1475 op[0]);
1476 }
1d43092d 1477 SYNTAX("mov %e0, %1");
0952813b 1478#line 735 "rl78-decode.opc"
43e65147
L
1479 ID(mov); DM(BC, IMMU(2)); SR(A);
1480
99c513f6
DD
1481 }
1482 break;
1483 case 0x49:
1484 {
1d43092d 1485 /** 0100 1001 mov %0, %e1 */
99c513f6
DD
1486 if (trace)
1487 {
1488 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1489 "/** 0100 1001 mov %0, %e1 */",
99c513f6
DD
1490 op[0]);
1491 }
1d43092d 1492 SYNTAX("mov %0, %e1");
0952813b 1493#line 681 "rl78-decode.opc"
99c513f6 1494 ID(mov); DR(A); SM(BC, IMMU(2));
43e65147 1495
99c513f6
DD
1496 }
1497 break;
1498 case 0x4a:
1499 {
1500 /** 0100 1010 cmp %0, #%1 */
1501 if (trace)
1502 {
1503 printf ("\033[33m%s\033[0m %02x\n",
1504 "/** 0100 1010 cmp %0, #%1 */",
1505 op[0]);
1506 }
1507 SYNTAX("cmp %0, #%1");
0952813b 1508#line 483 "rl78-decode.opc"
99c513f6 1509 ID(cmp); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 1510
99c513f6
DD
1511 }
1512 break;
1513 case 0x4b:
1514 {
1515 /** 0100 1011 cmp %0, %1 */
1516 if (trace)
1517 {
1518 printf ("\033[33m%s\033[0m %02x\n",
1519 "/** 0100 1011 cmp %0, %1 */",
1520 op[0]);
1521 }
1522 SYNTAX("cmp %0, %1");
0952813b 1523#line 510 "rl78-decode.opc"
99c513f6 1524 ID(cmp); DR(A); SM(None, SADDR); Fzac;
43e65147 1525
99c513f6 1526 /*----------------------------------------------------------------------*/
43e65147 1527
99c513f6
DD
1528 }
1529 break;
1530 case 0x4c:
1531 {
1532 /** 0100 1100 cmp %0, #%1 */
1533 if (trace)
1534 {
1535 printf ("\033[33m%s\033[0m %02x\n",
1536 "/** 0100 1100 cmp %0, #%1 */",
1537 op[0]);
1538 }
1539 SYNTAX("cmp %0, #%1");
0952813b 1540#line 501 "rl78-decode.opc"
99c513f6 1541 ID(cmp); DR(A); SC(IMMU(1)); Fzac;
43e65147 1542
99c513f6
DD
1543 }
1544 break;
1545 case 0x4d:
1546 {
1d43092d 1547 /** 0100 1101 cmp %0, %e1 */
99c513f6
DD
1548 if (trace)
1549 {
1550 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1551 "/** 0100 1101 cmp %0, %e1 */",
99c513f6
DD
1552 op[0]);
1553 }
1d43092d 1554 SYNTAX("cmp %0, %e1");
0952813b 1555#line 489 "rl78-decode.opc"
99c513f6 1556 ID(cmp); DR(A); SM(HL, 0); Fzac;
43e65147 1557
99c513f6
DD
1558 }
1559 break;
1560 case 0x4e:
1561 {
0952813b 1562 /** 0100 1110 cmp %0, %ea1 */
99c513f6
DD
1563 if (trace)
1564 {
1565 printf ("\033[33m%s\033[0m %02x\n",
0952813b 1566 "/** 0100 1110 cmp %0, %ea1 */",
99c513f6
DD
1567 op[0]);
1568 }
90092e73 1569 SYNTAX("cmp %0, %ea1");
0952813b 1570#line 498 "rl78-decode.opc"
99c513f6 1571 ID(cmp); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 1572
99c513f6
DD
1573 }
1574 break;
1575 case 0x4f:
1576 {
1d43092d 1577 /** 0100 1111 cmp %0, %e!1 */
99c513f6
DD
1578 if (trace)
1579 {
1580 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1581 "/** 0100 1111 cmp %0, %e!1 */",
99c513f6
DD
1582 op[0]);
1583 }
1d43092d 1584 SYNTAX("cmp %0, %e!1");
0952813b 1585#line 486 "rl78-decode.opc"
99c513f6 1586 ID(cmp); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 1587
99c513f6
DD
1588 }
1589 break;
1590 case 0x50:
1591 case 0x51:
1592 case 0x52:
1593 case 0x53:
1594 case 0x54:
1595 case 0x55:
1596 case 0x56:
1597 case 0x57:
1598 {
1599 /** 0101 0reg mov %0, #%1 */
0952813b 1600#line 669 "rl78-decode.opc"
99c513f6
DD
1601 int reg AU = op[0] & 0x07;
1602 if (trace)
1603 {
1604 printf ("\033[33m%s\033[0m %02x\n",
1605 "/** 0101 0reg mov %0, #%1 */",
1606 op[0]);
1607 printf (" reg = 0x%x\n", reg);
1608 }
1609 SYNTAX("mov %0, #%1");
0952813b 1610#line 669 "rl78-decode.opc"
99c513f6 1611 ID(mov); DRB(reg); SC(IMMU(1));
43e65147 1612
99c513f6
DD
1613 }
1614 break;
1615 case 0x58:
1616 {
1d43092d 1617 /** 0101 1000 movw %e0, %1 */
99c513f6
DD
1618 if (trace)
1619 {
1620 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1621 "/** 0101 1000 movw %e0, %1 */",
99c513f6
DD
1622 op[0]);
1623 }
1d43092d 1624 SYNTAX("movw %e0, %1");
0952813b 1625#line 871 "rl78-decode.opc"
99c513f6 1626 ID(mov); W(); DM(B, IMMU(2)); SR(AX);
43e65147 1627
99c513f6
DD
1628 }
1629 break;
1630 case 0x59:
1631 {
1d43092d 1632 /** 0101 1001 movw %0, %e1 */
99c513f6
DD
1633 if (trace)
1634 {
1635 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1636 "/** 0101 1001 movw %0, %e1 */",
99c513f6
DD
1637 op[0]);
1638 }
1d43092d 1639 SYNTAX("movw %0, %e1");
0952813b 1640#line 862 "rl78-decode.opc"
99c513f6 1641 ID(mov); W(); DR(AX); SM(B, IMMU(2));
43e65147 1642
99c513f6
DD
1643 }
1644 break;
1645 case 0x5a:
1646 {
1647 /** 0101 1010 and %0, #%1 */
1648 if (trace)
1649 {
1650 printf ("\033[33m%s\033[0m %02x\n",
1651 "/** 0101 1010 and %0, #%1 */",
1652 op[0]);
1653 }
1654 SYNTAX("and %0, #%1");
0952813b 1655#line 312 "rl78-decode.opc"
99c513f6 1656 ID(and); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 1657
99c513f6 1658 /*----------------------------------------------------------------------*/
43e65147 1659
99c513f6
DD
1660 }
1661 break;
1662 case 0x5b:
1663 {
1664 /** 0101 1011 and %0, %1 */
1665 if (trace)
1666 {
1667 printf ("\033[33m%s\033[0m %02x\n",
1668 "/** 0101 1011 and %0, %1 */",
1669 op[0]);
1670 }
1671 SYNTAX("and %0, %1");
0952813b 1672#line 309 "rl78-decode.opc"
99c513f6 1673 ID(and); DR(A); SM(None, SADDR); Fz;
43e65147 1674
99c513f6
DD
1675 }
1676 break;
1677 case 0x5c:
1678 {
1679 /** 0101 1100 and %0, #%1 */
1680 if (trace)
1681 {
1682 printf ("\033[33m%s\033[0m %02x\n",
1683 "/** 0101 1100 and %0, #%1 */",
1684 op[0]);
1685 }
1686 SYNTAX("and %0, #%1");
0952813b 1687#line 300 "rl78-decode.opc"
99c513f6 1688 ID(and); DR(A); SC(IMMU(1)); Fz;
43e65147 1689
99c513f6
DD
1690 }
1691 break;
1692 case 0x5d:
1693 {
1d43092d 1694 /** 0101 1101 and %0, %e1 */
99c513f6
DD
1695 if (trace)
1696 {
1697 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1698 "/** 0101 1101 and %0, %e1 */",
99c513f6
DD
1699 op[0]);
1700 }
1d43092d 1701 SYNTAX("and %0, %e1");
0952813b 1702#line 288 "rl78-decode.opc"
99c513f6 1703 ID(and); DR(A); SM(HL, 0); Fz;
43e65147 1704
99c513f6
DD
1705 }
1706 break;
1707 case 0x5e:
1708 {
90092e73 1709 /** 0101 1110 and %0, %ea1 */
99c513f6
DD
1710 if (trace)
1711 {
1712 printf ("\033[33m%s\033[0m %02x\n",
90092e73 1713 "/** 0101 1110 and %0, %ea1 */",
99c513f6
DD
1714 op[0]);
1715 }
90092e73 1716 SYNTAX("and %0, %ea1");
0952813b 1717#line 294 "rl78-decode.opc"
99c513f6 1718 ID(and); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 1719
99c513f6
DD
1720 }
1721 break;
1722 case 0x5f:
1723 {
1d43092d 1724 /** 0101 1111 and %0, %e!1 */
99c513f6
DD
1725 if (trace)
1726 {
1727 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1728 "/** 0101 1111 and %0, %e!1 */",
99c513f6
DD
1729 op[0]);
1730 }
1d43092d 1731 SYNTAX("and %0, %e!1");
0952813b 1732#line 285 "rl78-decode.opc"
99c513f6 1733 ID(and); DR(A); SM(None, IMMU(2)); Fz;
43e65147 1734
99c513f6
DD
1735 }
1736 break;
1737 case 0x60:
1738 case 0x62:
1739 case 0x63:
1740 case 0x64:
1741 case 0x65:
1742 case 0x66:
1743 case 0x67:
1744 {
1745 /** 0110 0rba mov %0, %1 */
0952813b 1746#line 672 "rl78-decode.opc"
99c513f6
DD
1747 int rba AU = op[0] & 0x07;
1748 if (trace)
1749 {
1750 printf ("\033[33m%s\033[0m %02x\n",
1751 "/** 0110 0rba mov %0, %1 */",
1752 op[0]);
1753 printf (" rba = 0x%x\n", rba);
1754 }
1755 SYNTAX("mov %0, %1");
0952813b 1756#line 672 "rl78-decode.opc"
99c513f6 1757 ID(mov); DR(A); SRB(rba);
43e65147 1758
99c513f6
DD
1759 }
1760 break;
1761 case 0x61:
1762 GETBYTE ();
1763 switch (op[1] & 0xff)
1764 {
1765 case 0x00:
1766 case 0x01:
1767 case 0x02:
1768 case 0x03:
1769 case 0x04:
1770 case 0x05:
1771 case 0x06:
1772 case 0x07:
1773 {
1774 /** 0110 0001 0000 0reg add %0, %1 */
0952813b 1775#line 225 "rl78-decode.opc"
99c513f6
DD
1776 int reg AU = op[1] & 0x07;
1777 if (trace)
1778 {
1779 printf ("\033[33m%s\033[0m %02x %02x\n",
1780 "/** 0110 0001 0000 0reg add %0, %1 */",
1781 op[0], op[1]);
1782 printf (" reg = 0x%x\n", reg);
1783 }
1784 SYNTAX("add %0, %1");
0952813b 1785#line 225 "rl78-decode.opc"
99c513f6 1786 ID(add); DRB(reg); SR(A); Fzac;
43e65147 1787
99c513f6
DD
1788 }
1789 break;
1790 case 0x08:
1791 case 0x0a:
1792 case 0x0b:
1793 case 0x0c:
1794 case 0x0d:
1795 case 0x0e:
1796 case 0x0f:
1797 {
1798 /** 0110 0001 0000 1rba add %0, %1 */
0952813b 1799#line 219 "rl78-decode.opc"
99c513f6
DD
1800 int rba AU = op[1] & 0x07;
1801 if (trace)
1802 {
1803 printf ("\033[33m%s\033[0m %02x %02x\n",
1804 "/** 0110 0001 0000 1rba add %0, %1 */",
1805 op[0], op[1]);
1806 printf (" rba = 0x%x\n", rba);
1807 }
1808 SYNTAX("add %0, %1");
0952813b 1809#line 219 "rl78-decode.opc"
99c513f6 1810 ID(add); DR(A); SRB(rba); Fzac;
43e65147 1811
99c513f6
DD
1812 }
1813 break;
1814 case 0x09:
1815 {
90092e73 1816 /** 0110 0001 0000 1001 addw %0, %ea1 */
99c513f6
DD
1817 if (trace)
1818 {
1819 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 1820 "/** 0110 0001 0000 1001 addw %0, %ea1 */",
99c513f6
DD
1821 op[0], op[1]);
1822 }
90092e73 1823 SYNTAX("addw %0, %ea1");
0952813b 1824#line 268 "rl78-decode.opc"
99c513f6 1825 ID(add); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 1826
99c513f6
DD
1827 }
1828 break;
1829 case 0x10:
1830 case 0x11:
1831 case 0x12:
1832 case 0x13:
1833 case 0x14:
1834 case 0x15:
1835 case 0x16:
1836 case 0x17:
1837 {
1838 /** 0110 0001 0001 0reg addc %0, %1 */
0952813b 1839#line 254 "rl78-decode.opc"
99c513f6
DD
1840 int reg AU = op[1] & 0x07;
1841 if (trace)
1842 {
1843 printf ("\033[33m%s\033[0m %02x %02x\n",
1844 "/** 0110 0001 0001 0reg addc %0, %1 */",
1845 op[0], op[1]);
1846 printf (" reg = 0x%x\n", reg);
1847 }
1848 SYNTAX("addc %0, %1");
0952813b 1849#line 254 "rl78-decode.opc"
99c513f6 1850 ID(addc); DRB(reg); SR(A); Fzac;
43e65147 1851
99c513f6
DD
1852 }
1853 break;
1854 case 0x18:
1855 case 0x1a:
1856 case 0x1b:
1857 case 0x1c:
1858 case 0x1d:
1859 case 0x1e:
1860 case 0x1f:
1861 {
1862 /** 0110 0001 0001 1rba addc %0, %1 */
0952813b 1863#line 251 "rl78-decode.opc"
99c513f6
DD
1864 int rba AU = op[1] & 0x07;
1865 if (trace)
1866 {
1867 printf ("\033[33m%s\033[0m %02x %02x\n",
1868 "/** 0110 0001 0001 1rba addc %0, %1 */",
1869 op[0], op[1]);
1870 printf (" rba = 0x%x\n", rba);
1871 }
1872 SYNTAX("addc %0, %1");
0952813b 1873#line 251 "rl78-decode.opc"
99c513f6 1874 ID(addc); DR(A); SRB(rba); Fzac;
43e65147 1875
99c513f6
DD
1876 }
1877 break;
1878 case 0x20:
1879 case 0x21:
1880 case 0x22:
1881 case 0x23:
1882 case 0x24:
1883 case 0x25:
1884 case 0x26:
1885 case 0x27:
1886 {
1887 /** 0110 0001 0010 0reg sub %0, %1 */
1eac08cc 1888#line 1143 "rl78-decode.opc"
99c513f6
DD
1889 int reg AU = op[1] & 0x07;
1890 if (trace)
1891 {
1892 printf ("\033[33m%s\033[0m %02x %02x\n",
1893 "/** 0110 0001 0010 0reg sub %0, %1 */",
1894 op[0], op[1]);
1895 printf (" reg = 0x%x\n", reg);
1896 }
1897 SYNTAX("sub %0, %1");
1eac08cc 1898#line 1143 "rl78-decode.opc"
99c513f6 1899 ID(sub); DRB(reg); SR(A); Fzac;
43e65147 1900
99c513f6
DD
1901 }
1902 break;
1903 case 0x28:
1904 case 0x2a:
1905 case 0x2b:
1906 case 0x2c:
1907 case 0x2d:
1908 case 0x2e:
1909 case 0x2f:
1910 {
1911 /** 0110 0001 0010 1rba sub %0, %1 */
1eac08cc 1912#line 1137 "rl78-decode.opc"
99c513f6
DD
1913 int rba AU = op[1] & 0x07;
1914 if (trace)
1915 {
1916 printf ("\033[33m%s\033[0m %02x %02x\n",
1917 "/** 0110 0001 0010 1rba sub %0, %1 */",
1918 op[0], op[1]);
1919 printf (" rba = 0x%x\n", rba);
1920 }
1921 SYNTAX("sub %0, %1");
1eac08cc 1922#line 1137 "rl78-decode.opc"
99c513f6 1923 ID(sub); DR(A); SRB(rba); Fzac;
43e65147 1924
99c513f6
DD
1925 }
1926 break;
1927 case 0x29:
1928 {
0952813b 1929 /** 0110 0001 0010 1001 subw %0, %ea1 */
99c513f6
DD
1930 if (trace)
1931 {
1932 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 1933 "/** 0110 0001 0010 1001 subw %0, %ea1 */",
99c513f6
DD
1934 op[0], op[1]);
1935 }
90092e73 1936 SYNTAX("subw %0, %ea1");
1eac08cc 1937#line 1186 "rl78-decode.opc"
99c513f6 1938 ID(sub); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 1939
99c513f6
DD
1940 }
1941 break;
1942 case 0x30:
1943 case 0x31:
1944 case 0x32:
1945 case 0x33:
1946 case 0x34:
1947 case 0x35:
1948 case 0x36:
1949 case 0x37:
1950 {
1951 /** 0110 0001 0011 0reg subc %0, %1 */
1eac08cc 1952#line 1172 "rl78-decode.opc"
99c513f6
DD
1953 int reg AU = op[1] & 0x07;
1954 if (trace)
1955 {
1956 printf ("\033[33m%s\033[0m %02x %02x\n",
1957 "/** 0110 0001 0011 0reg subc %0, %1 */",
1958 op[0], op[1]);
1959 printf (" reg = 0x%x\n", reg);
1960 }
1961 SYNTAX("subc %0, %1");
1eac08cc 1962#line 1172 "rl78-decode.opc"
99c513f6 1963 ID(subc); DRB(reg); SR(A); Fzac;
43e65147 1964
99c513f6
DD
1965 }
1966 break;
1967 case 0x38:
1968 case 0x3a:
1969 case 0x3b:
1970 case 0x3c:
1971 case 0x3d:
1972 case 0x3e:
1973 case 0x3f:
1974 {
1975 /** 0110 0001 0011 1rba subc %0, %1 */
1eac08cc 1976#line 1169 "rl78-decode.opc"
99c513f6
DD
1977 int rba AU = op[1] & 0x07;
1978 if (trace)
1979 {
1980 printf ("\033[33m%s\033[0m %02x %02x\n",
1981 "/** 0110 0001 0011 1rba subc %0, %1 */",
1982 op[0], op[1]);
1983 printf (" rba = 0x%x\n", rba);
1984 }
1985 SYNTAX("subc %0, %1");
1eac08cc 1986#line 1169 "rl78-decode.opc"
99c513f6 1987 ID(subc); DR(A); SRB(rba); Fzac;
43e65147 1988
99c513f6
DD
1989 }
1990 break;
1991 case 0x40:
1992 case 0x41:
1993 case 0x42:
1994 case 0x43:
1995 case 0x44:
1996 case 0x45:
1997 case 0x46:
1998 case 0x47:
1999 {
2000 /** 0110 0001 0100 0reg cmp %0, %1 */
0952813b 2001#line 507 "rl78-decode.opc"
99c513f6
DD
2002 int reg AU = op[1] & 0x07;
2003 if (trace)
2004 {
2005 printf ("\033[33m%s\033[0m %02x %02x\n",
2006 "/** 0110 0001 0100 0reg cmp %0, %1 */",
2007 op[0], op[1]);
2008 printf (" reg = 0x%x\n", reg);
2009 }
2010 SYNTAX("cmp %0, %1");
0952813b 2011#line 507 "rl78-decode.opc"
99c513f6 2012 ID(cmp); DRB(reg); SR(A); Fzac;
43e65147 2013
99c513f6
DD
2014 }
2015 break;
2016 case 0x48:
2017 case 0x4a:
2018 case 0x4b:
2019 case 0x4c:
2020 case 0x4d:
2021 case 0x4e:
2022 case 0x4f:
2023 {
2024 /** 0110 0001 0100 1rba cmp %0, %1 */
0952813b 2025#line 504 "rl78-decode.opc"
99c513f6
DD
2026 int rba AU = op[1] & 0x07;
2027 if (trace)
2028 {
2029 printf ("\033[33m%s\033[0m %02x %02x\n",
2030 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2031 op[0], op[1]);
2032 printf (" rba = 0x%x\n", rba);
2033 }
2034 SYNTAX("cmp %0, %1");
0952813b 2035#line 504 "rl78-decode.opc"
99c513f6 2036 ID(cmp); DR(A); SRB(rba); Fzac;
43e65147 2037
99c513f6
DD
2038 }
2039 break;
2040 case 0x49:
2041 {
0952813b 2042 /** 0110 0001 0100 1001 cmpw %0, %ea1 */
99c513f6
DD
2043 if (trace)
2044 {
2045 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2046 "/** 0110 0001 0100 1001 cmpw %0, %ea1 */",
99c513f6
DD
2047 op[0], op[1]);
2048 }
90092e73 2049 SYNTAX("cmpw %0, %ea1");
0952813b 2050#line 534 "rl78-decode.opc"
99c513f6 2051 ID(cmp); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 2052
99c513f6
DD
2053 }
2054 break;
2055 case 0x50:
2056 case 0x51:
2057 case 0x52:
2058 case 0x53:
2059 case 0x54:
2060 case 0x55:
2061 case 0x56:
2062 case 0x57:
2063 {
2064 /** 0110 0001 0101 0reg and %0, %1 */
0952813b 2065#line 306 "rl78-decode.opc"
99c513f6
DD
2066 int reg AU = op[1] & 0x07;
2067 if (trace)
2068 {
2069 printf ("\033[33m%s\033[0m %02x %02x\n",
2070 "/** 0110 0001 0101 0reg and %0, %1 */",
2071 op[0], op[1]);
2072 printf (" reg = 0x%x\n", reg);
2073 }
2074 SYNTAX("and %0, %1");
0952813b 2075#line 306 "rl78-decode.opc"
99c513f6 2076 ID(and); DRB(reg); SR(A); Fz;
43e65147 2077
99c513f6
DD
2078 }
2079 break;
2080 case 0x58:
2081 case 0x5a:
2082 case 0x5b:
2083 case 0x5c:
2084 case 0x5d:
2085 case 0x5e:
2086 case 0x5f:
2087 {
2088 /** 0110 0001 0101 1rba and %0, %1 */
0952813b 2089#line 303 "rl78-decode.opc"
99c513f6
DD
2090 int rba AU = op[1] & 0x07;
2091 if (trace)
2092 {
2093 printf ("\033[33m%s\033[0m %02x %02x\n",
2094 "/** 0110 0001 0101 1rba and %0, %1 */",
2095 op[0], op[1]);
2096 printf (" rba = 0x%x\n", rba);
2097 }
2098 SYNTAX("and %0, %1");
0952813b 2099#line 303 "rl78-decode.opc"
99c513f6 2100 ID(and); DR(A); SRB(rba); Fz;
43e65147 2101
99c513f6
DD
2102 }
2103 break;
2104 case 0x59:
2105 {
90092e73 2106 /** 0110 0001 0101 1001 inc %ea0 */
99c513f6
DD
2107 if (trace)
2108 {
2109 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2110 "/** 0110 0001 0101 1001 inc %ea0 */",
99c513f6
DD
2111 op[0], op[1]);
2112 }
90092e73 2113 SYNTAX("inc %ea0");
0952813b 2114#line 584 "rl78-decode.opc"
99c513f6 2115 ID(add); DM(HL, IMMU(1)); SC(1); Fza;
43e65147 2116
99c513f6
DD
2117 }
2118 break;
2119 case 0x60:
2120 case 0x61:
2121 case 0x62:
2122 case 0x63:
2123 case 0x64:
2124 case 0x65:
2125 case 0x66:
2126 case 0x67:
2127 {
2128 /** 0110 0001 0110 0reg or %0, %1 */
1eac08cc 2129#line 961 "rl78-decode.opc"
99c513f6
DD
2130 int reg AU = op[1] & 0x07;
2131 if (trace)
2132 {
2133 printf ("\033[33m%s\033[0m %02x %02x\n",
2134 "/** 0110 0001 0110 0reg or %0, %1 */",
2135 op[0], op[1]);
2136 printf (" reg = 0x%x\n", reg);
2137 }
2138 SYNTAX("or %0, %1");
1eac08cc 2139#line 961 "rl78-decode.opc"
99c513f6 2140 ID(or); DRB(reg); SR(A); Fz;
43e65147 2141
99c513f6
DD
2142 }
2143 break;
2144 case 0x68:
2145 case 0x6a:
2146 case 0x6b:
2147 case 0x6c:
2148 case 0x6d:
2149 case 0x6e:
2150 case 0x6f:
2151 {
2152 /** 0110 0001 0110 1rba or %0, %1 */
1eac08cc 2153#line 958 "rl78-decode.opc"
99c513f6
DD
2154 int rba AU = op[1] & 0x07;
2155 if (trace)
2156 {
2157 printf ("\033[33m%s\033[0m %02x %02x\n",
2158 "/** 0110 0001 0110 1rba or %0, %1 */",
2159 op[0], op[1]);
2160 printf (" rba = 0x%x\n", rba);
2161 }
2162 SYNTAX("or %0, %1");
1eac08cc 2163#line 958 "rl78-decode.opc"
99c513f6 2164 ID(or); DR(A); SRB(rba); Fz;
43e65147 2165
99c513f6
DD
2166 }
2167 break;
2168 case 0x69:
2169 {
90092e73 2170 /** 0110 0001 0110 1001 dec %ea0 */
99c513f6
DD
2171 if (trace)
2172 {
2173 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2174 "/** 0110 0001 0110 1001 dec %ea0 */",
99c513f6
DD
2175 op[0], op[1]);
2176 }
90092e73 2177 SYNTAX("dec %ea0");
0952813b 2178#line 551 "rl78-decode.opc"
99c513f6 2179 ID(sub); DM(HL, IMMU(1)); SC(1); Fza;
43e65147 2180
99c513f6
DD
2181 }
2182 break;
2183 case 0x70:
2184 case 0x71:
2185 case 0x72:
2186 case 0x73:
2187 case 0x74:
2188 case 0x75:
2189 case 0x76:
2190 case 0x77:
2191 {
2192 /** 0110 0001 0111 0reg xor %0, %1 */
1eac08cc 2193#line 1265 "rl78-decode.opc"
99c513f6
DD
2194 int reg AU = op[1] & 0x07;
2195 if (trace)
2196 {
2197 printf ("\033[33m%s\033[0m %02x %02x\n",
2198 "/** 0110 0001 0111 0reg xor %0, %1 */",
2199 op[0], op[1]);
2200 printf (" reg = 0x%x\n", reg);
2201 }
2202 SYNTAX("xor %0, %1");
1eac08cc 2203#line 1265 "rl78-decode.opc"
99c513f6 2204 ID(xor); DRB(reg); SR(A); Fz;
43e65147 2205
99c513f6
DD
2206 }
2207 break;
2208 case 0x78:
2209 case 0x7a:
2210 case 0x7b:
2211 case 0x7c:
2212 case 0x7d:
2213 case 0x7e:
2214 case 0x7f:
2215 {
2216 /** 0110 0001 0111 1rba xor %0, %1 */
1eac08cc 2217#line 1262 "rl78-decode.opc"
99c513f6
DD
2218 int rba AU = op[1] & 0x07;
2219 if (trace)
2220 {
2221 printf ("\033[33m%s\033[0m %02x %02x\n",
2222 "/** 0110 0001 0111 1rba xor %0, %1 */",
2223 op[0], op[1]);
2224 printf (" rba = 0x%x\n", rba);
2225 }
2226 SYNTAX("xor %0, %1");
1eac08cc 2227#line 1262 "rl78-decode.opc"
99c513f6 2228 ID(xor); DR(A); SRB(rba); Fz;
43e65147 2229
99c513f6
DD
2230 }
2231 break;
2232 case 0x79:
2233 {
90092e73 2234 /** 0110 0001 0111 1001 incw %ea0 */
99c513f6
DD
2235 if (trace)
2236 {
2237 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2238 "/** 0110 0001 0111 1001 incw %ea0 */",
99c513f6
DD
2239 op[0], op[1]);
2240 }
90092e73 2241 SYNTAX("incw %ea0");
0952813b 2242#line 598 "rl78-decode.opc"
99c513f6 2243 ID(add); W(); DM(HL, IMMU(1)); SC(1);
43e65147 2244
99c513f6
DD
2245 }
2246 break;
2247 case 0x80:
2248 case 0x81:
2249 {
1d43092d 2250 /** 0110 0001 1000 000 add %0, %e1 */
99c513f6
DD
2251 if (trace)
2252 {
2253 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2254 "/** 0110 0001 1000 000 add %0, %e1 */",
99c513f6
DD
2255 op[0], op[1]);
2256 }
1d43092d 2257 SYNTAX("add %0, %e1");
0952813b 2258#line 207 "rl78-decode.opc"
99c513f6 2259 ID(add); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2260
99c513f6
DD
2261 }
2262 break;
2263 case 0x82:
2264 {
1d43092d 2265 /** 0110 0001 1000 0010 add %0, %e1 */
99c513f6
DD
2266 if (trace)
2267 {
2268 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2269 "/** 0110 0001 1000 0010 add %0, %e1 */",
99c513f6
DD
2270 op[0], op[1]);
2271 }
1d43092d 2272 SYNTAX("add %0, %e1");
0952813b 2273#line 213 "rl78-decode.opc"
99c513f6 2274 ID(add); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2275
99c513f6
DD
2276 }
2277 break;
2278 case 0x84:
2279 case 0x85:
2280 case 0x86:
2281 case 0x87:
2282 case 0x94:
2283 case 0x95:
2284 case 0x96:
2285 case 0x97:
2286 case 0xa4:
2287 case 0xa5:
2288 case 0xa6:
2289 case 0xa7:
2290 case 0xb4:
2291 case 0xb5:
2292 case 0xb6:
2293 case 0xb7:
2294 case 0xc4:
2295 case 0xc5:
2296 case 0xc6:
2297 case 0xc7:
2298 case 0xd4:
2299 case 0xd5:
2300 case 0xd6:
2301 case 0xd7:
2302 case 0xe4:
2303 case 0xe5:
2304 case 0xe6:
2305 case 0xe7:
2306 case 0xf4:
2307 case 0xf5:
2308 case 0xf6:
2309 case 0xf7:
2310 {
2311 /** 0110 0001 1nnn 01mm callt [%x0] */
0952813b 2312#line 433 "rl78-decode.opc"
99c513f6 2313 int nnn AU = (op[1] >> 4) & 0x07;
0952813b 2314#line 433 "rl78-decode.opc"
99c513f6
DD
2315 int mm AU = op[1] & 0x03;
2316 if (trace)
2317 {
2318 printf ("\033[33m%s\033[0m %02x %02x\n",
2319 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2320 op[0], op[1]);
2321 printf (" nnn = 0x%x,", nnn);
2322 printf (" mm = 0x%x\n", mm);
2323 }
2324 SYNTAX("callt [%x0]");
0952813b 2325#line 433 "rl78-decode.opc"
99c513f6 2326 ID(call); DM(None, 0x80 + mm*16 + nnn*2);
43e65147 2327
99c513f6 2328 /*----------------------------------------------------------------------*/
43e65147 2329
99c513f6
DD
2330 }
2331 break;
2332 case 0x88:
2333 case 0x8a:
2334 case 0x8b:
2335 case 0x8c:
2336 case 0x8d:
2337 case 0x8e:
2338 case 0x8f:
2339 {
2340 /** 0110 0001 1000 1reg xch %0, %1 */
1eac08cc 2341#line 1224 "rl78-decode.opc"
99c513f6
DD
2342 int reg AU = op[1] & 0x07;
2343 if (trace)
2344 {
2345 printf ("\033[33m%s\033[0m %02x %02x\n",
2346 "/** 0110 0001 1000 1reg xch %0, %1 */",
2347 op[0], op[1]);
2348 printf (" reg = 0x%x\n", reg);
2349 }
2350 SYNTAX("xch %0, %1");
1eac08cc 2351#line 1224 "rl78-decode.opc"
99c513f6
DD
2352 /* Note: DECW uses reg == X, so this must follow DECW */
2353 ID(xch); DR(A); SRB(reg);
43e65147 2354
99c513f6
DD
2355 }
2356 break;
2357 case 0x89:
2358 {
90092e73 2359 /** 0110 0001 1000 1001 decw %ea0 */
99c513f6
DD
2360 if (trace)
2361 {
2362 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2363 "/** 0110 0001 1000 1001 decw %ea0 */",
99c513f6
DD
2364 op[0], op[1]);
2365 }
90092e73 2366 SYNTAX("decw %ea0");
0952813b 2367#line 565 "rl78-decode.opc"
99c513f6 2368 ID(sub); W(); DM(HL, IMMU(1)); SC(1);
43e65147 2369
99c513f6
DD
2370 }
2371 break;
2372 case 0x90:
2373 {
1d43092d 2374 /** 0110 0001 1001 0000 addc %0, %e1 */
99c513f6
DD
2375 if (trace)
2376 {
2377 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2378 "/** 0110 0001 1001 0000 addc %0, %e1 */",
99c513f6
DD
2379 op[0], op[1]);
2380 }
1d43092d 2381 SYNTAX("addc %0, %e1");
0952813b 2382#line 239 "rl78-decode.opc"
99c513f6 2383 ID(addc); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2384
99c513f6
DD
2385 }
2386 break;
2387 case 0x92:
2388 {
1d43092d 2389 /** 0110 0001 1001 0010 addc %0, %e1 */
99c513f6
DD
2390 if (trace)
2391 {
2392 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2393 "/** 0110 0001 1001 0010 addc %0, %e1 */",
99c513f6
DD
2394 op[0], op[1]);
2395 }
1d43092d 2396 SYNTAX("addc %0, %e1");
0952813b 2397#line 242 "rl78-decode.opc"
99c513f6 2398 ID(addc); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2399
99c513f6
DD
2400 }
2401 break;
2402 case 0xa0:
2403 case 0xa1:
2404 {
1d43092d 2405 /** 0110 0001 1010 000 sub %0, %e1 */
99c513f6
DD
2406 if (trace)
2407 {
2408 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2409 "/** 0110 0001 1010 000 sub %0, %e1 */",
99c513f6
DD
2410 op[0], op[1]);
2411 }
1d43092d 2412 SYNTAX("sub %0, %e1");
1eac08cc 2413#line 1125 "rl78-decode.opc"
99c513f6 2414 ID(sub); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2415
99c513f6
DD
2416 }
2417 break;
2418 case 0xa2:
2419 {
1d43092d 2420 /** 0110 0001 1010 0010 sub %0, %e1 */
99c513f6
DD
2421 if (trace)
2422 {
2423 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2424 "/** 0110 0001 1010 0010 sub %0, %e1 */",
99c513f6
DD
2425 op[0], op[1]);
2426 }
1d43092d 2427 SYNTAX("sub %0, %e1");
1eac08cc 2428#line 1131 "rl78-decode.opc"
99c513f6 2429 ID(sub); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2430
99c513f6
DD
2431 }
2432 break;
2433 case 0xa8:
2434 {
2435 /** 0110 0001 1010 1000 xch %0, %1 */
2436 if (trace)
2437 {
2438 printf ("\033[33m%s\033[0m %02x %02x\n",
2439 "/** 0110 0001 1010 1000 xch %0, %1 */",
2440 op[0], op[1]);
2441 }
2442 SYNTAX("xch %0, %1");
1eac08cc 2443#line 1228 "rl78-decode.opc"
99c513f6 2444 ID(xch); DR(A); SM(None, SADDR);
43e65147 2445
99c513f6
DD
2446 }
2447 break;
2448 case 0xa9:
2449 {
1d43092d 2450 /** 0110 0001 1010 1001 xch %0, %e1 */
99c513f6
DD
2451 if (trace)
2452 {
2453 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2454 "/** 0110 0001 1010 1001 xch %0, %e1 */",
99c513f6
DD
2455 op[0], op[1]);
2456 }
1d43092d 2457 SYNTAX("xch %0, %e1");
1eac08cc 2458#line 1221 "rl78-decode.opc"
99c513f6 2459 ID(xch); DR(A); SM2(HL, C, 0);
43e65147 2460
99c513f6
DD
2461 }
2462 break;
2463 case 0xaa:
2464 {
1d43092d 2465 /** 0110 0001 1010 1010 xch %0, %e!1 */
99c513f6
DD
2466 if (trace)
2467 {
2468 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2469 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
99c513f6
DD
2470 op[0], op[1]);
2471 }
1d43092d 2472 SYNTAX("xch %0, %e!1");
1eac08cc 2473#line 1203 "rl78-decode.opc"
99c513f6 2474 ID(xch); DR(A); SM(None, IMMU(2));
43e65147 2475
99c513f6
DD
2476 }
2477 break;
2478 case 0xab:
2479 {
46662804 2480 /** 0110 0001 1010 1011 xch %0, %s1 */
99c513f6
DD
2481 if (trace)
2482 {
2483 printf ("\033[33m%s\033[0m %02x %02x\n",
1eac08cc 2484 "/** 0110 0001 1010 1011 xch %0, %s1 */",
99c513f6
DD
2485 op[0], op[1]);
2486 }
46662804 2487 SYNTAX("xch %0, %s1");
1eac08cc 2488#line 1231 "rl78-decode.opc"
99c513f6 2489 ID(xch); DR(A); SM(None, SFR);
43e65147 2490
99c513f6
DD
2491 }
2492 break;
2493 case 0xac:
2494 {
1d43092d 2495 /** 0110 0001 1010 1100 xch %0, %e1 */
99c513f6
DD
2496 if (trace)
2497 {
2498 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2499 "/** 0110 0001 1010 1100 xch %0, %e1 */",
99c513f6
DD
2500 op[0], op[1]);
2501 }
1d43092d 2502 SYNTAX("xch %0, %e1");
1eac08cc 2503#line 1212 "rl78-decode.opc"
99c513f6 2504 ID(xch); DR(A); SM(HL, 0);
43e65147 2505
99c513f6
DD
2506 }
2507 break;
2508 case 0xad:
2509 {
0952813b 2510 /** 0110 0001 1010 1101 xch %0, %ea1 */
99c513f6
DD
2511 if (trace)
2512 {
2513 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2514 "/** 0110 0001 1010 1101 xch %0, %ea1 */",
99c513f6
DD
2515 op[0], op[1]);
2516 }
90092e73 2517 SYNTAX("xch %0, %ea1");
1eac08cc 2518#line 1218 "rl78-decode.opc"
99c513f6 2519 ID(xch); DR(A); SM(HL, IMMU(1));
43e65147 2520
99c513f6
DD
2521 }
2522 break;
2523 case 0xae:
2524 {
1d43092d 2525 /** 0110 0001 1010 1110 xch %0, %e1 */
99c513f6
DD
2526 if (trace)
2527 {
2528 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2529 "/** 0110 0001 1010 1110 xch %0, %e1 */",
99c513f6
DD
2530 op[0], op[1]);
2531 }
1d43092d 2532 SYNTAX("xch %0, %e1");
1eac08cc 2533#line 1206 "rl78-decode.opc"
99c513f6 2534 ID(xch); DR(A); SM(DE, 0);
43e65147 2535
99c513f6
DD
2536 }
2537 break;
2538 case 0xaf:
2539 {
1eac08cc 2540 /** 0110 0001 1010 1111 xch %0, %ea1 */
99c513f6
DD
2541 if (trace)
2542 {
2543 printf ("\033[33m%s\033[0m %02x %02x\n",
1eac08cc 2544 "/** 0110 0001 1010 1111 xch %0, %ea1 */",
99c513f6
DD
2545 op[0], op[1]);
2546 }
c2f28758 2547 SYNTAX("xch %0, %ea1");
1eac08cc 2548#line 1209 "rl78-decode.opc"
99c513f6 2549 ID(xch); DR(A); SM(DE, IMMU(1));
43e65147 2550
99c513f6
DD
2551 }
2552 break;
2553 case 0xb0:
2554 {
1d43092d 2555 /** 0110 0001 1011 0000 subc %0, %e1 */
99c513f6
DD
2556 if (trace)
2557 {
2558 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2559 "/** 0110 0001 1011 0000 subc %0, %e1 */",
99c513f6
DD
2560 op[0], op[1]);
2561 }
1d43092d 2562 SYNTAX("subc %0, %e1");
1eac08cc 2563#line 1157 "rl78-decode.opc"
99c513f6 2564 ID(subc); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2565
99c513f6
DD
2566 }
2567 break;
2568 case 0xb2:
2569 {
1d43092d 2570 /** 0110 0001 1011 0010 subc %0, %e1 */
99c513f6
DD
2571 if (trace)
2572 {
2573 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2574 "/** 0110 0001 1011 0010 subc %0, %e1 */",
99c513f6
DD
2575 op[0], op[1]);
2576 }
1d43092d 2577 SYNTAX("subc %0, %e1");
1eac08cc 2578#line 1160 "rl78-decode.opc"
99c513f6 2579 ID(subc); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2580
99c513f6
DD
2581 }
2582 break;
2583 case 0xb8:
2584 {
2585 /** 0110 0001 1011 1000 mov %0, %1 */
2586 if (trace)
2587 {
2588 printf ("\033[33m%s\033[0m %02x %02x\n",
2589 "/** 0110 0001 1011 1000 mov %0, %1 */",
2590 op[0], op[1]);
2591 }
2592 SYNTAX("mov %0, %1");
0952813b 2593#line 723 "rl78-decode.opc"
43e65147
L
2594 ID(mov); DR(ES); SM(None, SADDR);
2595
99c513f6
DD
2596 }
2597 break;
2598 case 0xb9:
2599 {
1d43092d 2600 /** 0110 0001 1011 1001 xch %0, %e1 */
99c513f6
DD
2601 if (trace)
2602 {
2603 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2604 "/** 0110 0001 1011 1001 xch %0, %e1 */",
99c513f6
DD
2605 op[0], op[1]);
2606 }
1d43092d 2607 SYNTAX("xch %0, %e1");
1eac08cc 2608#line 1215 "rl78-decode.opc"
99c513f6 2609 ID(xch); DR(A); SM2(HL, B, 0);
43e65147 2610
99c513f6
DD
2611 }
2612 break;
2613 case 0xc0:
2614 {
1d43092d 2615 /** 0110 0001 1100 0000 cmp %0, %e1 */
99c513f6
DD
2616 if (trace)
2617 {
2618 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2619 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
99c513f6
DD
2620 op[0], op[1]);
2621 }
1d43092d 2622 SYNTAX("cmp %0, %e1");
0952813b 2623#line 492 "rl78-decode.opc"
99c513f6 2624 ID(cmp); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2625
99c513f6
DD
2626 }
2627 break;
2628 case 0xc2:
2629 {
1d43092d 2630 /** 0110 0001 1100 0010 cmp %0, %e1 */
99c513f6
DD
2631 if (trace)
2632 {
2633 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2634 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
99c513f6
DD
2635 op[0], op[1]);
2636 }
1d43092d 2637 SYNTAX("cmp %0, %e1");
0952813b 2638#line 495 "rl78-decode.opc"
99c513f6 2639 ID(cmp); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2640
99c513f6
DD
2641 }
2642 break;
2643 case 0xc3:
2644 {
2645 /** 0110 0001 1100 0011 bh $%a0 */
2646 if (trace)
2647 {
2648 printf ("\033[33m%s\033[0m %02x %02x\n",
2649 "/** 0110 0001 1100 0011 bh $%a0 */",
2650 op[0], op[1]);
2651 }
2652 SYNTAX("bh $%a0");
0952813b 2653#line 340 "rl78-decode.opc"
99c513f6 2654 ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(H);
43e65147 2655
99c513f6
DD
2656 }
2657 break;
2658 case 0xc8:
2659 {
2660 /** 0110 0001 1100 1000 sk%c1 */
2661 if (trace)
2662 {
2663 printf ("\033[33m%s\033[0m %02x %02x\n",
2664 "/** 0110 0001 1100 1000 sk%c1 */",
2665 op[0], op[1]);
2666 }
2667 SYNTAX("sk%c1");
1eac08cc 2668#line 1094 "rl78-decode.opc"
99c513f6 2669 ID(skip); COND(C);
43e65147 2670
99c513f6
DD
2671 }
2672 break;
2673 case 0xc9:
2674 {
1d43092d 2675 /** 0110 0001 1100 1001 mov %0, %e1 */
99c513f6
DD
2676 if (trace)
2677 {
2678 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2679 "/** 0110 0001 1100 1001 mov %0, %e1 */",
99c513f6
DD
2680 op[0], op[1]);
2681 }
1d43092d 2682 SYNTAX("mov %0, %e1");
0952813b 2683#line 660 "rl78-decode.opc"
99c513f6 2684 ID(mov); DR(A); SM2(HL, B, 0);
43e65147 2685
99c513f6
DD
2686 }
2687 break;
2688 case 0xca:
2689 case 0xda:
2690 case 0xea:
2691 case 0xfa:
2692 {
2693 /** 0110 0001 11rg 1010 call %0 */
0952813b 2694#line 430 "rl78-decode.opc"
99c513f6
DD
2695 int rg AU = (op[1] >> 4) & 0x03;
2696 if (trace)
2697 {
2698 printf ("\033[33m%s\033[0m %02x %02x\n",
2699 "/** 0110 0001 11rg 1010 call %0 */",
2700 op[0], op[1]);
2701 printf (" rg = 0x%x\n", rg);
2702 }
2703 SYNTAX("call %0");
0952813b 2704#line 430 "rl78-decode.opc"
99c513f6 2705 ID(call); DRW(rg);
43e65147 2706
99c513f6
DD
2707 }
2708 break;
2709 case 0xcb:
2710 {
2711 /** 0110 0001 1100 1011 br ax */
2712 if (trace)
2713 {
2714 printf ("\033[33m%s\033[0m %02x %02x\n",
2715 "/** 0110 0001 1100 1011 br ax */",
2716 op[0], op[1]);
2717 }
2718 SYNTAX("br ax");
0952813b 2719#line 380 "rl78-decode.opc"
99c513f6 2720 ID(branch); DR(AX);
43e65147 2721
99c513f6 2722 /*----------------------------------------------------------------------*/
43e65147 2723
99c513f6
DD
2724 }
2725 break;
2726 case 0xcc:
2727 {
2728 /** 0110 0001 1100 1100 brk */
2729 if (trace)
2730 {
2731 printf ("\033[33m%s\033[0m %02x %02x\n",
2732 "/** 0110 0001 1100 1100 brk */",
2733 op[0], op[1]);
2734 }
2735 SYNTAX("brk");
0952813b 2736#line 388 "rl78-decode.opc"
99c513f6 2737 ID(break);
43e65147 2738
99c513f6 2739 /*----------------------------------------------------------------------*/
43e65147 2740
99c513f6
DD
2741 }
2742 break;
2743 case 0xcd:
2744 {
2745 /** 0110 0001 1100 1101 pop %s0 */
2746 if (trace)
2747 {
2748 printf ("\033[33m%s\033[0m %02x %02x\n",
2749 "/** 0110 0001 1100 1101 pop %s0 */",
2750 op[0], op[1]);
2751 }
2752 SYNTAX("pop %s0");
1eac08cc 2753#line 989 "rl78-decode.opc"
99c513f6 2754 ID(mov); W(); DR(PSW); SPOP();
43e65147 2755
99c513f6 2756 /*----------------------------------------------------------------------*/
43e65147 2757
99c513f6
DD
2758 }
2759 break;
2760 case 0xce:
2761 {
0952813b 2762 /** 0110 0001 1100 1110 movs %ea0, %1 */
99c513f6
DD
2763 if (trace)
2764 {
2765 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2766 "/** 0110 0001 1100 1110 movs %ea0, %1 */",
99c513f6
DD
2767 op[0], op[1]);
2768 }
90092e73 2769 SYNTAX("movs %ea0, %1");
0952813b 2770#line 811 "rl78-decode.opc"
99c513f6 2771 ID(mov); DM(HL, IMMU(1)); SR(X); Fzc;
43e65147 2772
99c513f6 2773 /*----------------------------------------------------------------------*/
43e65147 2774
99c513f6
DD
2775 }
2776 break;
2777 case 0xcf:
2778 case 0xdf:
2779 case 0xef:
2780 case 0xff:
2781 {
2782 /** 0110 0001 11rb 1111 sel rb%1 */
1eac08cc 2783#line 1041 "rl78-decode.opc"
99c513f6
DD
2784 int rb AU = (op[1] >> 4) & 0x03;
2785 if (trace)
2786 {
2787 printf ("\033[33m%s\033[0m %02x %02x\n",
2788 "/** 0110 0001 11rb 1111 sel rb%1 */",
2789 op[0], op[1]);
2790 printf (" rb = 0x%x\n", rb);
2791 }
2792 SYNTAX("sel rb%1");
1eac08cc 2793#line 1041 "rl78-decode.opc"
99c513f6 2794 ID(sel); SC(rb);
43e65147 2795
99c513f6 2796 /*----------------------------------------------------------------------*/
43e65147 2797
99c513f6
DD
2798 }
2799 break;
2800 case 0xd0:
2801 {
1d43092d 2802 /** 0110 0001 1101 0000 and %0, %e1 */
99c513f6
DD
2803 if (trace)
2804 {
2805 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2806 "/** 0110 0001 1101 0000 and %0, %e1 */",
99c513f6
DD
2807 op[0], op[1]);
2808 }
1d43092d 2809 SYNTAX("and %0, %e1");
0952813b 2810#line 291 "rl78-decode.opc"
99c513f6 2811 ID(and); DR(A); SM2(HL, B, 0); Fz;
43e65147 2812
99c513f6
DD
2813 }
2814 break;
2815 case 0xd2:
2816 {
1d43092d 2817 /** 0110 0001 1101 0010 and %0, %e1 */
99c513f6
DD
2818 if (trace)
2819 {
2820 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2821 "/** 0110 0001 1101 0010 and %0, %e1 */",
99c513f6
DD
2822 op[0], op[1]);
2823 }
1d43092d 2824 SYNTAX("and %0, %e1");
0952813b 2825#line 297 "rl78-decode.opc"
99c513f6 2826 ID(and); DR(A); SM2(HL, C, 0); Fz;
43e65147 2827
99c513f6
DD
2828 }
2829 break;
2830 case 0xd3:
2831 {
2832 /** 0110 0001 1101 0011 bnh $%a0 */
2833 if (trace)
2834 {
2835 printf ("\033[33m%s\033[0m %02x %02x\n",
2836 "/** 0110 0001 1101 0011 bnh $%a0 */",
2837 op[0], op[1]);
2838 }
2839 SYNTAX("bnh $%a0");
0952813b 2840#line 343 "rl78-decode.opc"
99c513f6 2841 ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(NH);
43e65147 2842
99c513f6
DD
2843 }
2844 break;
2845 case 0xd8:
2846 {
2847 /** 0110 0001 1101 1000 sk%c1 */
2848 if (trace)
2849 {
2850 printf ("\033[33m%s\033[0m %02x %02x\n",
2851 "/** 0110 0001 1101 1000 sk%c1 */",
2852 op[0], op[1]);
2853 }
2854 SYNTAX("sk%c1");
1eac08cc 2855#line 1100 "rl78-decode.opc"
99c513f6 2856 ID(skip); COND(NC);
43e65147 2857
99c513f6
DD
2858 }
2859 break;
2860 case 0xd9:
2861 {
1d43092d 2862 /** 0110 0001 1101 1001 mov %e0, %1 */
99c513f6
DD
2863 if (trace)
2864 {
2865 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2866 "/** 0110 0001 1101 1001 mov %e0, %1 */",
99c513f6
DD
2867 op[0], op[1]);
2868 }
1d43092d 2869 SYNTAX("mov %e0, %1");
0952813b 2870#line 627 "rl78-decode.opc"
99c513f6 2871 ID(mov); DM2(HL, B, 0); SR(A);
43e65147 2872
99c513f6
DD
2873 }
2874 break;
2875 case 0xdb:
2876 {
2877 /** 0110 0001 1101 1011 ror %0, %1 */
2878 if (trace)
2879 {
2880 printf ("\033[33m%s\033[0m %02x %02x\n",
2881 "/** 0110 0001 1101 1011 ror %0, %1 */",
2882 op[0], op[1]);
2883 }
2884 SYNTAX("ror %0, %1");
1eac08cc 2885#line 1022 "rl78-decode.opc"
99c513f6 2886 ID(ror); DR(A); SC(1);
43e65147 2887
99c513f6
DD
2888 }
2889 break;
2890 case 0xdc:
2891 {
2892 /** 0110 0001 1101 1100 rolc %0, %1 */
2893 if (trace)
2894 {
2895 printf ("\033[33m%s\033[0m %02x %02x\n",
2896 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2897 op[0], op[1]);
2898 }
2899 SYNTAX("rolc %0, %1");
1eac08cc 2900#line 1016 "rl78-decode.opc"
99c513f6 2901 ID(rolc); DR(A); SC(1);
43e65147 2902
99c513f6
DD
2903 }
2904 break;
2905 case 0xdd:
2906 {
2907 /** 0110 0001 1101 1101 push %s1 */
2908 if (trace)
2909 {
2910 printf ("\033[33m%s\033[0m %02x %02x\n",
2911 "/** 0110 0001 1101 1101 push %s1 */",
2912 op[0], op[1]);
2913 }
2914 SYNTAX("push %s1");
1eac08cc 2915#line 997 "rl78-decode.opc"
99c513f6 2916 ID(mov); W(); DPUSH(); SR(PSW);
43e65147 2917
99c513f6 2918 /*----------------------------------------------------------------------*/
43e65147 2919
99c513f6
DD
2920 }
2921 break;
2922 case 0xde:
2923 {
0952813b 2924 /** 0110 0001 1101 1110 cmps %0, %ea1 */
99c513f6
DD
2925 if (trace)
2926 {
2927 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2928 "/** 0110 0001 1101 1110 cmps %0, %ea1 */",
99c513f6
DD
2929 op[0], op[1]);
2930 }
90092e73 2931 SYNTAX("cmps %0, %ea1");
0952813b 2932#line 526 "rl78-decode.opc"
99c513f6 2933 ID(cmp); DR(X); SM(HL, IMMU(1)); Fzac;
43e65147 2934
99c513f6 2935 /*----------------------------------------------------------------------*/
43e65147 2936
99c513f6
DD
2937 }
2938 break;
2939 case 0xe0:
2940 {
1d43092d 2941 /** 0110 0001 1110 0000 or %0, %e1 */
99c513f6
DD
2942 if (trace)
2943 {
2944 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2945 "/** 0110 0001 1110 0000 or %0, %e1 */",
99c513f6
DD
2946 op[0], op[1]);
2947 }
1d43092d 2948 SYNTAX("or %0, %e1");
1eac08cc 2949#line 946 "rl78-decode.opc"
99c513f6 2950 ID(or); DR(A); SM2(HL, B, 0); Fz;
43e65147 2951
99c513f6
DD
2952 }
2953 break;
2954 case 0xe2:
2955 {
1d43092d 2956 /** 0110 0001 1110 0010 or %0, %e1 */
99c513f6
DD
2957 if (trace)
2958 {
2959 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2960 "/** 0110 0001 1110 0010 or %0, %e1 */",
99c513f6
DD
2961 op[0], op[1]);
2962 }
1d43092d 2963 SYNTAX("or %0, %e1");
1eac08cc 2964#line 952 "rl78-decode.opc"
99c513f6 2965 ID(or); DR(A); SM2(HL, C, 0); Fz;
43e65147 2966
99c513f6
DD
2967 }
2968 break;
2969 case 0xe3:
2970 {
2971 /** 0110 0001 1110 0011 sk%c1 */
2972 if (trace)
2973 {
2974 printf ("\033[33m%s\033[0m %02x %02x\n",
2975 "/** 0110 0001 1110 0011 sk%c1 */",
2976 op[0], op[1]);
2977 }
2978 SYNTAX("sk%c1");
1eac08cc 2979#line 1097 "rl78-decode.opc"
99c513f6 2980 ID(skip); COND(H);
43e65147 2981
99c513f6
DD
2982 }
2983 break;
2984 case 0xe8:
2985 {
2986 /** 0110 0001 1110 1000 sk%c1 */
2987 if (trace)
2988 {
2989 printf ("\033[33m%s\033[0m %02x %02x\n",
2990 "/** 0110 0001 1110 1000 sk%c1 */",
2991 op[0], op[1]);
2992 }
2993 SYNTAX("sk%c1");
1eac08cc 2994#line 1109 "rl78-decode.opc"
99c513f6 2995 ID(skip); COND(Z);
43e65147 2996
99c513f6 2997 /*----------------------------------------------------------------------*/
43e65147 2998
99c513f6
DD
2999 }
3000 break;
3001 case 0xe9:
3002 {
1d43092d 3003 /** 0110 0001 1110 1001 mov %0, %e1 */
99c513f6
DD
3004 if (trace)
3005 {
3006 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3007 "/** 0110 0001 1110 1001 mov %0, %e1 */",
99c513f6
DD
3008 op[0], op[1]);
3009 }
1d43092d 3010 SYNTAX("mov %0, %e1");
0952813b 3011#line 663 "rl78-decode.opc"
99c513f6 3012 ID(mov); DR(A); SM2(HL, C, 0);
43e65147 3013
99c513f6
DD
3014 }
3015 break;
3016 case 0xeb:
3017 {
3018 /** 0110 0001 1110 1011 rol %0, %1 */
3019 if (trace)
3020 {
3021 printf ("\033[33m%s\033[0m %02x %02x\n",
3022 "/** 0110 0001 1110 1011 rol %0, %1 */",
3023 op[0], op[1]);
3024 }
3025 SYNTAX("rol %0, %1");
1eac08cc 3026#line 1013 "rl78-decode.opc"
99c513f6 3027 ID(rol); DR(A); SC(1);
43e65147 3028
99c513f6
DD
3029 }
3030 break;
3031 case 0xec:
3032 {
3033 /** 0110 0001 1110 1100 retb */
3034 if (trace)
3035 {
3036 printf ("\033[33m%s\033[0m %02x %02x\n",
3037 "/** 0110 0001 1110 1100 retb */",
3038 op[0], op[1]);
3039 }
3040 SYNTAX("retb");
1eac08cc 3041#line 1008 "rl78-decode.opc"
99c513f6 3042 ID(reti);
43e65147 3043
99c513f6 3044 /*----------------------------------------------------------------------*/
43e65147 3045
99c513f6
DD
3046 }
3047 break;
3048 case 0xed:
3049 {
3050 /** 0110 0001 1110 1101 halt */
3051 if (trace)
3052 {
3053 printf ("\033[33m%s\033[0m %02x %02x\n",
3054 "/** 0110 0001 1110 1101 halt */",
3055 op[0], op[1]);
3056 }
3057 SYNTAX("halt");
0952813b 3058#line 576 "rl78-decode.opc"
99c513f6 3059 ID(halt);
43e65147 3060
99c513f6 3061 /*----------------------------------------------------------------------*/
43e65147 3062
99c513f6
DD
3063 }
3064 break;
3065 case 0xee:
3066 case 0xfe:
3067 {
3068 /** 0110 0001 111r 1110 rolwc %0, %1 */
1eac08cc 3069#line 1019 "rl78-decode.opc"
99c513f6
DD
3070 int r AU = (op[1] >> 4) & 0x01;
3071 if (trace)
3072 {
3073 printf ("\033[33m%s\033[0m %02x %02x\n",
3074 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3075 op[0], op[1]);
3076 printf (" r = 0x%x\n", r);
3077 }
3078 SYNTAX("rolwc %0, %1");
1eac08cc 3079#line 1019 "rl78-decode.opc"
99c513f6 3080 ID(rolc); W(); DRW(r); SC(1);
43e65147 3081
99c513f6
DD
3082 }
3083 break;
3084 case 0xf0:
3085 {
1d43092d 3086 /** 0110 0001 1111 0000 xor %0, %e1 */
99c513f6
DD
3087 if (trace)
3088 {
3089 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3090 "/** 0110 0001 1111 0000 xor %0, %e1 */",
99c513f6
DD
3091 op[0], op[1]);
3092 }
1d43092d 3093 SYNTAX("xor %0, %e1");
1eac08cc 3094#line 1250 "rl78-decode.opc"
99c513f6 3095 ID(xor); DR(A); SM2(HL, B, 0); Fz;
43e65147 3096
99c513f6
DD
3097 }
3098 break;
3099 case 0xf2:
3100 {
1d43092d 3101 /** 0110 0001 1111 0010 xor %0, %e1 */
99c513f6
DD
3102 if (trace)
3103 {
3104 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3105 "/** 0110 0001 1111 0010 xor %0, %e1 */",
99c513f6
DD
3106 op[0], op[1]);
3107 }
1d43092d 3108 SYNTAX("xor %0, %e1");
1eac08cc 3109#line 1256 "rl78-decode.opc"
99c513f6 3110 ID(xor); DR(A); SM2(HL, C, 0); Fz;
43e65147 3111
99c513f6
DD
3112 }
3113 break;
3114 case 0xf3:
3115 {
3116 /** 0110 0001 1111 0011 sk%c1 */
3117 if (trace)
3118 {
3119 printf ("\033[33m%s\033[0m %02x %02x\n",
3120 "/** 0110 0001 1111 0011 sk%c1 */",
3121 op[0], op[1]);
3122 }
3123 SYNTAX("sk%c1");
1eac08cc 3124#line 1103 "rl78-decode.opc"
99c513f6 3125 ID(skip); COND(NH);
43e65147 3126
99c513f6
DD
3127 }
3128 break;
3129 case 0xf8:
3130 {
3131 /** 0110 0001 1111 1000 sk%c1 */
3132 if (trace)
3133 {
3134 printf ("\033[33m%s\033[0m %02x %02x\n",
3135 "/** 0110 0001 1111 1000 sk%c1 */",
3136 op[0], op[1]);
3137 }
3138 SYNTAX("sk%c1");
1eac08cc 3139#line 1106 "rl78-decode.opc"
99c513f6 3140 ID(skip); COND(NZ);
43e65147 3141
99c513f6
DD
3142 }
3143 break;
3144 case 0xf9:
3145 {
1d43092d 3146 /** 0110 0001 1111 1001 mov %e0, %1 */
99c513f6
DD
3147 if (trace)
3148 {
3149 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3150 "/** 0110 0001 1111 1001 mov %e0, %1 */",
99c513f6
DD
3151 op[0], op[1]);
3152 }
1d43092d 3153 SYNTAX("mov %e0, %1");
0952813b 3154#line 636 "rl78-decode.opc"
99c513f6 3155 ID(mov); DM2(HL, C, 0); SR(A);
43e65147 3156
99c513f6
DD
3157 }
3158 break;
3159 case 0xfb:
3160 {
3161 /** 0110 0001 1111 1011 rorc %0, %1 */
3162 if (trace)
3163 {
3164 printf ("\033[33m%s\033[0m %02x %02x\n",
3165 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3166 op[0], op[1]);
3167 }
3168 SYNTAX("rorc %0, %1");
1eac08cc 3169#line 1025 "rl78-decode.opc"
99c513f6 3170 ID(rorc); DR(A); SC(1);
43e65147 3171
99c513f6 3172 /*----------------------------------------------------------------------*/
43e65147 3173
99c513f6
DD
3174 /* Note that the branch insns need to be listed before the shift
3175 ones, as "shift count of zero" means "branch insn" */
43e65147 3176
99c513f6
DD
3177 }
3178 break;
3179 case 0xfc:
3180 {
3181 /** 0110 0001 1111 1100 reti */
3182 if (trace)
3183 {
3184 printf ("\033[33m%s\033[0m %02x %02x\n",
3185 "/** 0110 0001 1111 1100 reti */",
3186 op[0], op[1]);
3187 }
3188 SYNTAX("reti");
1eac08cc 3189#line 1005 "rl78-decode.opc"
99c513f6 3190 ID(reti);
43e65147 3191
99c513f6
DD
3192 }
3193 break;
3194 case 0xfd:
3195 {
1d43092d 3196 /** 0110 0001 1111 1101 stop */
99c513f6
DD
3197 if (trace)
3198 {
3199 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3200 "/** 0110 0001 1111 1101 stop */",
99c513f6
DD
3201 op[0], op[1]);
3202 }
3203 SYNTAX("stop");
1eac08cc 3204#line 1114 "rl78-decode.opc"
99c513f6 3205 ID(stop);
43e65147 3206
99c513f6 3207 /*----------------------------------------------------------------------*/
43e65147 3208
99c513f6
DD
3209 }
3210 break;
3211 default: UNSUPPORTED(); break;
3212 }
3213 break;
3214 case 0x68:
3215 {
1d43092d 3216 /** 0110 1000 movw %e0, %1 */
99c513f6
DD
3217 if (trace)
3218 {
3219 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3220 "/** 0110 1000 movw %e0, %1 */",
99c513f6
DD
3221 op[0]);
3222 }
1d43092d 3223 SYNTAX("movw %e0, %1");
0952813b 3224#line 874 "rl78-decode.opc"
99c513f6 3225 ID(mov); W(); DM(C, IMMU(2)); SR(AX);
43e65147 3226
99c513f6
DD
3227 }
3228 break;
3229 case 0x69:
3230 {
1d43092d 3231 /** 0110 1001 movw %0, %e1 */
99c513f6
DD
3232 if (trace)
3233 {
3234 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3235 "/** 0110 1001 movw %0, %e1 */",
99c513f6
DD
3236 op[0]);
3237 }
1d43092d 3238 SYNTAX("movw %0, %e1");
0952813b 3239#line 865 "rl78-decode.opc"
99c513f6 3240 ID(mov); W(); DR(AX); SM(C, IMMU(2));
43e65147 3241
99c513f6
DD
3242 }
3243 break;
3244 case 0x6a:
3245 {
3246 /** 0110 1010 or %0, #%1 */
3247 if (trace)
3248 {
3249 printf ("\033[33m%s\033[0m %02x\n",
3250 "/** 0110 1010 or %0, #%1 */",
3251 op[0]);
3252 }
3253 SYNTAX("or %0, #%1");
1eac08cc 3254#line 967 "rl78-decode.opc"
99c513f6 3255 ID(or); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 3256
99c513f6 3257 /*----------------------------------------------------------------------*/
43e65147 3258
99c513f6
DD
3259 }
3260 break;
3261 case 0x6b:
3262 {
3263 /** 0110 1011 or %0, %1 */
3264 if (trace)
3265 {
3266 printf ("\033[33m%s\033[0m %02x\n",
3267 "/** 0110 1011 or %0, %1 */",
3268 op[0]);
3269 }
3270 SYNTAX("or %0, %1");
1eac08cc 3271#line 964 "rl78-decode.opc"
99c513f6 3272 ID(or); DR(A); SM(None, SADDR); Fz;
43e65147 3273
99c513f6
DD
3274 }
3275 break;
3276 case 0x6c:
3277 {
3278 /** 0110 1100 or %0, #%1 */
3279 if (trace)
3280 {
3281 printf ("\033[33m%s\033[0m %02x\n",
3282 "/** 0110 1100 or %0, #%1 */",
3283 op[0]);
3284 }
3285 SYNTAX("or %0, #%1");
1eac08cc 3286#line 955 "rl78-decode.opc"
99c513f6 3287 ID(or); DR(A); SC(IMMU(1)); Fz;
43e65147 3288
99c513f6
DD
3289 }
3290 break;
3291 case 0x6d:
3292 {
1d43092d 3293 /** 0110 1101 or %0, %e1 */
99c513f6
DD
3294 if (trace)
3295 {
3296 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3297 "/** 0110 1101 or %0, %e1 */",
99c513f6
DD
3298 op[0]);
3299 }
1d43092d 3300 SYNTAX("or %0, %e1");
1eac08cc 3301#line 943 "rl78-decode.opc"
99c513f6 3302 ID(or); DR(A); SM(HL, 0); Fz;
43e65147 3303
99c513f6
DD
3304 }
3305 break;
3306 case 0x6e:
3307 {
0952813b 3308 /** 0110 1110 or %0, %ea1 */
99c513f6
DD
3309 if (trace)
3310 {
3311 printf ("\033[33m%s\033[0m %02x\n",
0952813b 3312 "/** 0110 1110 or %0, %ea1 */",
99c513f6
DD
3313 op[0]);
3314 }
90092e73 3315 SYNTAX("or %0, %ea1");
1eac08cc 3316#line 949 "rl78-decode.opc"
99c513f6 3317 ID(or); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 3318
99c513f6
DD
3319 }
3320 break;
3321 case 0x6f:
3322 {
1d43092d 3323 /** 0110 1111 or %0, %e!1 */
99c513f6
DD
3324 if (trace)
3325 {
3326 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3327 "/** 0110 1111 or %0, %e!1 */",
99c513f6
DD
3328 op[0]);
3329 }
1d43092d 3330 SYNTAX("or %0, %e!1");
1eac08cc 3331#line 940 "rl78-decode.opc"
99c513f6 3332 ID(or); DR(A); SM(None, IMMU(2)); Fz;
43e65147 3333
99c513f6
DD
3334 }
3335 break;
3336 case 0x70:
3337 case 0x72:
3338 case 0x73:
3339 case 0x74:
3340 case 0x75:
3341 case 0x76:
3342 case 0x77:
3343 {
3344 /** 0111 0rba mov %0, %1 */
0952813b 3345#line 696 "rl78-decode.opc"
99c513f6
DD
3346 int rba AU = op[0] & 0x07;
3347 if (trace)
3348 {
3349 printf ("\033[33m%s\033[0m %02x\n",
3350 "/** 0111 0rba mov %0, %1 */",
3351 op[0]);
3352 printf (" rba = 0x%x\n", rba);
3353 }
3354 SYNTAX("mov %0, %1");
0952813b 3355#line 696 "rl78-decode.opc"
99c513f6 3356 ID(mov); DRB(rba); SR(A);
43e65147 3357
99c513f6
DD
3358 }
3359 break;
3360 case 0x71:
3361 GETBYTE ();
3362 switch (op[1] & 0xff)
3363 {
3364 case 0x00:
3365 case 0x10:
3366 case 0x20:
3367 case 0x30:
3368 case 0x40:
3369 case 0x50:
3370 case 0x60:
3371 case 0x70:
3372 {
1d43092d 3373 /** 0111 0001 0bit 0000 set1 %e!0 */
1eac08cc 3374#line 1046 "rl78-decode.opc"
99c513f6
DD
3375 int bit AU = (op[1] >> 4) & 0x07;
3376 if (trace)
3377 {
3378 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3379 "/** 0111 0001 0bit 0000 set1 %e!0 */",
99c513f6
DD
3380 op[0], op[1]);
3381 printf (" bit = 0x%x\n", bit);
3382 }
1d43092d 3383 SYNTAX("set1 %e!0");
1eac08cc 3384#line 1046 "rl78-decode.opc"
99c513f6 3385 ID(mov); DM(None, IMMU(2)); DB(bit); SC(1);
43e65147 3386
99c513f6
DD
3387 }
3388 break;
3389 case 0x01:
3390 case 0x11:
3391 case 0x21:
3392 case 0x31:
3393 case 0x41:
3394 case 0x51:
3395 case 0x61:
3396 case 0x71:
3397 {
3398 /** 0111 0001 0bit 0001 mov1 %0, cy */
0952813b 3399#line 803 "rl78-decode.opc"
99c513f6
DD
3400 int bit AU = (op[1] >> 4) & 0x07;
3401 if (trace)
3402 {
3403 printf ("\033[33m%s\033[0m %02x %02x\n",
3404 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3405 op[0], op[1]);
3406 printf (" bit = 0x%x\n", bit);
3407 }
3408 SYNTAX("mov1 %0, cy");
0952813b 3409#line 803 "rl78-decode.opc"
99c513f6 3410 ID(mov); DM(None, SADDR); DB(bit); SCY();
43e65147 3411
99c513f6
DD
3412 }
3413 break;
3414 case 0x02:
3415 case 0x12:
3416 case 0x22:
3417 case 0x32:
3418 case 0x42:
3419 case 0x52:
3420 case 0x62:
3421 case 0x72:
3422 {
3423 /** 0111 0001 0bit 0010 set1 %0 */
1eac08cc 3424#line 1064 "rl78-decode.opc"
99c513f6
DD
3425 int bit AU = (op[1] >> 4) & 0x07;
3426 if (trace)
3427 {
3428 printf ("\033[33m%s\033[0m %02x %02x\n",
3429 "/** 0111 0001 0bit 0010 set1 %0 */",
3430 op[0], op[1]);
3431 printf (" bit = 0x%x\n", bit);
3432 }
3433 SYNTAX("set1 %0");
1eac08cc 3434#line 1064 "rl78-decode.opc"
99c513f6 3435 ID(mov); DM(None, SADDR); DB(bit); SC(1);
43e65147 3436
99c513f6 3437 /*----------------------------------------------------------------------*/
43e65147 3438
99c513f6
DD
3439 }
3440 break;
3441 case 0x03:
3442 case 0x13:
3443 case 0x23:
3444 case 0x33:
3445 case 0x43:
3446 case 0x53:
3447 case 0x63:
3448 case 0x73:
3449 {
3450 /** 0111 0001 0bit 0011 clr1 %0 */
0952813b 3451#line 456 "rl78-decode.opc"
99c513f6
DD
3452 int bit AU = (op[1] >> 4) & 0x07;
3453 if (trace)
3454 {
3455 printf ("\033[33m%s\033[0m %02x %02x\n",
3456 "/** 0111 0001 0bit 0011 clr1 %0 */",
3457 op[0], op[1]);
3458 printf (" bit = 0x%x\n", bit);
3459 }
3460 SYNTAX("clr1 %0");
0952813b 3461#line 456 "rl78-decode.opc"
99c513f6 3462 ID(mov); DM(None, SADDR); DB(bit); SC(0);
43e65147 3463
99c513f6 3464 /*----------------------------------------------------------------------*/
43e65147 3465
99c513f6
DD
3466 }
3467 break;
3468 case 0x04:
3469 case 0x14:
3470 case 0x24:
3471 case 0x34:
3472 case 0x44:
3473 case 0x54:
3474 case 0x64:
3475 case 0x74:
3476 {
3477 /** 0111 0001 0bit 0100 mov1 cy, %1 */
0952813b 3478#line 797 "rl78-decode.opc"
99c513f6
DD
3479 int bit AU = (op[1] >> 4) & 0x07;
3480 if (trace)
3481 {
3482 printf ("\033[33m%s\033[0m %02x %02x\n",
3483 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3484 op[0], op[1]);
3485 printf (" bit = 0x%x\n", bit);
3486 }
3487 SYNTAX("mov1 cy, %1");
0952813b 3488#line 797 "rl78-decode.opc"
99c513f6 3489 ID(mov); DCY(); SM(None, SADDR); SB(bit);
43e65147 3490
99c513f6
DD
3491 }
3492 break;
3493 case 0x05:
3494 case 0x15:
3495 case 0x25:
3496 case 0x35:
3497 case 0x45:
3498 case 0x55:
3499 case 0x65:
3500 case 0x75:
3501 {
3502 /** 0111 0001 0bit 0101 and1 cy, %s1 */
0952813b 3503#line 326 "rl78-decode.opc"
99c513f6
DD
3504 int bit AU = (op[1] >> 4) & 0x07;
3505 if (trace)
3506 {
3507 printf ("\033[33m%s\033[0m %02x %02x\n",
3508 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3509 op[0], op[1]);
3510 printf (" bit = 0x%x\n", bit);
3511 }
3512 SYNTAX("and1 cy, %s1");
0952813b 3513#line 326 "rl78-decode.opc"
99c513f6 3514 ID(and); DCY(); SM(None, SADDR); SB(bit);
43e65147 3515
99c513f6 3516 /*----------------------------------------------------------------------*/
43e65147 3517
99c513f6
DD
3518 /* Note that the branch insns need to be listed before the shift
3519 ones, as "shift count of zero" means "branch insn" */
43e65147 3520
99c513f6
DD
3521 }
3522 break;
3523 case 0x06:
3524 case 0x16:
3525 case 0x26:
3526 case 0x36:
3527 case 0x46:
3528 case 0x56:
3529 case 0x66:
3530 case 0x76:
3531 {
3532 /** 0111 0001 0bit 0110 or1 cy, %s1 */
1eac08cc 3533#line 981 "rl78-decode.opc"
99c513f6
DD
3534 int bit AU = (op[1] >> 4) & 0x07;
3535 if (trace)
3536 {
3537 printf ("\033[33m%s\033[0m %02x %02x\n",
3538 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3539 op[0], op[1]);
3540 printf (" bit = 0x%x\n", bit);
3541 }
3542 SYNTAX("or1 cy, %s1");
1eac08cc 3543#line 981 "rl78-decode.opc"
99c513f6 3544 ID(or); DCY(); SM(None, SADDR); SB(bit);
43e65147 3545
99c513f6 3546 /*----------------------------------------------------------------------*/
43e65147 3547
99c513f6
DD
3548 }
3549 break;
3550 case 0x07:
3551 case 0x17:
3552 case 0x27:
3553 case 0x37:
3554 case 0x47:
3555 case 0x57:
3556 case 0x67:
3557 case 0x77:
3558 {
3559 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
1eac08cc 3560#line 1285 "rl78-decode.opc"
99c513f6
DD
3561 int bit AU = (op[1] >> 4) & 0x07;
3562 if (trace)
3563 {
3564 printf ("\033[33m%s\033[0m %02x %02x\n",
3565 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3566 op[0], op[1]);
3567 printf (" bit = 0x%x\n", bit);
3568 }
3569 SYNTAX("xor1 cy, %s1");
1eac08cc 3570#line 1285 "rl78-decode.opc"
99c513f6 3571 ID(xor); DCY(); SM(None, SADDR); SB(bit);
43e65147 3572
99c513f6 3573 /*----------------------------------------------------------------------*/
43e65147 3574
99c513f6
DD
3575 }
3576 break;
3577 case 0x08:
3578 case 0x18:
3579 case 0x28:
3580 case 0x38:
3581 case 0x48:
3582 case 0x58:
3583 case 0x68:
3584 case 0x78:
3585 {
1d43092d 3586 /** 0111 0001 0bit 1000 clr1 %e!0 */
0952813b 3587#line 438 "rl78-decode.opc"
99c513f6
DD
3588 int bit AU = (op[1] >> 4) & 0x07;
3589 if (trace)
3590 {
3591 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3592 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
99c513f6
DD
3593 op[0], op[1]);
3594 printf (" bit = 0x%x\n", bit);
3595 }
1d43092d 3596 SYNTAX("clr1 %e!0");
0952813b 3597#line 438 "rl78-decode.opc"
99c513f6 3598 ID(mov); DM(None, IMMU(2)); DB(bit); SC(0);
43e65147 3599
99c513f6
DD
3600 }
3601 break;
3602 case 0x09:
3603 case 0x19:
3604 case 0x29:
3605 case 0x39:
3606 case 0x49:
3607 case 0x59:
3608 case 0x69:
3609 case 0x79:
3610 {
3611 /** 0111 0001 0bit 1001 mov1 %s0, cy */
0952813b 3612#line 806 "rl78-decode.opc"
99c513f6
DD
3613 int bit AU = (op[1] >> 4) & 0x07;
3614 if (trace)
3615 {
3616 printf ("\033[33m%s\033[0m %02x %02x\n",
3617 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3618 op[0], op[1]);
3619 printf (" bit = 0x%x\n", bit);
3620 }
3621 SYNTAX("mov1 %s0, cy");
0952813b 3622#line 806 "rl78-decode.opc"
99c513f6 3623 ID(mov); DM(None, SFR); DB(bit); SCY();
43e65147 3624
99c513f6 3625 /*----------------------------------------------------------------------*/
43e65147 3626
99c513f6
DD
3627 }
3628 break;
3629 case 0x0a:
3630 case 0x1a:
3631 case 0x2a:
3632 case 0x3a:
3633 case 0x4a:
3634 case 0x5a:
3635 case 0x6a:
3636 case 0x7a:
3637 {
3638 /** 0111 0001 0bit 1010 set1 %s0 */
1eac08cc 3639#line 1058 "rl78-decode.opc"
99c513f6
DD
3640 int bit AU = (op[1] >> 4) & 0x07;
3641 if (trace)
3642 {
3643 printf ("\033[33m%s\033[0m %02x %02x\n",
3644 "/** 0111 0001 0bit 1010 set1 %s0 */",
3645 op[0], op[1]);
3646 printf (" bit = 0x%x\n", bit);
3647 }
3648 SYNTAX("set1 %s0");
1eac08cc 3649#line 1058 "rl78-decode.opc"
99c513f6
DD
3650 op0 = SFR;
3651 ID(mov); DM(None, op0); DB(bit); SC(1);
3652 if (op0 == RL78_SFR_PSW && bit == 7)
3653 rl78->syntax = "ei";
43e65147 3654
99c513f6
DD
3655 }
3656 break;
3657 case 0x0b:
3658 case 0x1b:
3659 case 0x2b:
3660 case 0x3b:
3661 case 0x4b:
3662 case 0x5b:
3663 case 0x6b:
3664 case 0x7b:
3665 {
3666 /** 0111 0001 0bit 1011 clr1 %s0 */
0952813b 3667#line 450 "rl78-decode.opc"
99c513f6
DD
3668 int bit AU = (op[1] >> 4) & 0x07;
3669 if (trace)
3670 {
3671 printf ("\033[33m%s\033[0m %02x %02x\n",
3672 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3673 op[0], op[1]);
3674 printf (" bit = 0x%x\n", bit);
3675 }
3676 SYNTAX("clr1 %s0");
0952813b 3677#line 450 "rl78-decode.opc"
99c513f6
DD
3678 op0 = SFR;
3679 ID(mov); DM(None, op0); DB(bit); SC(0);
3680 if (op0 == RL78_SFR_PSW && bit == 7)
3681 rl78->syntax = "di";
43e65147 3682
99c513f6
DD
3683 }
3684 break;
3685 case 0x0c:
3686 case 0x1c:
3687 case 0x2c:
3688 case 0x3c:
3689 case 0x4c:
3690 case 0x5c:
3691 case 0x6c:
3692 case 0x7c:
3693 {
3694 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
0952813b 3695#line 800 "rl78-decode.opc"
99c513f6
DD
3696 int bit AU = (op[1] >> 4) & 0x07;
3697 if (trace)
3698 {
3699 printf ("\033[33m%s\033[0m %02x %02x\n",
3700 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3701 op[0], op[1]);
3702 printf (" bit = 0x%x\n", bit);
3703 }
3704 SYNTAX("mov1 cy, %s1");
0952813b 3705#line 800 "rl78-decode.opc"
99c513f6 3706 ID(mov); DCY(); SM(None, SFR); SB(bit);
43e65147 3707
99c513f6
DD
3708 }
3709 break;
3710 case 0x0d:
3711 case 0x1d:
3712 case 0x2d:
3713 case 0x3d:
3714 case 0x4d:
3715 case 0x5d:
3716 case 0x6d:
3717 case 0x7d:
3718 {
3719 /** 0111 0001 0bit 1101 and1 cy, %s1 */
0952813b 3720#line 323 "rl78-decode.opc"
99c513f6
DD
3721 int bit AU = (op[1] >> 4) & 0x07;
3722 if (trace)
3723 {
3724 printf ("\033[33m%s\033[0m %02x %02x\n",
3725 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3726 op[0], op[1]);
3727 printf (" bit = 0x%x\n", bit);
3728 }
3729 SYNTAX("and1 cy, %s1");
0952813b 3730#line 323 "rl78-decode.opc"
99c513f6 3731 ID(and); DCY(); SM(None, SFR); SB(bit);
43e65147 3732
99c513f6
DD
3733 }
3734 break;
3735 case 0x0e:
3736 case 0x1e:
3737 case 0x2e:
3738 case 0x3e:
3739 case 0x4e:
3740 case 0x5e:
3741 case 0x6e:
3742 case 0x7e:
3743 {
3744 /** 0111 0001 0bit 1110 or1 cy, %s1 */
1eac08cc 3745#line 978 "rl78-decode.opc"
99c513f6
DD
3746 int bit AU = (op[1] >> 4) & 0x07;
3747 if (trace)
3748 {
3749 printf ("\033[33m%s\033[0m %02x %02x\n",
3750 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3751 op[0], op[1]);
3752 printf (" bit = 0x%x\n", bit);
3753 }
3754 SYNTAX("or1 cy, %s1");
1eac08cc 3755#line 978 "rl78-decode.opc"
99c513f6 3756 ID(or); DCY(); SM(None, SFR); SB(bit);
43e65147 3757
99c513f6
DD
3758 }
3759 break;
3760 case 0x0f:
3761 case 0x1f:
3762 case 0x2f:
3763 case 0x3f:
3764 case 0x4f:
3765 case 0x5f:
3766 case 0x6f:
3767 case 0x7f:
3768 {
3769 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
1eac08cc 3770#line 1282 "rl78-decode.opc"
99c513f6
DD
3771 int bit AU = (op[1] >> 4) & 0x07;
3772 if (trace)
3773 {
3774 printf ("\033[33m%s\033[0m %02x %02x\n",
3775 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3776 op[0], op[1]);
3777 printf (" bit = 0x%x\n", bit);
3778 }
3779 SYNTAX("xor1 cy, %s1");
1eac08cc 3780#line 1282 "rl78-decode.opc"
99c513f6 3781 ID(xor); DCY(); SM(None, SFR); SB(bit);
43e65147 3782
99c513f6
DD
3783 }
3784 break;
3785 case 0x80:
3786 {
3787 /** 0111 0001 1000 0000 set1 cy */
3788 if (trace)
3789 {
3790 printf ("\033[33m%s\033[0m %02x %02x\n",
3791 "/** 0111 0001 1000 0000 set1 cy */",
3792 op[0], op[1]);
3793 }
3794 SYNTAX("set1 cy");
1eac08cc 3795#line 1055 "rl78-decode.opc"
99c513f6 3796 ID(mov); DCY(); SC(1);
43e65147 3797
99c513f6
DD
3798 }
3799 break;
3800 case 0x81:
3801 case 0x91:
3802 case 0xa1:
3803 case 0xb1:
3804 case 0xc1:
3805 case 0xd1:
3806 case 0xe1:
3807 case 0xf1:
3808 {
1d43092d 3809 /** 0111 0001 1bit 0001 mov1 %e0, cy */
0952813b 3810#line 785 "rl78-decode.opc"
99c513f6
DD
3811 int bit AU = (op[1] >> 4) & 0x07;
3812 if (trace)
3813 {
3814 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3815 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
99c513f6
DD
3816 op[0], op[1]);
3817 printf (" bit = 0x%x\n", bit);
3818 }
1d43092d 3819 SYNTAX("mov1 %e0, cy");
0952813b 3820#line 785 "rl78-decode.opc"
99c513f6 3821 ID(mov); DM(HL, 0); DB(bit); SCY();
43e65147 3822
99c513f6
DD
3823 }
3824 break;
3825 case 0x82:
3826 case 0x92:
3827 case 0xa2:
3828 case 0xb2:
3829 case 0xc2:
3830 case 0xd2:
3831 case 0xe2:
3832 case 0xf2:
3833 {
1d43092d 3834 /** 0111 0001 1bit 0010 set1 %e0 */
1eac08cc 3835#line 1049 "rl78-decode.opc"
99c513f6
DD
3836 int bit AU = (op[1] >> 4) & 0x07;
3837 if (trace)
3838 {
3839 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3840 "/** 0111 0001 1bit 0010 set1 %e0 */",
99c513f6
DD
3841 op[0], op[1]);
3842 printf (" bit = 0x%x\n", bit);
3843 }
1d43092d 3844 SYNTAX("set1 %e0");
1eac08cc 3845#line 1049 "rl78-decode.opc"
99c513f6 3846 ID(mov); DM(HL, 0); DB(bit); SC(1);
43e65147 3847
99c513f6
DD
3848 }
3849 break;
3850 case 0x83:
3851 case 0x93:
3852 case 0xa3:
3853 case 0xb3:
3854 case 0xc3:
3855 case 0xd3:
3856 case 0xe3:
3857 case 0xf3:
3858 {
1d43092d 3859 /** 0111 0001 1bit 0011 clr1 %e0 */
0952813b 3860#line 441 "rl78-decode.opc"
99c513f6
DD
3861 int bit AU = (op[1] >> 4) & 0x07;
3862 if (trace)
3863 {
3864 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3865 "/** 0111 0001 1bit 0011 clr1 %e0 */",
99c513f6
DD
3866 op[0], op[1]);
3867 printf (" bit = 0x%x\n", bit);
3868 }
1d43092d 3869 SYNTAX("clr1 %e0");
0952813b 3870#line 441 "rl78-decode.opc"
99c513f6 3871 ID(mov); DM(HL, 0); DB(bit); SC(0);
43e65147 3872
99c513f6
DD
3873 }
3874 break;
3875 case 0x84:
3876 case 0x94:
3877 case 0xa4:
3878 case 0xb4:
3879 case 0xc4:
3880 case 0xd4:
3881 case 0xe4:
3882 case 0xf4:
3883 {
1d43092d 3884 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
0952813b 3885#line 791 "rl78-decode.opc"
99c513f6
DD
3886 int bit AU = (op[1] >> 4) & 0x07;
3887 if (trace)
3888 {
3889 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3890 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
99c513f6
DD
3891 op[0], op[1]);
3892 printf (" bit = 0x%x\n", bit);
3893 }
1d43092d 3894 SYNTAX("mov1 cy, %e1");
0952813b 3895#line 791 "rl78-decode.opc"
99c513f6 3896 ID(mov); DCY(); SM(HL, 0); SB(bit);
43e65147 3897
99c513f6
DD
3898 }
3899 break;
3900 case 0x85:
3901 case 0x95:
3902 case 0xa5:
3903 case 0xb5:
3904 case 0xc5:
3905 case 0xd5:
3906 case 0xe5:
3907 case 0xf5:
3908 {
1d43092d 3909 /** 0111 0001 1bit 0101 and1 cy, %e1 */
0952813b 3910#line 317 "rl78-decode.opc"
99c513f6
DD
3911 int bit AU = (op[1] >> 4) & 0x07;
3912 if (trace)
3913 {
3914 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3915 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
99c513f6
DD
3916 op[0], op[1]);
3917 printf (" bit = 0x%x\n", bit);
3918 }
1d43092d 3919 SYNTAX("and1 cy, %e1");
0952813b 3920#line 317 "rl78-decode.opc"
99c513f6 3921 ID(and); DCY(); SM(HL, 0); SB(bit);
43e65147 3922
99c513f6
DD
3923 }
3924 break;
3925 case 0x86:
3926 case 0x96:
3927 case 0xa6:
3928 case 0xb6:
3929 case 0xc6:
3930 case 0xd6:
3931 case 0xe6:
3932 case 0xf6:
3933 {
1d43092d 3934 /** 0111 0001 1bit 0110 or1 cy, %e1 */
1eac08cc 3935#line 972 "rl78-decode.opc"
99c513f6
DD
3936 int bit AU = (op[1] >> 4) & 0x07;
3937 if (trace)
3938 {
3939 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3940 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
99c513f6
DD
3941 op[0], op[1]);
3942 printf (" bit = 0x%x\n", bit);
3943 }
1d43092d 3944 SYNTAX("or1 cy, %e1");
1eac08cc 3945#line 972 "rl78-decode.opc"
99c513f6 3946 ID(or); DCY(); SM(HL, 0); SB(bit);
43e65147 3947
99c513f6
DD
3948 }
3949 break;
3950 case 0x87:
3951 case 0x97:
3952 case 0xa7:
3953 case 0xb7:
3954 case 0xc7:
3955 case 0xd7:
3956 case 0xe7:
3957 case 0xf7:
3958 {
1d43092d 3959 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
1eac08cc 3960#line 1276 "rl78-decode.opc"
99c513f6
DD
3961 int bit AU = (op[1] >> 4) & 0x07;
3962 if (trace)
3963 {
3964 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3965 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
99c513f6
DD
3966 op[0], op[1]);
3967 printf (" bit = 0x%x\n", bit);
3968 }
1d43092d 3969 SYNTAX("xor1 cy, %e1");
1eac08cc 3970#line 1276 "rl78-decode.opc"
99c513f6 3971 ID(xor); DCY(); SM(HL, 0); SB(bit);
43e65147 3972
99c513f6
DD
3973 }
3974 break;
3975 case 0x88:
3976 {
3977 /** 0111 0001 1000 1000 clr1 cy */
3978 if (trace)
3979 {
3980 printf ("\033[33m%s\033[0m %02x %02x\n",
3981 "/** 0111 0001 1000 1000 clr1 cy */",
3982 op[0], op[1]);
3983 }
3984 SYNTAX("clr1 cy");
0952813b 3985#line 447 "rl78-decode.opc"
99c513f6 3986 ID(mov); DCY(); SC(0);
43e65147 3987
99c513f6
DD
3988 }
3989 break;
3990 case 0x89:
3991 case 0x99:
3992 case 0xa9:
3993 case 0xb9:
3994 case 0xc9:
3995 case 0xd9:
3996 case 0xe9:
3997 case 0xf9:
3998 {
1d43092d 3999 /** 0111 0001 1bit 1001 mov1 %e0, cy */
0952813b 4000#line 788 "rl78-decode.opc"
99c513f6
DD
4001 int bit AU = (op[1] >> 4) & 0x07;
4002 if (trace)
4003 {
4004 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 4005 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
99c513f6
DD
4006 op[0], op[1]);
4007 printf (" bit = 0x%x\n", bit);
4008 }
1d43092d 4009 SYNTAX("mov1 %e0, cy");
0952813b 4010#line 788 "rl78-decode.opc"
99c513f6 4011 ID(mov); DR(A); DB(bit); SCY();
43e65147 4012
99c513f6
DD
4013 }
4014 break;
4015 case 0x8a:
4016 case 0x9a:
4017 case 0xaa:
4018 case 0xba:
4019 case 0xca:
4020 case 0xda:
4021 case 0xea:
4022 case 0xfa:
4023 {
4024 /** 0111 0001 1bit 1010 set1 %0 */
1eac08cc 4025#line 1052 "rl78-decode.opc"
99c513f6
DD
4026 int bit AU = (op[1] >> 4) & 0x07;
4027 if (trace)
4028 {
4029 printf ("\033[33m%s\033[0m %02x %02x\n",
4030 "/** 0111 0001 1bit 1010 set1 %0 */",
4031 op[0], op[1]);
4032 printf (" bit = 0x%x\n", bit);
4033 }
4034 SYNTAX("set1 %0");
1eac08cc 4035#line 1052 "rl78-decode.opc"
99c513f6 4036 ID(mov); DR(A); DB(bit); SC(1);
43e65147 4037
99c513f6
DD
4038 }
4039 break;
4040 case 0x8b:
4041 case 0x9b:
4042 case 0xab:
4043 case 0xbb:
4044 case 0xcb:
4045 case 0xdb:
4046 case 0xeb:
4047 case 0xfb:
4048 {
4049 /** 0111 0001 1bit 1011 clr1 %0 */
0952813b 4050#line 444 "rl78-decode.opc"
99c513f6
DD
4051 int bit AU = (op[1] >> 4) & 0x07;
4052 if (trace)
4053 {
4054 printf ("\033[33m%s\033[0m %02x %02x\n",
4055 "/** 0111 0001 1bit 1011 clr1 %0 */",
4056 op[0], op[1]);
4057 printf (" bit = 0x%x\n", bit);
4058 }
4059 SYNTAX("clr1 %0");
0952813b 4060#line 444 "rl78-decode.opc"
99c513f6 4061 ID(mov); DR(A); DB(bit); SC(0);
43e65147 4062
99c513f6
DD
4063 }
4064 break;
4065 case 0x8c:
4066 case 0x9c:
4067 case 0xac:
4068 case 0xbc:
4069 case 0xcc:
4070 case 0xdc:
4071 case 0xec:
4072 case 0xfc:
4073 {
1d43092d 4074 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
0952813b 4075#line 794 "rl78-decode.opc"
99c513f6
DD
4076 int bit AU = (op[1] >> 4) & 0x07;
4077 if (trace)
4078 {
4079 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 4080 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
99c513f6
DD
4081 op[0], op[1]);
4082 printf (" bit = 0x%x\n", bit);
4083 }
1d43092d 4084 SYNTAX("mov1 cy, %e1");
0952813b 4085#line 794 "rl78-decode.opc"
99c513f6 4086 ID(mov); DCY(); SR(A); SB(bit);
43e65147 4087
99c513f6
DD
4088 }
4089 break;
4090 case 0x8d:
4091 case 0x9d:
4092 case 0xad:
4093 case 0xbd:
4094 case 0xcd:
4095 case 0xdd:
4096 case 0xed:
4097 case 0xfd:
4098 {
4099 /** 0111 0001 1bit 1101 and1 cy, %1 */
0952813b 4100#line 320 "rl78-decode.opc"
99c513f6
DD
4101 int bit AU = (op[1] >> 4) & 0x07;
4102 if (trace)
4103 {
4104 printf ("\033[33m%s\033[0m %02x %02x\n",
4105 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4106 op[0], op[1]);
4107 printf (" bit = 0x%x\n", bit);
4108 }
4109 SYNTAX("and1 cy, %1");
0952813b 4110#line 320 "rl78-decode.opc"
99c513f6 4111 ID(and); DCY(); SR(A); SB(bit);
43e65147 4112
99c513f6
DD
4113 }
4114 break;
4115 case 0x8e:
4116 case 0x9e:
4117 case 0xae:
4118 case 0xbe:
4119 case 0xce:
4120 case 0xde:
4121 case 0xee:
4122 case 0xfe:
4123 {
4124 /** 0111 0001 1bit 1110 or1 cy, %1 */
1eac08cc 4125#line 975 "rl78-decode.opc"
99c513f6
DD
4126 int bit AU = (op[1] >> 4) & 0x07;
4127 if (trace)
4128 {
4129 printf ("\033[33m%s\033[0m %02x %02x\n",
4130 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4131 op[0], op[1]);
4132 printf (" bit = 0x%x\n", bit);
4133 }
4134 SYNTAX("or1 cy, %1");
1eac08cc 4135#line 975 "rl78-decode.opc"
99c513f6 4136 ID(or); DCY(); SR(A); SB(bit);
43e65147 4137
99c513f6
DD
4138 }
4139 break;
4140 case 0x8f:
4141 case 0x9f:
4142 case 0xaf:
4143 case 0xbf:
4144 case 0xcf:
4145 case 0xdf:
4146 case 0xef:
4147 case 0xff:
4148 {
4149 /** 0111 0001 1bit 1111 xor1 cy, %1 */
1eac08cc 4150#line 1279 "rl78-decode.opc"
99c513f6
DD
4151 int bit AU = (op[1] >> 4) & 0x07;
4152 if (trace)
4153 {
4154 printf ("\033[33m%s\033[0m %02x %02x\n",
4155 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4156 op[0], op[1]);
4157 printf (" bit = 0x%x\n", bit);
4158 }
4159 SYNTAX("xor1 cy, %1");
1eac08cc 4160#line 1279 "rl78-decode.opc"
99c513f6 4161 ID(xor); DCY(); SR(A); SB(bit);
43e65147 4162
ce9cb534
DD
4163 }
4164 break;
4165 case 0xc0:
4166 {
4167 /** 0111 0001 1100 0000 not1 cy */
4168 if (trace)
4169 {
4170 printf ("\033[33m%s\033[0m %02x %02x\n",
4171 "/** 0111 0001 1100 0000 not1 cy */",
4172 op[0], op[1]);
4173 }
4174 SYNTAX("not1 cy");
1eac08cc 4175#line 916 "rl78-decode.opc"
ce9cb534 4176 ID(xor); DCY(); SC(1);
43e65147 4177
ce9cb534 4178 /*----------------------------------------------------------------------*/
43e65147 4179
99c513f6
DD
4180 }
4181 break;
4182 default: UNSUPPORTED(); break;
4183 }
4184 break;
4185 case 0x78:
4186 {
1d43092d 4187 /** 0111 1000 movw %e0, %1 */
99c513f6
DD
4188 if (trace)
4189 {
4190 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4191 "/** 0111 1000 movw %e0, %1 */",
99c513f6
DD
4192 op[0]);
4193 }
1d43092d 4194 SYNTAX("movw %e0, %1");
0952813b 4195#line 877 "rl78-decode.opc"
99c513f6 4196 ID(mov); W(); DM(BC, IMMU(2)); SR(AX);
43e65147 4197
99c513f6
DD
4198 }
4199 break;
4200 case 0x79:
4201 {
1d43092d 4202 /** 0111 1001 movw %0, %e1 */
99c513f6
DD
4203 if (trace)
4204 {
4205 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4206 "/** 0111 1001 movw %0, %e1 */",
99c513f6
DD
4207 op[0]);
4208 }
1d43092d 4209 SYNTAX("movw %0, %e1");
0952813b 4210#line 868 "rl78-decode.opc"
99c513f6 4211 ID(mov); W(); DR(AX); SM(BC, IMMU(2));
43e65147 4212
99c513f6
DD
4213 }
4214 break;
4215 case 0x7a:
4216 {
4217 /** 0111 1010 xor %0, #%1 */
4218 if (trace)
4219 {
4220 printf ("\033[33m%s\033[0m %02x\n",
4221 "/** 0111 1010 xor %0, #%1 */",
4222 op[0]);
4223 }
4224 SYNTAX("xor %0, #%1");
1eac08cc 4225#line 1271 "rl78-decode.opc"
99c513f6 4226 ID(xor); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 4227
99c513f6 4228 /*----------------------------------------------------------------------*/
43e65147 4229
99c513f6
DD
4230 }
4231 break;
4232 case 0x7b:
4233 {
4234 /** 0111 1011 xor %0, %1 */
4235 if (trace)
4236 {
4237 printf ("\033[33m%s\033[0m %02x\n",
4238 "/** 0111 1011 xor %0, %1 */",
4239 op[0]);
4240 }
4241 SYNTAX("xor %0, %1");
1eac08cc 4242#line 1268 "rl78-decode.opc"
99c513f6 4243 ID(xor); DR(A); SM(None, SADDR); Fz;
43e65147 4244
99c513f6
DD
4245 }
4246 break;
4247 case 0x7c:
4248 {
4249 /** 0111 1100 xor %0, #%1 */
4250 if (trace)
4251 {
4252 printf ("\033[33m%s\033[0m %02x\n",
4253 "/** 0111 1100 xor %0, #%1 */",
4254 op[0]);
4255 }
4256 SYNTAX("xor %0, #%1");
1eac08cc 4257#line 1259 "rl78-decode.opc"
99c513f6 4258 ID(xor); DR(A); SC(IMMU(1)); Fz;
43e65147 4259
99c513f6
DD
4260 }
4261 break;
4262 case 0x7d:
4263 {
1d43092d 4264 /** 0111 1101 xor %0, %e1 */
99c513f6
DD
4265 if (trace)
4266 {
4267 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4268 "/** 0111 1101 xor %0, %e1 */",
99c513f6
DD
4269 op[0]);
4270 }
1d43092d 4271 SYNTAX("xor %0, %e1");
1eac08cc 4272#line 1247 "rl78-decode.opc"
99c513f6 4273 ID(xor); DR(A); SM(HL, 0); Fz;
43e65147 4274
99c513f6
DD
4275 }
4276 break;
4277 case 0x7e:
4278 {
0952813b 4279 /** 0111 1110 xor %0, %ea1 */
99c513f6
DD
4280 if (trace)
4281 {
4282 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4283 "/** 0111 1110 xor %0, %ea1 */",
99c513f6
DD
4284 op[0]);
4285 }
90092e73 4286 SYNTAX("xor %0, %ea1");
1eac08cc 4287#line 1253 "rl78-decode.opc"
99c513f6 4288 ID(xor); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 4289
99c513f6
DD
4290 }
4291 break;
4292 case 0x7f:
4293 {
1d43092d 4294 /** 0111 1111 xor %0, %e!1 */
99c513f6
DD
4295 if (trace)
4296 {
4297 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4298 "/** 0111 1111 xor %0, %e!1 */",
99c513f6
DD
4299 op[0]);
4300 }
1d43092d 4301 SYNTAX("xor %0, %e!1");
1eac08cc 4302#line 1244 "rl78-decode.opc"
99c513f6 4303 ID(xor); DR(A); SM(None, IMMU(2)); Fz;
43e65147 4304
99c513f6
DD
4305 }
4306 break;
4307 case 0x80:
4308 case 0x81:
4309 case 0x82:
4310 case 0x83:
4311 case 0x84:
4312 case 0x85:
4313 case 0x86:
4314 case 0x87:
4315 {
4316 /** 1000 0reg inc %0 */
0952813b 4317#line 587 "rl78-decode.opc"
99c513f6
DD
4318 int reg AU = op[0] & 0x07;
4319 if (trace)
4320 {
4321 printf ("\033[33m%s\033[0m %02x\n",
4322 "/** 1000 0reg inc %0 */",
4323 op[0]);
4324 printf (" reg = 0x%x\n", reg);
4325 }
4326 SYNTAX("inc %0");
0952813b 4327#line 587 "rl78-decode.opc"
99c513f6 4328 ID(add); DRB(reg); SC(1); Fza;
43e65147 4329
99c513f6
DD
4330 }
4331 break;
4332 case 0x88:
4333 {
02f12cd4 4334 /** 1000 1000 mov %0, %ea1 */
99c513f6
DD
4335 if (trace)
4336 {
4337 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4338 "/** 1000 1000 mov %0, %ea1 */",
99c513f6
DD
4339 op[0]);
4340 }
02f12cd4 4341 SYNTAX("mov %0, %ea1");
0952813b 4342#line 666 "rl78-decode.opc"
99c513f6 4343 ID(mov); DR(A); SM(SP, IMMU(1));
43e65147 4344
99c513f6
DD
4345 }
4346 break;
4347 case 0x89:
4348 {
1d43092d 4349 /** 1000 1001 mov %0, %e1 */
99c513f6
DD
4350 if (trace)
4351 {
4352 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4353 "/** 1000 1001 mov %0, %e1 */",
99c513f6
DD
4354 op[0]);
4355 }
1d43092d 4356 SYNTAX("mov %0, %e1");
0952813b 4357#line 648 "rl78-decode.opc"
99c513f6 4358 ID(mov); DR(A); SM(DE, 0);
43e65147 4359
99c513f6
DD
4360 }
4361 break;
4362 case 0x8a:
4363 {
c2f28758 4364 /** 1000 1010 mov %0, %ea1 */
99c513f6
DD
4365 if (trace)
4366 {
4367 printf ("\033[33m%s\033[0m %02x\n",
c2f28758 4368 "/** 1000 1010 mov %0, %ea1 */",
99c513f6
DD
4369 op[0]);
4370 }
c2f28758 4371 SYNTAX("mov %0, %ea1");
0952813b 4372#line 651 "rl78-decode.opc"
99c513f6 4373 ID(mov); DR(A); SM(DE, IMMU(1));
43e65147 4374
99c513f6
DD
4375 }
4376 break;
4377 case 0x8b:
4378 {
1d43092d 4379 /** 1000 1011 mov %0, %e1 */
99c513f6
DD
4380 if (trace)
4381 {
4382 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4383 "/** 1000 1011 mov %0, %e1 */",
99c513f6
DD
4384 op[0]);
4385 }
1d43092d 4386 SYNTAX("mov %0, %e1");
0952813b 4387#line 654 "rl78-decode.opc"
99c513f6 4388 ID(mov); DR(A); SM(HL, 0);
43e65147 4389
99c513f6
DD
4390 }
4391 break;
4392 case 0x8c:
4393 {
0952813b 4394 /** 1000 1100 mov %0, %ea1 */
99c513f6
DD
4395 if (trace)
4396 {
4397 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4398 "/** 1000 1100 mov %0, %ea1 */",
99c513f6
DD
4399 op[0]);
4400 }
90092e73 4401 SYNTAX("mov %0, %ea1");
0952813b 4402#line 657 "rl78-decode.opc"
99c513f6 4403 ID(mov); DR(A); SM(HL, IMMU(1));
43e65147 4404
99c513f6
DD
4405 }
4406 break;
4407 case 0x8d:
4408 {
4409 /** 1000 1101 mov %0, %1 */
4410 if (trace)
4411 {
4412 printf ("\033[33m%s\033[0m %02x\n",
4413 "/** 1000 1101 mov %0, %1 */",
4414 op[0]);
4415 }
4416 SYNTAX("mov %0, %1");
0952813b 4417#line 690 "rl78-decode.opc"
99c513f6 4418 ID(mov); DR(A); SM(None, SADDR);
43e65147 4419
99c513f6
DD
4420 }
4421 break;
4422 case 0x8e:
4423 {
4424 /** 1000 1110 mov %0, %s1 */
4425 if (trace)
4426 {
4427 printf ("\033[33m%s\033[0m %02x\n",
4428 "/** 1000 1110 mov %0, %s1 */",
4429 op[0]);
4430 }
4431 SYNTAX("mov %0, %s1");
0952813b 4432#line 687 "rl78-decode.opc"
99c513f6 4433 ID(mov); DR(A); SM(None, SFR);
43e65147 4434
99c513f6
DD
4435 }
4436 break;
4437 case 0x8f:
4438 {
1d43092d 4439 /** 1000 1111 mov %0, %e!1 */
99c513f6
DD
4440 if (trace)
4441 {
4442 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4443 "/** 1000 1111 mov %0, %e!1 */",
99c513f6
DD
4444 op[0]);
4445 }
1d43092d 4446 SYNTAX("mov %0, %e!1");
0952813b 4447#line 645 "rl78-decode.opc"
99c513f6 4448 ID(mov); DR(A); SM(None, IMMU(2));
43e65147 4449
99c513f6
DD
4450 }
4451 break;
4452 case 0x90:
4453 case 0x91:
4454 case 0x92:
4455 case 0x93:
4456 case 0x94:
4457 case 0x95:
4458 case 0x96:
4459 case 0x97:
4460 {
4461 /** 1001 0reg dec %0 */
0952813b 4462#line 554 "rl78-decode.opc"
99c513f6
DD
4463 int reg AU = op[0] & 0x07;
4464 if (trace)
4465 {
4466 printf ("\033[33m%s\033[0m %02x\n",
4467 "/** 1001 0reg dec %0 */",
4468 op[0]);
4469 printf (" reg = 0x%x\n", reg);
4470 }
4471 SYNTAX("dec %0");
0952813b 4472#line 554 "rl78-decode.opc"
99c513f6 4473 ID(sub); DRB(reg); SC(1); Fza;
43e65147 4474
99c513f6
DD
4475 }
4476 break;
4477 case 0x98:
4478 {
02f12cd4 4479 /** 1001 1000 mov %a0, %1 */
99c513f6
DD
4480 if (trace)
4481 {
4482 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4483 "/** 1001 1000 mov %a0, %1 */",
99c513f6
DD
4484 op[0]);
4485 }
02f12cd4 4486 SYNTAX("mov %a0, %1");
0952813b 4487#line 642 "rl78-decode.opc"
99c513f6 4488 ID(mov); DM(SP, IMMU(1)); SR(A);
43e65147 4489
99c513f6
DD
4490 }
4491 break;
4492 case 0x99:
4493 {
fd63f640 4494 /** 1001 1001 mov %e0, %1 */
99c513f6
DD
4495 if (trace)
4496 {
4497 printf ("\033[33m%s\033[0m %02x\n",
fd63f640 4498 "/** 1001 1001 mov %e0, %1 */",
99c513f6
DD
4499 op[0]);
4500 }
fd63f640 4501 SYNTAX("mov %e0, %1");
0952813b 4502#line 615 "rl78-decode.opc"
99c513f6 4503 ID(mov); DM(DE, 0); SR(A);
43e65147 4504
99c513f6
DD
4505 }
4506 break;
4507 case 0x9a:
4508 {
1eac08cc 4509 /** 1001 1010 mov %ea0, %1 */
99c513f6
DD
4510 if (trace)
4511 {
4512 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4513 "/** 1001 1010 mov %ea0, %1 */",
99c513f6
DD
4514 op[0]);
4515 }
c2f28758 4516 SYNTAX("mov %ea0, %1");
0952813b 4517#line 621 "rl78-decode.opc"
99c513f6 4518 ID(mov); DM(DE, IMMU(1)); SR(A);
43e65147 4519
99c513f6
DD
4520 }
4521 break;
4522 case 0x9b:
4523 {
fd63f640 4524 /** 1001 1011 mov %e0, %1 */
99c513f6
DD
4525 if (trace)
4526 {
4527 printf ("\033[33m%s\033[0m %02x\n",
fd63f640 4528 "/** 1001 1011 mov %e0, %1 */",
99c513f6
DD
4529 op[0]);
4530 }
fd63f640 4531 SYNTAX("mov %e0, %1");
0952813b 4532#line 624 "rl78-decode.opc"
99c513f6 4533 ID(mov); DM(HL, 0); SR(A);
43e65147 4534
99c513f6
DD
4535 }
4536 break;
4537 case 0x9c:
4538 {
0952813b 4539 /** 1001 1100 mov %ea0, %1 */
99c513f6
DD
4540 if (trace)
4541 {
4542 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4543 "/** 1001 1100 mov %ea0, %1 */",
99c513f6
DD
4544 op[0]);
4545 }
90092e73 4546 SYNTAX("mov %ea0, %1");
0952813b 4547#line 633 "rl78-decode.opc"
99c513f6 4548 ID(mov); DM(HL, IMMU(1)); SR(A);
43e65147 4549
99c513f6
DD
4550 }
4551 break;
4552 case 0x9d:
4553 {
4554 /** 1001 1101 mov %0, %1 */
4555 if (trace)
4556 {
4557 printf ("\033[33m%s\033[0m %02x\n",
4558 "/** 1001 1101 mov %0, %1 */",
4559 op[0]);
4560 }
4561 SYNTAX("mov %0, %1");
0952813b 4562#line 747 "rl78-decode.opc"
99c513f6 4563 ID(mov); DM(None, SADDR); SR(A);
43e65147 4564
99c513f6
DD
4565 }
4566 break;
4567 case 0x9e:
4568 {
46662804 4569 /** 1001 1110 mov %s0, %1 */
99c513f6
DD
4570 if (trace)
4571 {
4572 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4573 "/** 1001 1110 mov %s0, %1 */",
99c513f6
DD
4574 op[0]);
4575 }
46662804 4576 SYNTAX("mov %s0, %1");
0952813b 4577#line 780 "rl78-decode.opc"
99c513f6 4578 ID(mov); DM(None, SFR); SR(A);
43e65147 4579
99c513f6 4580 /*----------------------------------------------------------------------*/
43e65147 4581
99c513f6
DD
4582 }
4583 break;
4584 case 0x9f:
4585 {
1d43092d 4586 /** 1001 1111 mov %e!0, %1 */
99c513f6
DD
4587 if (trace)
4588 {
4589 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4590 "/** 1001 1111 mov %e!0, %1 */",
99c513f6
DD
4591 op[0]);
4592 }
1d43092d 4593 SYNTAX("mov %e!0, %1");
0952813b 4594#line 612 "rl78-decode.opc"
99c513f6 4595 ID(mov); DM(None, IMMU(2)); SR(A);
43e65147 4596
99c513f6
DD
4597 }
4598 break;
4599 case 0xa0:
4600 {
1d43092d 4601 /** 1010 0000 inc %e!0 */
99c513f6
DD
4602 if (trace)
4603 {
4604 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4605 "/** 1010 0000 inc %e!0 */",
99c513f6
DD
4606 op[0]);
4607 }
1d43092d 4608 SYNTAX("inc %e!0");
0952813b 4609#line 581 "rl78-decode.opc"
99c513f6 4610 ID(add); DM(None, IMMU(2)); SC(1); Fza;
43e65147 4611
99c513f6
DD
4612 }
4613 break;
4614 case 0xa1:
4615 case 0xa3:
4616 case 0xa5:
4617 case 0xa7:
4618 {
4619 /** 1010 0rg1 incw %0 */
0952813b 4620#line 601 "rl78-decode.opc"
99c513f6
DD
4621 int rg AU = (op[0] >> 1) & 0x03;
4622 if (trace)
4623 {
4624 printf ("\033[33m%s\033[0m %02x\n",
4625 "/** 1010 0rg1 incw %0 */",
4626 op[0]);
4627 printf (" rg = 0x%x\n", rg);
4628 }
4629 SYNTAX("incw %0");
0952813b 4630#line 601 "rl78-decode.opc"
99c513f6 4631 ID(add); W(); DRW(rg); SC(1);
43e65147 4632
99c513f6
DD
4633 }
4634 break;
4635 case 0xa2:
4636 {
1d43092d 4637 /** 1010 0010 incw %e!0 */
99c513f6
DD
4638 if (trace)
4639 {
4640 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4641 "/** 1010 0010 incw %e!0 */",
99c513f6
DD
4642 op[0]);
4643 }
1d43092d 4644 SYNTAX("incw %e!0");
0952813b 4645#line 595 "rl78-decode.opc"
99c513f6 4646 ID(add); W(); DM(None, IMMU(2)); SC(1);
43e65147 4647
99c513f6
DD
4648 }
4649 break;
4650 case 0xa4:
4651 {
4652 /** 1010 0100 inc %0 */
4653 if (trace)
4654 {
4655 printf ("\033[33m%s\033[0m %02x\n",
4656 "/** 1010 0100 inc %0 */",
4657 op[0]);
4658 }
4659 SYNTAX("inc %0");
0952813b 4660#line 590 "rl78-decode.opc"
99c513f6 4661 ID(add); DM(None, SADDR); SC(1); Fza;
43e65147 4662
99c513f6 4663 /*----------------------------------------------------------------------*/
43e65147 4664
99c513f6
DD
4665 }
4666 break;
4667 case 0xa6:
4668 {
4669 /** 1010 0110 incw %0 */
4670 if (trace)
4671 {
4672 printf ("\033[33m%s\033[0m %02x\n",
4673 "/** 1010 0110 incw %0 */",
4674 op[0]);
4675 }
4676 SYNTAX("incw %0");
0952813b 4677#line 604 "rl78-decode.opc"
99c513f6 4678 ID(add); W(); DM(None, SADDR); SC(1);
43e65147 4679
99c513f6 4680 /*----------------------------------------------------------------------*/
43e65147 4681
99c513f6
DD
4682 }
4683 break;
4684 case 0xa8:
4685 {
02f12cd4 4686 /** 1010 1000 movw %0, %a1 */
99c513f6
DD
4687 if (trace)
4688 {
4689 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4690 "/** 1010 1000 movw %0, %a1 */",
99c513f6
DD
4691 op[0]);
4692 }
02f12cd4 4693 SYNTAX("movw %0, %a1");
0952813b 4694#line 850 "rl78-decode.opc"
99c513f6 4695 ID(mov); W(); DR(AX); SM(SP, IMMU(1));
43e65147 4696
99c513f6
DD
4697 }
4698 break;
4699 case 0xa9:
4700 {
1d43092d 4701 /** 1010 1001 movw %0, %e1 */
99c513f6
DD
4702 if (trace)
4703 {
4704 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4705 "/** 1010 1001 movw %0, %e1 */",
99c513f6
DD
4706 op[0]);
4707 }
1d43092d 4708 SYNTAX("movw %0, %e1");
0952813b 4709#line 838 "rl78-decode.opc"
99c513f6 4710 ID(mov); W(); DR(AX); SM(DE, 0);
43e65147 4711
99c513f6
DD
4712 }
4713 break;
4714 case 0xaa:
4715 {
1eac08cc 4716 /** 1010 1010 movw %0, %ea1 */
99c513f6
DD
4717 if (trace)
4718 {
4719 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4720 "/** 1010 1010 movw %0, %ea1 */",
99c513f6
DD
4721 op[0]);
4722 }
c2f28758 4723 SYNTAX("movw %0, %ea1");
0952813b 4724#line 841 "rl78-decode.opc"
99c513f6 4725 ID(mov); W(); DR(AX); SM(DE, IMMU(1));
43e65147 4726
99c513f6
DD
4727 }
4728 break;
4729 case 0xab:
4730 {
1d43092d 4731 /** 1010 1011 movw %0, %e1 */
99c513f6
DD
4732 if (trace)
4733 {
4734 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4735 "/** 1010 1011 movw %0, %e1 */",
99c513f6
DD
4736 op[0]);
4737 }
1d43092d 4738 SYNTAX("movw %0, %e1");
0952813b 4739#line 844 "rl78-decode.opc"
99c513f6 4740 ID(mov); W(); DR(AX); SM(HL, 0);
43e65147 4741
99c513f6
DD
4742 }
4743 break;
4744 case 0xac:
4745 {
0952813b 4746 /** 1010 1100 movw %0, %ea1 */
99c513f6
DD
4747 if (trace)
4748 {
4749 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4750 "/** 1010 1100 movw %0, %ea1 */",
99c513f6
DD
4751 op[0]);
4752 }
90092e73 4753 SYNTAX("movw %0, %ea1");
0952813b 4754#line 847 "rl78-decode.opc"
99c513f6 4755 ID(mov); W(); DR(AX); SM(HL, IMMU(1));
43e65147 4756
99c513f6
DD
4757 }
4758 break;
4759 case 0xad:
4760 {
4761 /** 1010 1101 movw %0, %1 */
4762 if (trace)
4763 {
4764 printf ("\033[33m%s\033[0m %02x\n",
4765 "/** 1010 1101 movw %0, %1 */",
4766 op[0]);
4767 }
4768 SYNTAX("movw %0, %1");
0952813b 4769#line 880 "rl78-decode.opc"
99c513f6 4770 ID(mov); W(); DR(AX); SM(None, SADDR);
43e65147 4771
99c513f6
DD
4772 }
4773 break;
4774 case 0xae:
4775 {
4776 /** 1010 1110 movw %0, %s1 */
4777 if (trace)
4778 {
4779 printf ("\033[33m%s\033[0m %02x\n",
4780 "/** 1010 1110 movw %0, %s1 */",
4781 op[0]);
4782 }
4783 SYNTAX("movw %0, %s1");
0952813b 4784#line 883 "rl78-decode.opc"
99c513f6 4785 ID(mov); W(); DR(AX); SM(None, SFR);
43e65147 4786
99c513f6
DD
4787 }
4788 break;
4789 case 0xaf:
4790 {
1d43092d 4791 /** 1010 1111 movw %0, %e!1 */
99c513f6
DD
4792 if (trace)
4793 {
4794 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4795 "/** 1010 1111 movw %0, %e!1 */",
99c513f6
DD
4796 op[0]);
4797 }
1d43092d 4798 SYNTAX("movw %0, %e!1");
0952813b 4799#line 834 "rl78-decode.opc"
99c513f6 4800 ID(mov); W(); DR(AX); SM(None, IMMU(2));
43e65147
L
4801
4802
99c513f6
DD
4803 }
4804 break;
4805 case 0xb0:
4806 {
1d43092d 4807 /** 1011 0000 dec %e!0 */
99c513f6
DD
4808 if (trace)
4809 {
4810 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4811 "/** 1011 0000 dec %e!0 */",
99c513f6
DD
4812 op[0]);
4813 }
1d43092d 4814 SYNTAX("dec %e!0");
0952813b 4815#line 548 "rl78-decode.opc"
99c513f6 4816 ID(sub); DM(None, IMMU(2)); SC(1); Fza;
43e65147 4817
99c513f6
DD
4818 }
4819 break;
4820 case 0xb1:
4821 case 0xb3:
4822 case 0xb5:
4823 case 0xb7:
4824 {
4825 /** 1011 0rg1 decw %0 */
0952813b 4826#line 568 "rl78-decode.opc"
99c513f6
DD
4827 int rg AU = (op[0] >> 1) & 0x03;
4828 if (trace)
4829 {
4830 printf ("\033[33m%s\033[0m %02x\n",
4831 "/** 1011 0rg1 decw %0 */",
4832 op[0]);
4833 printf (" rg = 0x%x\n", rg);
4834 }
4835 SYNTAX("decw %0");
0952813b 4836#line 568 "rl78-decode.opc"
99c513f6 4837 ID(sub); W(); DRW(rg); SC(1);
43e65147 4838
99c513f6
DD
4839 }
4840 break;
4841 case 0xb2:
4842 {
1d43092d 4843 /** 1011 0010 decw %e!0 */
99c513f6
DD
4844 if (trace)
4845 {
4846 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4847 "/** 1011 0010 decw %e!0 */",
99c513f6
DD
4848 op[0]);
4849 }
1d43092d 4850 SYNTAX("decw %e!0");
0952813b 4851#line 562 "rl78-decode.opc"
99c513f6 4852 ID(sub); W(); DM(None, IMMU(2)); SC(1);
43e65147 4853
99c513f6
DD
4854 }
4855 break;
4856 case 0xb4:
4857 {
4858 /** 1011 0100 dec %0 */
4859 if (trace)
4860 {
4861 printf ("\033[33m%s\033[0m %02x\n",
4862 "/** 1011 0100 dec %0 */",
4863 op[0]);
4864 }
4865 SYNTAX("dec %0");
0952813b 4866#line 557 "rl78-decode.opc"
99c513f6 4867 ID(sub); DM(None, SADDR); SC(1); Fza;
43e65147 4868
99c513f6 4869 /*----------------------------------------------------------------------*/
43e65147 4870
99c513f6
DD
4871 }
4872 break;
4873 case 0xb6:
4874 {
4875 /** 1011 0110 decw %0 */
4876 if (trace)
4877 {
4878 printf ("\033[33m%s\033[0m %02x\n",
4879 "/** 1011 0110 decw %0 */",
4880 op[0]);
4881 }
4882 SYNTAX("decw %0");
0952813b 4883#line 571 "rl78-decode.opc"
99c513f6 4884 ID(sub); W(); DM(None, SADDR); SC(1);
43e65147 4885
99c513f6 4886 /*----------------------------------------------------------------------*/
43e65147 4887
99c513f6
DD
4888 }
4889 break;
4890 case 0xb8:
4891 {
02f12cd4 4892 /** 1011 1000 movw %a0, %1 */
99c513f6
DD
4893 if (trace)
4894 {
4895 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4896 "/** 1011 1000 movw %a0, %1 */",
99c513f6
DD
4897 op[0]);
4898 }
02f12cd4 4899 SYNTAX("movw %a0, %1");
0952813b 4900#line 831 "rl78-decode.opc"
99c513f6 4901 ID(mov); W(); DM(SP, IMMU(1)); SR(AX);
43e65147 4902
99c513f6
DD
4903 }
4904 break;
4905 case 0xb9:
4906 {
1d43092d 4907 /** 1011 1001 movw %e0, %1 */
99c513f6
DD
4908 if (trace)
4909 {
4910 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4911 "/** 1011 1001 movw %e0, %1 */",
99c513f6
DD
4912 op[0]);
4913 }
1d43092d 4914 SYNTAX("movw %e0, %1");
0952813b 4915#line 819 "rl78-decode.opc"
99c513f6 4916 ID(mov); W(); DM(DE, 0); SR(AX);
43e65147 4917
99c513f6
DD
4918 }
4919 break;
4920 case 0xba:
4921 {
1eac08cc 4922 /** 1011 1010 movw %ea0, %1 */
99c513f6
DD
4923 if (trace)
4924 {
4925 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4926 "/** 1011 1010 movw %ea0, %1 */",
99c513f6
DD
4927 op[0]);
4928 }
c2f28758 4929 SYNTAX("movw %ea0, %1");
0952813b 4930#line 822 "rl78-decode.opc"
99c513f6 4931 ID(mov); W(); DM(DE, IMMU(1)); SR(AX);
43e65147 4932
99c513f6
DD
4933 }
4934 break;
4935 case 0xbb:
4936 {
1d43092d 4937 /** 1011 1011 movw %e0, %1 */
99c513f6
DD
4938 if (trace)
4939 {
4940 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4941 "/** 1011 1011 movw %e0, %1 */",
99c513f6
DD
4942 op[0]);
4943 }
1d43092d 4944 SYNTAX("movw %e0, %1");
0952813b 4945#line 825 "rl78-decode.opc"
99c513f6 4946 ID(mov); W(); DM(HL, 0); SR(AX);
43e65147 4947
99c513f6
DD
4948 }
4949 break;
4950 case 0xbc:
4951 {
0952813b 4952 /** 1011 1100 movw %ea0, %1 */
99c513f6
DD
4953 if (trace)
4954 {
4955 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4956 "/** 1011 1100 movw %ea0, %1 */",
99c513f6
DD
4957 op[0]);
4958 }
90092e73 4959 SYNTAX("movw %ea0, %1");
0952813b 4960#line 828 "rl78-decode.opc"
99c513f6 4961 ID(mov); W(); DM(HL, IMMU(1)); SR(AX);
43e65147 4962
99c513f6
DD
4963 }
4964 break;
4965 case 0xbd:
4966 {
4967 /** 1011 1101 movw %0, %1 */
4968 if (trace)
4969 {
4970 printf ("\033[33m%s\033[0m %02x\n",
4971 "/** 1011 1101 movw %0, %1 */",
4972 op[0]);
4973 }
4974 SYNTAX("movw %0, %1");
0952813b 4975#line 895 "rl78-decode.opc"
99c513f6 4976 ID(mov); W(); DM(None, SADDR); SR(AX);
43e65147 4977
99c513f6
DD
4978 }
4979 break;
4980 case 0xbe:
4981 {
46662804 4982 /** 1011 1110 movw %s0, %1 */
99c513f6
DD
4983 if (trace)
4984 {
4985 printf ("\033[33m%s\033[0m %02x\n",
46662804 4986 "/** 1011 1110 movw %s0, %1 */",
99c513f6
DD
4987 op[0]);
4988 }
46662804 4989 SYNTAX("movw %s0, %1");
0952813b 4990#line 901 "rl78-decode.opc"
99c513f6 4991 ID(mov); W(); DM(None, SFR); SR(AX);
43e65147 4992
99c513f6 4993 /*----------------------------------------------------------------------*/
43e65147 4994
99c513f6
DD
4995 }
4996 break;
4997 case 0xbf:
4998 {
1d43092d 4999 /** 1011 1111 movw %e!0, %1 */
99c513f6
DD
5000 if (trace)
5001 {
5002 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5003 "/** 1011 1111 movw %e!0, %1 */",
99c513f6
DD
5004 op[0]);
5005 }
1d43092d 5006 SYNTAX("movw %e!0, %1");
0952813b 5007#line 816 "rl78-decode.opc"
99c513f6 5008 ID(mov); W(); DM(None, IMMU(2)); SR(AX);
43e65147 5009
99c513f6
DD
5010 }
5011 break;
5012 case 0xc0:
5013 case 0xc2:
5014 case 0xc4:
5015 case 0xc6:
5016 {
5017 /** 1100 0rg0 pop %0 */
1eac08cc 5018#line 986 "rl78-decode.opc"
99c513f6
DD
5019 int rg AU = (op[0] >> 1) & 0x03;
5020 if (trace)
5021 {
5022 printf ("\033[33m%s\033[0m %02x\n",
5023 "/** 1100 0rg0 pop %0 */",
5024 op[0]);
5025 printf (" rg = 0x%x\n", rg);
5026 }
5027 SYNTAX("pop %0");
1eac08cc 5028#line 986 "rl78-decode.opc"
99c513f6 5029 ID(mov); W(); DRW(rg); SPOP();
43e65147 5030
99c513f6
DD
5031 }
5032 break;
5033 case 0xc1:
5034 case 0xc3:
5035 case 0xc5:
5036 case 0xc7:
5037 {
5038 /** 1100 0rg1 push %1 */
1eac08cc 5039#line 994 "rl78-decode.opc"
99c513f6
DD
5040 int rg AU = (op[0] >> 1) & 0x03;
5041 if (trace)
5042 {
5043 printf ("\033[33m%s\033[0m %02x\n",
5044 "/** 1100 0rg1 push %1 */",
5045 op[0]);
5046 printf (" rg = 0x%x\n", rg);
5047 }
5048 SYNTAX("push %1");
1eac08cc 5049#line 994 "rl78-decode.opc"
99c513f6 5050 ID(mov); W(); DPUSH(); SRW(rg);
43e65147 5051
99c513f6
DD
5052 }
5053 break;
5054 case 0xc8:
5055 {
02f12cd4 5056 /** 1100 1000 mov %a0, #%1 */
99c513f6
DD
5057 if (trace)
5058 {
5059 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 5060 "/** 1100 1000 mov %a0, #%1 */",
99c513f6
DD
5061 op[0]);
5062 }
02f12cd4 5063 SYNTAX("mov %a0, #%1");
0952813b 5064#line 639 "rl78-decode.opc"
99c513f6 5065 ID(mov); DM(SP, IMMU(1)); SC(IMMU(1));
43e65147 5066
99c513f6
DD
5067 }
5068 break;
5069 case 0xc9:
5070 {
5071 /** 1100 1001 movw %0, #%1 */
5072 if (trace)
5073 {
5074 printf ("\033[33m%s\033[0m %02x\n",
5075 "/** 1100 1001 movw %0, #%1 */",
5076 op[0]);
5077 }
5078 SYNTAX("movw %0, #%1");
0952813b 5079#line 892 "rl78-decode.opc"
99c513f6 5080 ID(mov); W(); DM(None, SADDR); SC(IMMU(2));
43e65147 5081
99c513f6
DD
5082 }
5083 break;
5084 case 0xca:
5085 {
c2f28758 5086 /** 1100 1010 mov %ea0, #%1 */
99c513f6
DD
5087 if (trace)
5088 {
5089 printf ("\033[33m%s\033[0m %02x\n",
c2f28758 5090 "/** 1100 1010 mov %ea0, #%1 */",
99c513f6
DD
5091 op[0]);
5092 }
c2f28758 5093 SYNTAX("mov %ea0, #%1");
0952813b 5094#line 618 "rl78-decode.opc"
99c513f6 5095 ID(mov); DM(DE, IMMU(1)); SC(IMMU(1));
43e65147 5096
99c513f6
DD
5097 }
5098 break;
5099 case 0xcb:
5100 {
46662804 5101 /** 1100 1011 movw %s0, #%1 */
99c513f6
DD
5102 if (trace)
5103 {
5104 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 5105 "/** 1100 1011 movw %s0, #%1 */",
99c513f6
DD
5106 op[0]);
5107 }
46662804 5108 SYNTAX("movw %s0, #%1");
0952813b 5109#line 898 "rl78-decode.opc"
99c513f6 5110 ID(mov); W(); DM(None, SFR); SC(IMMU(2));
43e65147 5111
99c513f6
DD
5112 }
5113 break;
5114 case 0xcc:
5115 {
90092e73 5116 /** 1100 1100 mov %ea0, #%1 */
99c513f6
DD
5117 if (trace)
5118 {
5119 printf ("\033[33m%s\033[0m %02x\n",
90092e73 5120 "/** 1100 1100 mov %ea0, #%1 */",
99c513f6
DD
5121 op[0]);
5122 }
90092e73 5123 SYNTAX("mov %ea0, #%1");
0952813b 5124#line 630 "rl78-decode.opc"
99c513f6 5125 ID(mov); DM(HL, IMMU(1)); SC(IMMU(1));
43e65147 5126
99c513f6
DD
5127 }
5128 break;
5129 case 0xcd:
5130 {
5131 /** 1100 1101 mov %0, #%1 */
5132 if (trace)
5133 {
5134 printf ("\033[33m%s\033[0m %02x\n",
5135 "/** 1100 1101 mov %0, #%1 */",
5136 op[0]);
5137 }
5138 SYNTAX("mov %0, #%1");
0952813b 5139#line 744 "rl78-decode.opc"
99c513f6 5140 ID(mov); DM(None, SADDR); SC(IMMU(1));
43e65147 5141
99c513f6
DD
5142 }
5143 break;
5144 case 0xce:
5145 {
5146 /** 1100 1110 mov %s0, #%1 */
5147 if (trace)
5148 {
5149 printf ("\033[33m%s\033[0m %02x\n",
5150 "/** 1100 1110 mov %s0, #%1 */",
5151 op[0]);
5152 }
5153 SYNTAX("mov %s0, #%1");
0952813b 5154#line 750 "rl78-decode.opc"
99c513f6
DD
5155 op0 = SFR;
5156 op1 = IMMU(1);
5157 ID(mov); DM(None, op0); SC(op1);
0952813b 5158 if (op0 == 0xffffb && isa == RL78_ISA_G14)
99c513f6
DD
5159 switch (op1)
5160 {
5161 case 0x01:
5162 rl78->syntax = "mulhu"; ID(mulhu);
5163 break;
5164 case 0x02:
5165 rl78->syntax = "mulh"; ID(mulh);
5166 break;
5167 case 0x03:
5168 rl78->syntax = "divhu"; ID(divhu);
5169 break;
5170 case 0x04:
151fa98f 5171 rl78->syntax = "divwu <old-encoding>"; ID(divwu);
99c513f6
DD
5172 break;
5173 case 0x05:
5174 rl78->syntax = "machu"; ID(machu);
5175 break;
5176 case 0x06:
5177 rl78->syntax = "mach"; ID(mach);
5178 break;
151fa98f
NC
5179 case 0x0b:
5180 rl78->syntax = "divwu"; ID(divwu);
5181 break;
99c513f6 5182 }
43e65147 5183
c7570fcd 5184 }
99c513f6
DD
5185 break;
5186 case 0xcf:
5187 {
1d43092d 5188 /** 1100 1111 mov %e!0, #%1 */
99c513f6
DD
5189 if (trace)
5190 {
5191 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5192 "/** 1100 1111 mov %e!0, #%1 */",
99c513f6
DD
5193 op[0]);
5194 }
1d43092d 5195 SYNTAX("mov %e!0, #%1");
0952813b 5196#line 609 "rl78-decode.opc"
99c513f6 5197 ID(mov); DM(None, IMMU(2)); SC(IMMU(1));
43e65147 5198
99c513f6
DD
5199 }
5200 break;
5201 case 0xd0:
5202 case 0xd1:
5203 case 0xd2:
5204 case 0xd3:
5205 {
5206 /** 1101 00rg cmp0 %0 */
0952813b 5207#line 518 "rl78-decode.opc"
99c513f6
DD
5208 int rg AU = op[0] & 0x03;
5209 if (trace)
5210 {
5211 printf ("\033[33m%s\033[0m %02x\n",
5212 "/** 1101 00rg cmp0 %0 */",
5213 op[0]);
5214 printf (" rg = 0x%x\n", rg);
5215 }
5216 SYNTAX("cmp0 %0");
0952813b 5217#line 518 "rl78-decode.opc"
99c513f6 5218 ID(cmp); DRB(rg); SC(0); Fzac;
43e65147 5219
99c513f6
DD
5220 }
5221 break;
5222 case 0xd4:
5223 {
5224 /** 1101 0100 cmp0 %0 */
5225 if (trace)
5226 {
5227 printf ("\033[33m%s\033[0m %02x\n",
5228 "/** 1101 0100 cmp0 %0 */",
5229 op[0]);
5230 }
5231 SYNTAX("cmp0 %0");
0952813b 5232#line 521 "rl78-decode.opc"
99c513f6 5233 ID(cmp); DM(None, SADDR); SC(0); Fzac;
43e65147 5234
99c513f6 5235 /*----------------------------------------------------------------------*/
43e65147 5236
99c513f6
DD
5237 }
5238 break;
5239 case 0xd5:
5240 {
1d43092d 5241 /** 1101 0101 cmp0 %e!0 */
99c513f6
DD
5242 if (trace)
5243 {
5244 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5245 "/** 1101 0101 cmp0 %e!0 */",
99c513f6
DD
5246 op[0]);
5247 }
1d43092d 5248 SYNTAX("cmp0 %e!0");
0952813b 5249#line 515 "rl78-decode.opc"
99c513f6 5250 ID(cmp); DM(None, IMMU(2)); SC(0); Fzac;
43e65147 5251
99c513f6
DD
5252 }
5253 break;
5254 case 0xd6:
5255 {
5256 /** 1101 0110 mulu x */
5257 if (trace)
5258 {
5259 printf ("\033[33m%s\033[0m %02x\n",
5260 "/** 1101 0110 mulu x */",
5261 op[0]);
5262 }
5263 SYNTAX("mulu x");
0952813b 5264#line 906 "rl78-decode.opc"
1eac08cc 5265 ID(mulu);
43e65147 5266
99c513f6 5267 /*----------------------------------------------------------------------*/
43e65147 5268
99c513f6
DD
5269 }
5270 break;
5271 case 0xd7:
5272 {
5273 /** 1101 0111 ret */
5274 if (trace)
5275 {
5276 printf ("\033[33m%s\033[0m %02x\n",
5277 "/** 1101 0111 ret */",
5278 op[0]);
5279 }
5280 SYNTAX("ret");
1eac08cc 5281#line 1002 "rl78-decode.opc"
99c513f6 5282 ID(ret);
43e65147 5283
99c513f6
DD
5284 }
5285 break;
5286 case 0xd8:
5287 {
5288 /** 1101 1000 mov %0, %1 */
5289 if (trace)
5290 {
5291 printf ("\033[33m%s\033[0m %02x\n",
5292 "/** 1101 1000 mov %0, %1 */",
5293 op[0]);
5294 }
5295 SYNTAX("mov %0, %1");
0952813b 5296#line 711 "rl78-decode.opc"
99c513f6 5297 ID(mov); DR(X); SM(None, SADDR);
43e65147 5298
99c513f6
DD
5299 }
5300 break;
5301 case 0xd9:
5302 {
1d43092d 5303 /** 1101 1001 mov %0, %e!1 */
99c513f6
DD
5304 if (trace)
5305 {
5306 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5307 "/** 1101 1001 mov %0, %e!1 */",
99c513f6
DD
5308 op[0]);
5309 }
1d43092d 5310 SYNTAX("mov %0, %e!1");
0952813b 5311#line 708 "rl78-decode.opc"
99c513f6 5312 ID(mov); DR(X); SM(None, IMMU(2));
43e65147 5313
99c513f6
DD
5314 }
5315 break;
5316 case 0xda:
5317 case 0xea:
5318 case 0xfa:
5319 {
5320 /** 11ra 1010 movw %0, %1 */
0952813b 5321#line 889 "rl78-decode.opc"
99c513f6
DD
5322 int ra AU = (op[0] >> 4) & 0x03;
5323 if (trace)
5324 {
5325 printf ("\033[33m%s\033[0m %02x\n",
5326 "/** 11ra 1010 movw %0, %1 */",
5327 op[0]);
5328 printf (" ra = 0x%x\n", ra);
5329 }
5330 SYNTAX("movw %0, %1");
0952813b 5331#line 889 "rl78-decode.opc"
99c513f6 5332 ID(mov); W(); DRW(ra); SM(None, SADDR);
43e65147 5333
99c513f6
DD
5334 }
5335 break;
5336 case 0xdb:
5337 case 0xeb:
5338 case 0xfb:
5339 {
1d43092d 5340 /** 11ra 1011 movw %0, %e!1 */
0952813b 5341#line 886 "rl78-decode.opc"
99c513f6
DD
5342 int ra AU = (op[0] >> 4) & 0x03;
5343 if (trace)
5344 {
5345 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5346 "/** 11ra 1011 movw %0, %e!1 */",
99c513f6
DD
5347 op[0]);
5348 printf (" ra = 0x%x\n", ra);
5349 }
4d82fe66 5350 SYNTAX("movw %0, %es!1");
0952813b 5351#line 886 "rl78-decode.opc"
99c513f6 5352 ID(mov); W(); DRW(ra); SM(None, IMMU(2));
43e65147 5353
99c513f6
DD
5354 }
5355 break;
5356 case 0xdc:
5357 {
5358 /** 1101 1100 bc $%a0 */
5359 if (trace)
5360 {
5361 printf ("\033[33m%s\033[0m %02x\n",
5362 "/** 1101 1100 bc $%a0 */",
5363 op[0]);
5364 }
5365 SYNTAX("bc $%a0");
0952813b 5366#line 334 "rl78-decode.opc"
99c513f6 5367 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(C);
43e65147 5368
99c513f6
DD
5369 }
5370 break;
5371 case 0xdd:
5372 {
5373 /** 1101 1101 bz $%a0 */
5374 if (trace)
5375 {
5376 printf ("\033[33m%s\033[0m %02x\n",
5377 "/** 1101 1101 bz $%a0 */",
5378 op[0]);
5379 }
5380 SYNTAX("bz $%a0");
0952813b 5381#line 346 "rl78-decode.opc"
99c513f6 5382 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(Z);
43e65147 5383
99c513f6
DD
5384 }
5385 break;
5386 case 0xde:
5387 {
5388 /** 1101 1110 bnc $%a0 */
5389 if (trace)
5390 {
5391 printf ("\033[33m%s\033[0m %02x\n",
5392 "/** 1101 1110 bnc $%a0 */",
5393 op[0]);
5394 }
5395 SYNTAX("bnc $%a0");
0952813b 5396#line 337 "rl78-decode.opc"
99c513f6 5397 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NC);
43e65147 5398
99c513f6
DD
5399 }
5400 break;
5401 case 0xdf:
5402 {
5403 /** 1101 1111 bnz $%a0 */
5404 if (trace)
5405 {
5406 printf ("\033[33m%s\033[0m %02x\n",
5407 "/** 1101 1111 bnz $%a0 */",
5408 op[0]);
5409 }
5410 SYNTAX("bnz $%a0");
0952813b 5411#line 349 "rl78-decode.opc"
99c513f6 5412 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NZ);
43e65147 5413
99c513f6 5414 /*----------------------------------------------------------------------*/
43e65147 5415
99c513f6
DD
5416 }
5417 break;
5418 case 0xe0:
5419 case 0xe1:
5420 case 0xe2:
5421 case 0xe3:
5422 {
5423 /** 1110 00rg oneb %0 */
1eac08cc 5424#line 924 "rl78-decode.opc"
99c513f6
DD
5425 int rg AU = op[0] & 0x03;
5426 if (trace)
5427 {
5428 printf ("\033[33m%s\033[0m %02x\n",
5429 "/** 1110 00rg oneb %0 */",
5430 op[0]);
5431 printf (" rg = 0x%x\n", rg);
5432 }
5433 SYNTAX("oneb %0");
1eac08cc 5434#line 924 "rl78-decode.opc"
99c513f6 5435 ID(mov); DRB(rg); SC(1);
43e65147 5436
99c513f6
DD
5437 }
5438 break;
5439 case 0xe4:
5440 {
5441 /** 1110 0100 oneb %0 */
5442 if (trace)
5443 {
5444 printf ("\033[33m%s\033[0m %02x\n",
5445 "/** 1110 0100 oneb %0 */",
5446 op[0]);
5447 }
5448 SYNTAX("oneb %0");
1eac08cc 5449#line 927 "rl78-decode.opc"
99c513f6 5450 ID(mov); DM(None, SADDR); SC(1);
43e65147 5451
99c513f6 5452 /*----------------------------------------------------------------------*/
43e65147 5453
99c513f6
DD
5454 }
5455 break;
5456 case 0xe5:
5457 {
1d43092d 5458 /** 1110 0101 oneb %e!0 */
99c513f6
DD
5459 if (trace)
5460 {
5461 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5462 "/** 1110 0101 oneb %e!0 */",
99c513f6
DD
5463 op[0]);
5464 }
1d43092d 5465 SYNTAX("oneb %e!0");
1eac08cc 5466#line 921 "rl78-decode.opc"
99c513f6 5467 ID(mov); DM(None, IMMU(2)); SC(1);
43e65147 5468
99c513f6
DD
5469 }
5470 break;
5471 case 0xe6:
5472 {
5473 /** 1110 0110 onew %0 */
5474 if (trace)
5475 {
5476 printf ("\033[33m%s\033[0m %02x\n",
5477 "/** 1110 0110 onew %0 */",
5478 op[0]);
5479 }
5480 SYNTAX("onew %0");
1eac08cc 5481#line 932 "rl78-decode.opc"
99c513f6 5482 ID(mov); DR(AX); SC(1);
43e65147 5483
99c513f6
DD
5484 }
5485 break;
5486 case 0xe7:
5487 {
5488 /** 1110 0111 onew %0 */
5489 if (trace)
5490 {
5491 printf ("\033[33m%s\033[0m %02x\n",
5492 "/** 1110 0111 onew %0 */",
5493 op[0]);
5494 }
5495 SYNTAX("onew %0");
1eac08cc 5496#line 935 "rl78-decode.opc"
99c513f6 5497 ID(mov); DR(BC); SC(1);
43e65147 5498
99c513f6 5499 /*----------------------------------------------------------------------*/
43e65147 5500
99c513f6
DD
5501 }
5502 break;
5503 case 0xe8:
5504 {
5505 /** 1110 1000 mov %0, %1 */
5506 if (trace)
5507 {
5508 printf ("\033[33m%s\033[0m %02x\n",
5509 "/** 1110 1000 mov %0, %1 */",
5510 op[0]);
5511 }
5512 SYNTAX("mov %0, %1");
0952813b 5513#line 699 "rl78-decode.opc"
99c513f6 5514 ID(mov); DR(B); SM(None, SADDR);
43e65147 5515
99c513f6
DD
5516 }
5517 break;
5518 case 0xe9:
5519 {
1d43092d 5520 /** 1110 1001 mov %0, %e!1 */
99c513f6
DD
5521 if (trace)
5522 {
5523 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5524 "/** 1110 1001 mov %0, %e!1 */",
99c513f6
DD
5525 op[0]);
5526 }
1d43092d 5527 SYNTAX("mov %0, %e!1");
0952813b 5528#line 693 "rl78-decode.opc"
99c513f6 5529 ID(mov); DR(B); SM(None, IMMU(2));
43e65147 5530
99c513f6
DD
5531 }
5532 break;
5533 case 0xec:
5534 {
5535 /** 1110 1100 br !%!a0 */
5536 if (trace)
5537 {
5538 printf ("\033[33m%s\033[0m %02x\n",
5539 "/** 1110 1100 br !%!a0 */",
5540 op[0]);
5541 }
5542 SYNTAX("br !%!a0");
0952813b 5543#line 368 "rl78-decode.opc"
99c513f6 5544 ID(branch); DC(IMMU(3));
43e65147 5545
99c513f6
DD
5546 }
5547 break;
5548 case 0xed:
5549 {
5550 /** 1110 1101 br %!a0 */
5551 if (trace)
5552 {
5553 printf ("\033[33m%s\033[0m %02x\n",
5554 "/** 1110 1101 br %!a0 */",
5555 op[0]);
5556 }
5557 SYNTAX("br %!a0");
0952813b 5558#line 371 "rl78-decode.opc"
99c513f6 5559 ID(branch); DC(IMMU(2));
43e65147 5560
99c513f6
DD
5561 }
5562 break;
5563 case 0xee:
5564 {
5565 /** 1110 1110 br $%!a0 */
5566 if (trace)
5567 {
5568 printf ("\033[33m%s\033[0m %02x\n",
5569 "/** 1110 1110 br $%!a0 */",
5570 op[0]);
5571 }
5572 SYNTAX("br $%!a0");
0952813b 5573#line 374 "rl78-decode.opc"
99c513f6 5574 ID(branch); DC(pc+IMMS(2)+3);
43e65147 5575
99c513f6
DD
5576 }
5577 break;
5578 case 0xef:
5579 {
5580 /** 1110 1111 br $%a0 */
5581 if (trace)
5582 {
5583 printf ("\033[33m%s\033[0m %02x\n",
5584 "/** 1110 1111 br $%a0 */",
5585 op[0]);
5586 }
5587 SYNTAX("br $%a0");
0952813b 5588#line 377 "rl78-decode.opc"
99c513f6 5589 ID(branch); DC(pc+IMMS(1)+2);
43e65147 5590
99c513f6
DD
5591 }
5592 break;
5593 case 0xf0:
5594 case 0xf1:
5595 case 0xf2:
5596 case 0xf3:
5597 {
5598 /** 1111 00rg clrb %0 */
0952813b 5599#line 464 "rl78-decode.opc"
99c513f6
DD
5600 int rg AU = op[0] & 0x03;
5601 if (trace)
5602 {
5603 printf ("\033[33m%s\033[0m %02x\n",
5604 "/** 1111 00rg clrb %0 */",
5605 op[0]);
5606 printf (" rg = 0x%x\n", rg);
5607 }
5608 SYNTAX("clrb %0");
0952813b 5609#line 464 "rl78-decode.opc"
99c513f6 5610 ID(mov); DRB(rg); SC(0);
43e65147 5611
99c513f6
DD
5612 }
5613 break;
5614 case 0xf4:
5615 {
5616 /** 1111 0100 clrb %0 */
5617 if (trace)
5618 {
5619 printf ("\033[33m%s\033[0m %02x\n",
5620 "/** 1111 0100 clrb %0 */",
5621 op[0]);
5622 }
5623 SYNTAX("clrb %0");
0952813b 5624#line 467 "rl78-decode.opc"
99c513f6 5625 ID(mov); DM(None, SADDR); SC(0);
43e65147 5626
99c513f6 5627 /*----------------------------------------------------------------------*/
43e65147 5628
99c513f6
DD
5629 }
5630 break;
5631 case 0xf5:
5632 {
1d43092d 5633 /** 1111 0101 clrb %e!0 */
99c513f6
DD
5634 if (trace)
5635 {
5636 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5637 "/** 1111 0101 clrb %e!0 */",
99c513f6
DD
5638 op[0]);
5639 }
1d43092d 5640 SYNTAX("clrb %e!0");
0952813b 5641#line 461 "rl78-decode.opc"
99c513f6 5642 ID(mov); DM(None, IMMU(2)); SC(0);
43e65147 5643
99c513f6
DD
5644 }
5645 break;
5646 case 0xf6:
5647 {
5648 /** 1111 0110 clrw %0 */
5649 if (trace)
5650 {
5651 printf ("\033[33m%s\033[0m %02x\n",
5652 "/** 1111 0110 clrw %0 */",
5653 op[0]);
5654 }
5655 SYNTAX("clrw %0");
0952813b 5656#line 472 "rl78-decode.opc"
99c513f6 5657 ID(mov); DR(AX); SC(0);
43e65147 5658
99c513f6
DD
5659 }
5660 break;
5661 case 0xf7:
5662 {
5663 /** 1111 0111 clrw %0 */
5664 if (trace)
5665 {
5666 printf ("\033[33m%s\033[0m %02x\n",
5667 "/** 1111 0111 clrw %0 */",
5668 op[0]);
5669 }
5670 SYNTAX("clrw %0");
0952813b 5671#line 475 "rl78-decode.opc"
99c513f6 5672 ID(mov); DR(BC); SC(0);
43e65147 5673
99c513f6 5674 /*----------------------------------------------------------------------*/
43e65147 5675
99c513f6
DD
5676 }
5677 break;
5678 case 0xf8:
5679 {
5680 /** 1111 1000 mov %0, %1 */
5681 if (trace)
5682 {
5683 printf ("\033[33m%s\033[0m %02x\n",
5684 "/** 1111 1000 mov %0, %1 */",
5685 op[0]);
5686 }
5687 SYNTAX("mov %0, %1");
0952813b 5688#line 705 "rl78-decode.opc"
99c513f6 5689 ID(mov); DR(C); SM(None, SADDR);
43e65147 5690
99c513f6
DD
5691 }
5692 break;
5693 case 0xf9:
5694 {
1d43092d 5695 /** 1111 1001 mov %0, %e!1 */
99c513f6
DD
5696 if (trace)
5697 {
5698 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5699 "/** 1111 1001 mov %0, %e!1 */",
99c513f6
DD
5700 op[0]);
5701 }
1d43092d 5702 SYNTAX("mov %0, %e!1");
0952813b 5703#line 702 "rl78-decode.opc"
99c513f6 5704 ID(mov); DR(C); SM(None, IMMU(2));
43e65147 5705
99c513f6
DD
5706 }
5707 break;
5708 case 0xfc:
5709 {
5710 /** 1111 1100 call !%!a0 */
5711 if (trace)
5712 {
5713 printf ("\033[33m%s\033[0m %02x\n",
5714 "/** 1111 1100 call !%!a0 */",
5715 op[0]);
5716 }
5717 SYNTAX("call !%!a0");
0952813b 5718#line 421 "rl78-decode.opc"
99c513f6 5719 ID(call); DC(IMMU(3));
43e65147 5720
99c513f6
DD
5721 }
5722 break;
5723 case 0xfd:
5724 {
5725 /** 1111 1101 call %!a0 */
5726 if (trace)
5727 {
5728 printf ("\033[33m%s\033[0m %02x\n",
5729 "/** 1111 1101 call %!a0 */",
5730 op[0]);
5731 }
5732 SYNTAX("call %!a0");
0952813b 5733#line 424 "rl78-decode.opc"
99c513f6 5734 ID(call); DC(IMMU(2));
43e65147 5735
99c513f6
DD
5736 }
5737 break;
5738 case 0xfe:
5739 {
5740 /** 1111 1110 call $%!a0 */
5741 if (trace)
5742 {
5743 printf ("\033[33m%s\033[0m %02x\n",
5744 "/** 1111 1110 call $%!a0 */",
5745 op[0]);
5746 }
5747 SYNTAX("call $%!a0");
0952813b 5748#line 427 "rl78-decode.opc"
99c513f6 5749 ID(call); DC(pc+IMMS(2)+3);
43e65147 5750
99c513f6
DD
5751 }
5752 break;
5753 case 0xff:
5754 {
5755 /** 1111 1111 brk1 */
5756 if (trace)
5757 {
5758 printf ("\033[33m%s\033[0m %02x\n",
5759 "/** 1111 1111 brk1 */",
5760 op[0]);
5761 }
5762 SYNTAX("brk1");
0952813b 5763#line 385 "rl78-decode.opc"
99c513f6 5764 ID(break);
43e65147 5765
99c513f6
DD
5766 }
5767 break;
5768 }
1eac08cc 5769#line 1290 "rl78-decode.opc"
99c513f6
DD
5770
5771 return rl78->n_bytes;
5772}
This page took 0.563112 seconds and 4 git commands to generate.