2 * Copyright (C) 1996-1998 Szeredi Miklos
3 * Email: mszeredi@inf.bme.hu
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. See the file COPYING.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #define ARIR(arin, func, an, rn, r, n) \
28 OPDEF(arin ## _ ## rn, 0x80+an*8+n) \
34 #define ARIIHL(arin, func, an) \
35 OPDEF(arin ## _ihl, 0x86+an*8) \
41 #define ARIID(arin, func, an, ixyn, ixy) \
42 OPDEF(arin ## _i ## ixyn ## d, 0x86+an*8)\
44 register dbyte addr; \
53 #define ADD_A_R(rn, r, n) ARIR(add_a, ADD, 0, rn, r, n)
54 #define ADC_A_R(rn, r, n) ARIR(adc_a, ADC, 1, rn, r, n)
55 #define SUB_R(rn, r, n) ARIR(sub, SUB, 2, rn, r, n)
56 #define SBC_A_R(rn, r, n) ARIR(sbc_a, SBC, 3, rn, r, n)
57 #define AND_R(rn, r, n) ARIR(and, AND, 4, rn, r, n)
58 #define XOR_R(rn, r, n) ARIR(xor, XOR, 5, rn, r, n)
59 #define OR_R(rn, r, n) ARIR(or, OR, 6, rn, r, n)
60 #define CP_R(rn, r, n) ARIR(cp, CP, 7, rn, r, n)
108 /* XOR_R(a, RA, 7) */
113 RF
= (RF
& ~(ALLF
)) | (ZF
| PVF
);
133 ARIIHL(add_a
, ADD
, 0)
134 ARIIHL(adc_a
, ADC
, 1)
136 ARIIHL(sbc_a
, SBC
, 3)
142 #include "z80_op3x.c"