Mercurial > hg-old > index.cgi
annotate src/instab.h @ 8:f1df096aa76f 1.1
Tagged 1.1 bugfix release
author | lost |
---|---|
date | Sun, 04 Jan 2009 05:46:07 +0000 |
parents | 34568fab6058 |
children | 05d4115b4860 |
rev | line source |
---|---|
0 | 1 /* |
4
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
2 instab.h |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
3 Copyright © 2008 William Astle |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
4 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
5 This file is part of LWASM. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
6 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
7 LWASM is free software: you can redistribute it and/or modify it under the |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
8 terms of the GNU General Public License as published by the Free Software |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
9 Foundation, either version 3 of the License, or (at your option) any later |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
10 version. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
11 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
12 This program is distributed in the hope that it will be useful, but WITHOUT |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
15 more details. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
16 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
17 You should have received a copy of the GNU General Public License along with |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
18 this program. If not, see <http://www.gnu.org/licenses/>. |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
19 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
20 |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
21 Contains definitions for the instruction table |
34568fab6058
Fixed package to include all required files; also added copyright preamble to all source files
lost
parents:
0
diff
changeset
|
22 */ |
0 | 23 |
24 #include "lwasm.h" | |
25 | |
26 #ifndef __instab_h_seen__ | |
27 #define __instab_h_seen__ | |
28 | |
29 #define INSTYPE_INH 0 /* inherent addressing */ | |
30 #define INSTYPE_GEN 1 /* general addressing modes */ | |
31 #define INSTYPE_GEN8 2 /* general addressing, 8 bit immed */ | |
32 #define INSTYPE_GENNOIMM 3 /* no immediate addressing */ | |
33 #define INSTYPE_RTOR 4 /* register to register */ | |
34 #define INSTYPE_RLIST 5 /* register list */ | |
35 #define INSTYPE_REL8 6 /* relative addressing */ | |
36 #define INSTYPE_REL16 7 /* 16 bit relative addressing */ | |
37 #define INSTYPE_INDEX 8 /* indexed mode only */ | |
38 #define INSTYPE_IMM8 9 /* immediate only 8 bit (andcc, cwai) */ | |
39 #define INSTYPE_LOGICMEM 10 /* aim/oim/eim/tim */ | |
40 #define INSTYPE_BITBIT 11 /* bit to bit ops */ | |
41 #define INSTYPE_TFM 12 /* TFM ops */ | |
42 #define INSTYPE_GEN32 13 /* general addressing, 32 bit immed */ | |
43 #define INSTYPE_PSEUDO 14 /* special handling, pseudo op */ | |
44 | |
45 #define SPECIAL_EQU 1 /* equ */ | |
46 #define SPECIAL_ORG 2 /* org */ | |
47 #define SPECIAL_SETDP 3 | |
48 #define SPECIAL_FCB 4 | |
49 #define SPECIAL_FDB 5 | |
50 #define SPECIAL_FQB 6 | |
51 #define SPECIAL_FCC 7 | |
52 #define SPECIAL_FCS 8 | |
53 #define SPECIAL_FCN 9 | |
54 #define SPECIAL_RMB 10 | |
55 #define SPECIAL_ALIGN 11 | |
56 #define SPECIAL_END 12 | |
57 #define SPECIAL_INCLUDE 13 | |
58 #define SPECIAL_ENDM 14 | |
59 #define SPECIAL_ENDC 15 | |
60 #define SPECIAL_MACRO 16 | |
61 #define SPECIAL_COND 17 | |
62 #define SPECIAL_ELSE 18 | |
63 | |
64 typedef struct | |
65 { | |
66 char *opcode; /* the mneumonic */ | |
67 int ops[4]; /* opcode values for up to four addr modes */ | |
68 int instype; /* type of instruction (see above) */ | |
69 int specialnum; /* type of special instruction */ | |
70 void (*opfn)(asmstate_t *as, sourceline_t *cl, char **optr); | |
71 } instab_t; | |
72 | |
73 #ifndef __instab_c_seen__ | |
74 extern instab_t instab[]; | |
75 #endif //__instab_c_seen__ | |
76 | |
77 #endif //__instab_h_seen__ |