Mercurial > hg-old > index.cgi
diff lwasm/lwasm.h @ 354:60568b123281
Added os9 opcodes and ERROR
author | lost@starbug |
---|---|
date | Tue, 30 Mar 2010 23:10:01 -0600 |
parents | faa97115952e |
children | 7166254491ed |
line wrap: on
line diff
--- a/lwasm/lwasm.h Tue Mar 30 21:48:49 2010 -0600 +++ b/lwasm/lwasm.h Tue Mar 30 23:10:01 2010 -0600 @@ -74,6 +74,22 @@ PRAGMA_IMPORTUNDEFEXPORT = 0x0010 // imports symbol if undefined upon export }; + +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; +}; + typedef struct lwasm_error_s lwasm_error_t; struct lwasm_error_s { @@ -104,7 +120,8 @@ lwasm_error_t *warn; // list of errors line_t *prev; // previous line line_t *next; // next line - + int inmod; // inside a module? + sectiontab_t *csect; // which section are we in? struct line_expr_s *exprs; // expressions used during parsing char *lstr; // string passed forward asmstate_t *as; // assembler state data ptr @@ -139,22 +156,6 @@ int numlines; // number lines in macro 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 @@ -169,6 +170,8 @@ int skipmacro; // are we skipping in a macro? int endseen; // have we seen an "end" pseudo? int execaddr; // address from "end" + int inmod; // inside an os9 module? + unsigned char crc[3]; // crc accumulator line_t *line_head; // start of lines list line_t *line_tail; // tail of lines list