Mercurial > hg-old > index.cgi
diff old-trunk/lwasm/lwasm.h @ 339:eb230fa7d28e
Prepare for migration to hg
author | lost |
---|---|
date | Fri, 19 Mar 2010 02:54:14 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/old-trunk/lwasm/lwasm.h Fri Mar 19 02:54:14 2010 +0000 @@ -0,0 +1,64 @@ +/* +lwasm.h +Copyright © 2009 William Astle + +This file is part of LWASM. + +LWASM is free software: you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see <http://www.gnu.org/licenses/>. + +Contains the main defs used by the assembler +*/ + + +#ifndef __lwasm_h_seen__ +#define __lwasm_h_seen__ + +#define OUTPUT_DECB 0 // DECB multirecord format +#define OUTPUT_RAW 1 // raw sequence of bytes +#define OUTPUT_OBJ 2 // proprietary object file format +#define OUTPUT_RAWREL 3 // raw bytes where ORG causes a SEEK in the file +#define OUTPUT_OS9 4 // os9 module target + +// keep track of current assembler state +typedef struct { + const char *infile; // input file + const char *outfile; // output file + const char *listfile; // output listing file + int outformat; // output format type + int no6309; // set for 6809-only mode + int pragmas; // pragmas in effect +} asmstate_t; + +// do not rewrite XXX,r to ,r if XXX evaluates to 0 +#define PRAGMA_NOINDEX0TONONE 1 +// any undefined symbols are considered external +#define PRAGMA_UNDEFEXTERN 2 +// allow C-style escapes in fcc, fcs, and fcn directives +#define PRAGMA_CESCAPES 4 +// allow "export <undefsym>" to import the symbol +#define PRAGMA_IMPORTUNDEFEXPORT 8 +// don't have $ as a local symbol +#define PRAGMA_DOLLARNOTLOCAL 16 + +#ifndef __lwasm_c_seen__ +#define __lwasm_E__ extern +#else +#define __lwasm_E__ +#endif + +__lwasm_E__ int debug_level; + +#undef __lwasm_E__ + +#endif //__lwasm_h_seen__