4 * Copyright (C) 1989-2009 Alan R. Baldwin
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * Extensions: P. Felber
53 * Indirect Addressing delimeters
72 #define X 8 /* for ZXN pop x */
73 #define MB 9 /* for eZ80 */
84 * Conditional definitions
124 * Undocumented instructions
128 #define S_RL_UNDOCD 59
163 * HD64180 Instructions
173 * Processor Types (S_CPU)
182 * Z80-ZX Next Instructions
184 #define X_ZXN_INH2 100
185 #define X_ZXN_MUL 101
186 #define X_ZXN_MIRROR 102
187 #define X_ZXN_NEXTREG 103
188 #define X_ZXN_CU_WAIT 104
189 #define X_ZXN_CU_MOVE 105
190 #define X_ZXN_CU_STOP 106
191 #define X_ZXN_CU_NOP 107
197 #define X_EZ_INH2 111
202 * R800/Z280 Instructions
204 #define X_Z280_MULTU 120
205 #define X_Z280_MULTUW 121
208 * eZ80 specific addressing extensions (used in mne m_flag)
214 #define M_LIL (M_L | M_IL)
215 #define M_LIS (M_L | M_IS)
216 #define M_SIL (M_S | M_IL)
217 #define M_SIS (M_S | M_IS)
220 * Extended Addressing Modes
222 #define R_ADL 0x0000 /* 24-Bit Addressing Mode */
223 #define R_Z80 0x0100 /* 16-Bit Addressing Mode */
224 #define R_3BIT 0x0200 /* 3-Bit Addressing Mode */
228 char a_str
[4]; /* addressing string */
229 int a_val
; /* addressing mode value */
232 extern struct adsym R8
[];
233 extern struct adsym R8X
[];
234 extern struct adsym R8U1
[];
235 extern struct adsym R8U2
[];
237 extern struct adsym R16
[];
238 extern struct adsym R16X
[];
239 extern struct adsym R8MB
[];
240 extern struct adsym RX
[];
241 extern struct adsym CND
[];
243 /* machine dependent functions */
248 extern int addr(struct expr
*esp
);
249 extern int admode(struct adsym
*sp
);
250 extern int srch(char *str
);
253 extern int genop(int pop
, int op
, struct expr
*esp
, int f
);
254 extern int gixiy(int v
);
255 extern VOID
glilsis(int sfx
, struct expr
*esp
);
256 extern VOID
machine(struct mne
*mp
);
257 extern int mchpcr(struct expr
*esp
);
258 extern VOID
minit(void);
270 extern VOID
glilsis();
271 extern VOID
machine();