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.
31 nn
= (DANM(tc
) - 1) / 4 + 1;
38 #define LD_R_R(rdn, rsn, rd, rs, n1, n2) \
39 OPDEF(ld_ ## rdn ## _ ## rsn, 0x40 + n1 * 8 + n2) \
47 #define LD_NOOP(rsd, n) \
48 OPDEF(ld_ ## rsd ## _ ## rsd, 0x40 + n * 8 + n) \
63 LD_R_R(b
, c
, RB
, RC
, 0, 1)
64 LD_R_R(b
, d
, RB
, RD
, 0, 2)
65 LD_R_R(b
, e
, RB
, RE
, 0, 3)
66 LD_R_R(b
, h
, RB
, RH
, 0, 4)
67 LD_R_R(b
, l
, RB
, RL
, 0, 5)
68 LD_R_R(b
, a
, RB
, RA
, 0, 7)
70 LD_R_R(c
, b
, RC
, RB
, 1, 0)
71 LD_R_R(c
, d
, RC
, RD
, 1, 2)
72 LD_R_R(c
, e
, RC
, RE
, 1, 3)
73 LD_R_R(c
, h
, RC
, RH
, 1, 4)
74 LD_R_R(c
, l
, RC
, RL
, 1, 5)
75 LD_R_R(c
, a
, RC
, RA
, 1, 7)
77 LD_R_R(d
, b
, RD
, RB
, 2, 0)
78 LD_R_R(d
, c
, RD
, RC
, 2, 1)
79 LD_R_R(d
, e
, RD
, RE
, 2, 3)
80 LD_R_R(d
, h
, RD
, RH
, 2, 4)
81 LD_R_R(d
, l
, RD
, RL
, 2, 5)
82 LD_R_R(d
, a
, RD
, RA
, 2, 7)
85 LD_R_R(e
, b
, RE
, RB
, 3, 0)
86 LD_R_R(e
, c
, RE
, RC
, 3, 1)
87 LD_R_R(e
, d
, RE
, RD
, 3, 2)
88 LD_R_R(e
, h
, RE
, RH
, 3, 4)
89 LD_R_R(e
, l
, RE
, RL
, 3, 5)
90 LD_R_R(e
, a
, RE
, RA
, 3, 7)
92 LD_R_R(h
, b
, RH
, RB
, 4, 0)
93 LD_R_R(h
, c
, RH
, RC
, 4, 1)
94 LD_R_R(h
, d
, RH
, RD
, 4, 2)
95 LD_R_R(h
, e
, RH
, RE
, 4, 3)
96 LD_R_R(h
, l
, RH
, RL
, 4, 5)
97 LD_R_R(h
, a
, RH
, RA
, 4, 7)
99 LD_R_R(l
, b
, RL
, RB
, 5, 0)
100 LD_R_R(l
, c
, RL
, RC
, 5, 1)
101 LD_R_R(l
, d
, RL
, RD
, 5, 2)
102 LD_R_R(l
, e
, RL
, RE
, 5, 3)
103 LD_R_R(l
, h
, RL
, RH
, 5, 4)
104 LD_R_R(l
, a
, RL
, RA
, 5, 7)
106 LD_R_R(a
, b
, RA
, RB
, 7, 0)
107 LD_R_R(a
, c
, RA
, RC
, 7, 1)
108 LD_R_R(a
, d
, RA
, RD
, 7, 2)
109 LD_R_R(a
, e
, RA
, RE
, 7, 3)
110 LD_R_R(a
, h
, RA
, RH
, 7, 4)
111 LD_R_R(a
, l
, RA
, RL
, 7, 5)
114 #define LD_R_IHL(rdn, rd, n) \
115 OPDEF(ld_ ## rdn ## _ihl, 0x46+n*8) \
121 #define LD_R_ID(ixyn, ixy, rsn, rs, n) \
122 OPDEF(ld_ ## rsn ## _i ## ixyn ## d, 0x46+n*8) \
124 register dbyte addr; \
139 #define LD_IHL_R(rsn, rs, n) \
140 OPDEF(ld_ihl_ ## rsn, 0x70+n) \
142 PUTMEM(HL, HLP, rs); \
146 #define LD_ID_R(ixyn, ixy, rsn, rs, n) \
147 OPDEF(ld_i ## ixyn ## d_ ## rsn, 0x70+n) \
149 register dbyte addr; \
165 #include "z80_op2x.c"