diff lwasm/lwasm.h @ 353:faa97115952e

Added SECTION/ENDSECTION
author lost@starbug
date Tue, 30 Mar 2010 21:48:49 -0600
parents 4dba8c7e242c
children 60568b123281
line wrap: on
line diff
--- a/lwasm/lwasm.h	Tue Mar 30 20:56:54 2010 -0600
+++ b/lwasm/lwasm.h	Tue Mar 30 21:48:49 2010 -0600
@@ -140,6 +140,21 @@
 	macrotab_t *next;					// next macro in list
 };
 
+enum
+{
+	section_flag_bss = 1,				// BSS section
+	section_flag_none = 0				// no flags
+};
+
+typedef struct sectiontab_s sectiontab_t;
+struct sectiontab_s
+{
+	char *name;							// section name
+	int flags;							// section flags;
+	lw_expr_t offset;					// offset for next instance
+	sectiontab_t *next;
+};
+
 struct asmstate_s
 {
 	int output_format;					// output format
@@ -160,11 +175,14 @@
 
 	line_t *cl;							// current line pointer
 	
+	sectiontab_t *csect;				// current section
+	
 	int context;						// the current "context"
 	int nextcontext;					// the next available context
 	
 	symtab_t symtab;					// meta data for the symbol table
 	macrotab_t *macros;					// macro table
+	sectiontab_t *sections;				// section table
 
 	char *list_file;					// name of file to list to
 	char *output_file;					// output file name