Mercurial > hg > index.cgi
comparison lwasm/lwasm.h @ 432:58cafa61ab40
Add support for undocumented custom module format (for LW)
Nothing to see here. Move along. These are not the droids you are looking
for.
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 18 Nov 2016 21:25:43 -0700 |
parents | 4411a6123716 |
children | 61580fc48f98 |
comparison
equal
deleted
inserted
replaced
431:6df8d62302e2 | 432:58cafa61ab40 |
---|---|
59 OUTPUT_OBJ, // proprietary object file format | 59 OUTPUT_OBJ, // proprietary object file format |
60 OUTPUT_RAWREL, // raw bytes where ORG causes a SEEK in the file | 60 OUTPUT_RAWREL, // raw bytes where ORG causes a SEEK in the file |
61 OUTPUT_OS9, // os9 module target | 61 OUTPUT_OS9, // os9 module target |
62 OUTPUT_SREC, // motorola SREC format | 62 OUTPUT_SREC, // motorola SREC format |
63 OUTPUT_IHEX, // intel hex format | 63 OUTPUT_IHEX, // intel hex format |
64 OUTPUT_HEX // generic hexadecimal format | 64 OUTPUT_HEX, // generic hexadecimal format |
65 OUTPUT_LWMOD // special module format for LW | |
65 }; | 66 }; |
66 | 67 |
67 enum lwasm_flags_e | 68 enum lwasm_flags_e |
68 { | 69 { |
69 FLAG_LIST = 0x0001, | 70 FLAG_LIST = 0x0001, |
129 char *name; // section name | 130 char *name; // section name |
130 int flags; // section flags; | 131 int flags; // section flags; |
131 lw_expr_t offset; // offset for next instance | 132 lw_expr_t offset; // offset for next instance |
132 int oblen; // size of section output | 133 int oblen; // size of section output |
133 int obsize; // size of output buffer | 134 int obsize; // size of output buffer |
135 int tbase; // temporary base value for resolution | |
134 unsigned char *obytes; // output buffer | 136 unsigned char *obytes; // output buffer |
135 reloctab_t *reloctab; // table of relocations | 137 reloctab_t *reloctab; // table of relocations |
136 sectiontab_t *next; | 138 sectiontab_t *next; |
137 }; | 139 }; |
138 | 140 |
199 E_SYMBOL_UNDEFINED = 53, | 201 E_SYMBOL_UNDEFINED = 53, |
200 E_SYMBOL_UNDEFINED_EXPORT = 54, | 202 E_SYMBOL_UNDEFINED_EXPORT = 54, |
201 E_UNKNOWN_OPERATION = 55, | 203 E_UNKNOWN_OPERATION = 55, |
202 E_USER_SPECIFIED = 56, | 204 E_USER_SPECIFIED = 56, |
203 E_ORG_NOT_FOUND = 57, | 205 E_ORG_NOT_FOUND = 57, |
204 | 206 E_COMPLEX_INCOMPLETE = 58, |
207 | |
205 /* warnings must be 1000 or greater */ | 208 /* warnings must be 1000 or greater */ |
206 | 209 |
207 W_DUPLICATE_SECTION = 1000, | 210 W_DUPLICATE_SECTION = 1000, |
208 W_ENDSTRUCT_WITHOUT = 1001, | 211 W_ENDSTRUCT_WITHOUT = 1001, |
209 W_NOT_SUPPORTED = 1002, | 212 W_NOT_SUPPORTED = 1002, |
378 int skipcond; // skipping a condition? | 381 int skipcond; // skipping a condition? |
379 int skipcount; // depth of "skipping" | 382 int skipcount; // depth of "skipping" |
380 int skipmacro; // are we skipping in a macro? | 383 int skipmacro; // are we skipping in a macro? |
381 int endseen; // have we seen an "end" pseudo? | 384 int endseen; // have we seen an "end" pseudo? |
382 int execaddr; // address from "end" | 385 int execaddr; // address from "end" |
386 lw_expr_t execaddr_expr; // address from "end" but as an expression | |
383 int inmod; // inside an os9 module? | 387 int inmod; // inside an os9 module? |
384 int undefzero; // used for handling "condundefzero" | 388 int undefzero; // used for handling "condundefzero" |
385 int pretendmax; // set if we need to pretend the instruction is max length | 389 int pretendmax; // set if we need to pretend the instruction is max length |
386 unsigned char crc[3]; // crc accumulator | 390 unsigned char crc[3]; // crc accumulator |
387 int cycle_total; // cycle count accumulator | 391 int cycle_total; // cycle count accumulator |