diff lwasm/lwasm.h @ 236:a58f49a77441

Added os9 target, pragma to control whether $ localizes a symbol, and fixed some condition nesting bugs
author lost
date Fri, 14 Aug 2009 03:22:26 +0000
parents 0df2a39a268c
children a9a14e6b4bc8
line wrap: on
line diff
--- a/lwasm/lwasm.h	Fri Jun 12 05:25:41 2009 +0000
+++ b/lwasm/lwasm.h	Fri Aug 14 03:22:26 2009 +0000
@@ -31,6 +31,7 @@
 #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
 
 // structure for tracking sections
 typedef struct section_reloc_list_s section_reloc_list_t;
@@ -118,6 +119,7 @@
 	lwasm_expr_stack_t *exprs[4];	// non-constant expression values
 	int exprvals[4];	// constant expression values
 	char *exprends[4];	// pointer to character after end of expression
+	int inmod;			// in an os9 module
 	
 	sectiontab_t *sect;	// which section is the line in?
 };
@@ -182,7 +184,11 @@
 	sectiontab_t *csect;		// current section - NULL if not in one
 	
 	// only 6809 ops?
-	int no6309;					
+	int no6309;	
+	
+	// for os9 mode
+	int inmod;					// in a module?
+	unsigned long crc;			// running crc count
 } asmstate_t;
 
 // do not rewrite XXX,r to ,r if XXX evaluates to 0
@@ -191,9 +197,10 @@
 #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