339
|
1 /*
|
|
2 lwasm.h
|
|
3 Copyright © 2009 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 Contains the main defs used by the assembler
|
|
21 */
|
|
22
|
|
23
|
|
24 #ifndef __lwasm_h_seen__
|
|
25 #define __lwasm_h_seen__
|
|
26
|
|
27 #define OUTPUT_DECB 0 // DECB multirecord format
|
|
28 #define OUTPUT_RAW 1 // raw sequence of bytes
|
|
29 #define OUTPUT_OBJ 2 // proprietary object file format
|
|
30 #define OUTPUT_RAWREL 3 // raw bytes where ORG causes a SEEK in the file
|
|
31 #define OUTPUT_OS9 4 // os9 module target
|
|
32
|
|
33 // keep track of current assembler state
|
|
34 typedef struct {
|
|
35 const char *infile; // input file
|
|
36 const char *outfile; // output file
|
|
37 const char *listfile; // output listing file
|
|
38 int outformat; // output format type
|
|
39 int no6309; // set for 6809-only mode
|
|
40 int pragmas; // pragmas in effect
|
|
41 } asmstate_t;
|
|
42
|
|
43 // do not rewrite XXX,r to ,r if XXX evaluates to 0
|
|
44 #define PRAGMA_NOINDEX0TONONE 1
|
|
45 // any undefined symbols are considered external
|
|
46 #define PRAGMA_UNDEFEXTERN 2
|
|
47 // allow C-style escapes in fcc, fcs, and fcn directives
|
|
48 #define PRAGMA_CESCAPES 4
|
|
49 // allow "export <undefsym>" to import the symbol
|
|
50 #define PRAGMA_IMPORTUNDEFEXPORT 8
|
|
51 // don't have $ as a local symbol
|
|
52 #define PRAGMA_DOLLARNOTLOCAL 16
|
|
53
|
|
54 #ifndef __lwasm_c_seen__
|
|
55 #define __lwasm_E__ extern
|
|
56 #else
|
|
57 #define __lwasm_E__
|
|
58 #endif
|
|
59
|
|
60 __lwasm_E__ int debug_level;
|
|
61
|
|
62 #undef __lwasm_E__
|
|
63
|
|
64 #endif //__lwasm_h_seen__
|