Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.h @ 337:04c80c51b16a
Checkpoint development
author | lost |
---|---|
date | Fri, 12 Mar 2010 06:01:38 +0000 |
parents | 81c005b82775 |
children | 1a6fc6ebb31c |
comparison
equal
deleted
inserted
replaced
336:401587ab6a09 | 337:04c80c51b16a |
---|---|
20 */ | 20 */ |
21 | 21 |
22 #ifndef ___lwasm_h_seen___ | 22 #ifndef ___lwasm_h_seen___ |
23 #define ___lwasm_h_seen___ | 23 #define ___lwasm_h_seen___ |
24 | 24 |
25 #include <lw_expr.h> | |
25 #include <lw_stringlist.h> | 26 #include <lw_stringlist.h> |
26 #include <lw_stack.h> | 27 #include <lw_stack.h> |
28 | |
29 enum | |
30 { | |
31 lwasm_expr_linelen = 1 | |
32 }; | |
27 | 33 |
28 enum lwasm_output_e | 34 enum lwasm_output_e |
29 { | 35 { |
30 OUTPUT_DECB = 0, // DECB multirecord format | 36 OUTPUT_DECB = 0, // DECB multirecord format |
31 OUTPUT_RAW, // raw sequence of bytes | 37 OUTPUT_RAW, // raw sequence of bytes |
55 PRAGMA_UNDEFEXTERN = 0x0004, // undefined symbols are considered to be external | 61 PRAGMA_UNDEFEXTERN = 0x0004, // undefined symbols are considered to be external |
56 PRAGMA_CESCAPES = 0x0008, // allow C style escapes in fcc, fcs, fcn, etc. | 62 PRAGMA_CESCAPES = 0x0008, // allow C style escapes in fcc, fcs, fcn, etc. |
57 PRAGMA_IMPORTUNDEFEXPORT = 0x0010 // imports symbol if undefined upon export | 63 PRAGMA_IMPORTUNDEFEXPORT = 0x0010 // imports symbol if undefined upon export |
58 }; | 64 }; |
59 | 65 |
66 typedef struct line_s line_t; | |
67 struct line_s | |
68 { | |
69 lw_expr_t addr; // assembly address of the line | |
70 int len; // the "size" this line occupies (address space wise) (-1 if unknown) | |
71 int insn; // number of insn in insn table | |
72 line_t *prev; | |
73 line_t *next; | |
74 }; | |
75 | |
60 typedef struct | 76 typedef struct |
61 { | 77 { |
62 int output_format; // output format | 78 int output_format; // output format |
63 int target; // assembly target | 79 int target; // assembly target |
64 int debug_level; // level of debugging requested | 80 int debug_level; // level of debugging requested |
65 int flags; // assembly flags | 81 int flags; // assembly flags |
66 int pragmas; // pragmas currently in effect | 82 int pragmas; // pragmas currently in effect |
83 | |
84 line_t *line_head; // start of lines list | |
85 line_t *line_tail; // tail of lines list | |
67 | 86 |
68 char *list_file; // name of file to list to | 87 char *list_file; // name of file to list to |
69 char *output_file; // output file name | 88 char *output_file; // output file name |
70 lw_stringlist_t input_files; // files to assemble | 89 lw_stringlist_t input_files; // files to assemble |
71 void *input_data; // opaque data used by the input system | 90 void *input_data; // opaque data used by the input system |