339
|
1 /*
|
|
2 instab.h
|
|
3 Copyright © 2008 William Astle
|
|
4
|
|
5 This file is part of LWASM.
|
|
6
|
|
7 LWASM is free software: you can redistribute it and/or modify it under the
|
|
8 terms of the GNU General Public License as published by the Free Software
|
|
9 Foundation, either version 3 of the License, or (at your option) any later
|
|
10 version.
|
|
11
|
|
12 This program is distributed in the hope that it will be useful, but WITHOUT
|
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
15 more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License along with
|
|
18 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
|
20
|
|
21 Contains definitions for the instruction table
|
|
22 */
|
|
23
|
|
24 #ifndef __instab_h_seen__
|
|
25 #define __instab_h_seen__
|
|
26
|
|
27 #include "lwasm.h"
|
|
28
|
|
29 typedef struct
|
|
30 {
|
|
31 char *opcode; /* the mneumonic */
|
|
32 int ops[4]; /* opcode values for up to four addr modes */
|
|
33 void (*fn)(asmstate_t *as, lwasm_line_t *l, char **optr, int opnum);
|
|
34 int iscond; /* set if this should be dispatched even if skipping a condition/macro */
|
|
35 int endm; /* end of macro? */
|
|
36 int setsym; /* does this set a symbol address? EQU, SET */
|
|
37 int is6309; /* is this 6309 only? */
|
|
38 } instab_t;
|
|
39
|
|
40 #define OPFUNC(fn) void (fn)(asmstate_t *as, lwasm_line_t *l, char **p, int opnum)
|
|
41
|
|
42 #ifndef __instab_c_seen__
|
|
43 extern instab_t instab[];
|
|
44 #endif //__instab_c_seen__
|
|
45
|
|
46 #endif //__instab_h_seen__
|