Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.h @ 353:faa97115952e
Added SECTION/ENDSECTION
author | lost@starbug |
---|---|
date | Tue, 30 Mar 2010 21:48:49 -0600 |
parents | 4dba8c7e242c |
children | 60568b123281 |
comparison
equal
deleted
inserted
replaced
352:f5b77989f675 | 353:faa97115952e |
---|---|
138 char **lines; // macro lines | 138 char **lines; // macro lines |
139 int numlines; // number lines in macro | 139 int numlines; // number lines in macro |
140 macrotab_t *next; // next macro in list | 140 macrotab_t *next; // next macro in list |
141 }; | 141 }; |
142 | 142 |
143 enum | |
144 { | |
145 section_flag_bss = 1, // BSS section | |
146 section_flag_none = 0 // no flags | |
147 }; | |
148 | |
149 typedef struct sectiontab_s sectiontab_t; | |
150 struct sectiontab_s | |
151 { | |
152 char *name; // section name | |
153 int flags; // section flags; | |
154 lw_expr_t offset; // offset for next instance | |
155 sectiontab_t *next; | |
156 }; | |
157 | |
143 struct asmstate_s | 158 struct asmstate_s |
144 { | 159 { |
145 int output_format; // output format | 160 int output_format; // output format |
146 int target; // assembly target | 161 int target; // assembly target |
147 int debug_level; // level of debugging requested | 162 int debug_level; // level of debugging requested |
158 line_t *line_head; // start of lines list | 173 line_t *line_head; // start of lines list |
159 line_t *line_tail; // tail of lines list | 174 line_t *line_tail; // tail of lines list |
160 | 175 |
161 line_t *cl; // current line pointer | 176 line_t *cl; // current line pointer |
162 | 177 |
178 sectiontab_t *csect; // current section | |
179 | |
163 int context; // the current "context" | 180 int context; // the current "context" |
164 int nextcontext; // the next available context | 181 int nextcontext; // the next available context |
165 | 182 |
166 symtab_t symtab; // meta data for the symbol table | 183 symtab_t symtab; // meta data for the symbol table |
167 macrotab_t *macros; // macro table | 184 macrotab_t *macros; // macro table |
185 sectiontab_t *sections; // section table | |
168 | 186 |
169 char *list_file; // name of file to list to | 187 char *list_file; // name of file to list to |
170 char *output_file; // output file name | 188 char *output_file; // output file name |
171 lw_stringlist_t input_files; // files to assemble | 189 lw_stringlist_t input_files; // files to assemble |
172 void *input_data; // opaque data used by the input system | 190 void *input_data; // opaque data used by the input system |