Mercurial > hg > index.cgi
comparison lwasm/lwasm.h @ 367:c6d2a1f54e0c
Change processor target variations to pragmas.
Add "pragma 6809" and "pragma 6309" which select the processor target rather
than a global flag. The command line switches set or reset the pragma
appropriately.
Thanks to Erik G <erik@6809.org> for the patch.
author | William Astle <lost@l-w.ca> |
---|---|
date | Mon, 15 Jun 2015 21:21:58 -0600 |
parents | 433dbc18fb41 |
children | 8764142b3192 |
comparison
equal
deleted
inserted
replaced
366:433dbc18fb41 | 367:c6d2a1f54e0c |
---|---|
59 OUTPUT_RAWREL, // raw bytes where ORG causes a SEEK in the file | 59 OUTPUT_RAWREL, // raw bytes where ORG causes a SEEK in the file |
60 OUTPUT_OS9, // os9 module target | 60 OUTPUT_OS9, // os9 module target |
61 OUTPUT_SREC, // motorola SREC format | 61 OUTPUT_SREC, // motorola SREC format |
62 OUTPUT_IHEX, // intel hex format | 62 OUTPUT_IHEX, // intel hex format |
63 OUTPUT_HEX // generic hexadecimal format | 63 OUTPUT_HEX // generic hexadecimal format |
64 }; | |
65 | |
66 enum lwasm_target_e | |
67 { | |
68 TARGET_6309 = 0, // target 6309 CPU | |
69 TARGET_6809 // target 6809 CPU (no 6309 ops) | |
70 }; | 64 }; |
71 | 65 |
72 enum lwasm_flags_e | 66 enum lwasm_flags_e |
73 { | 67 { |
74 FLAG_LIST = 0x0001, | 68 FLAG_LIST = 0x0001, |
95 PRAGMA_AUTOBRANCHLENGTH = 0x0100, // automatically select proper length for relative branches | 89 PRAGMA_AUTOBRANCHLENGTH = 0x0100, // automatically select proper length for relative branches |
96 PRAGMA_EXPORT = 0x0200, // export symbols by default, unless local | 90 PRAGMA_EXPORT = 0x0200, // export symbols by default, unless local |
97 PRAGMA_SYMBOLNOCASE = 0x400, // symbols defined under this pragma are matched case insensitively | 91 PRAGMA_SYMBOLNOCASE = 0x400, // symbols defined under this pragma are matched case insensitively |
98 PRAGMA_CONDUNDEFZERO = 0x800, // treat undefined symbols as zero in conditionals during pass 1 | 92 PRAGMA_CONDUNDEFZERO = 0x800, // treat undefined symbols as zero in conditionals during pass 1 |
99 PRAGMA_6800COMPAT = 0x1000, // enable 6800 compatibility opcodes | 93 PRAGMA_6800COMPAT = 0x1000, // enable 6800 compatibility opcodes |
100 PRAGMA_FORWARDREFMAX = 0x2000 // force incomplete references on pass 1 to maximum mode | 94 PRAGMA_FORWARDREFMAX = 0x2000, // force incomplete references on pass 1 to maximum mode |
95 PRAGMA_6809 = 0x4000 // 6809/6309 assembly mode | |
101 }; | 96 }; |
102 | 97 |
103 | 98 |
104 enum | 99 enum |
105 { | 100 { |
270 }; | 265 }; |
271 | 266 |
272 struct asmstate_s | 267 struct asmstate_s |
273 { | 268 { |
274 int output_format; // output format | 269 int output_format; // output format |
275 int target; // assembly target | |
276 int debug_level; // level of debugging requested | 270 int debug_level; // level of debugging requested |
277 FILE *debug_file; // FILE * to output debug messages to | 271 FILE *debug_file; // FILE * to output debug messages to |
278 int flags; // assembly flags | 272 int flags; // assembly flags |
279 int pragmas; // pragmas currently in effect | 273 int pragmas; // pragmas currently in effect |
280 int errorcount; // number of errors encountered | 274 int errorcount; // number of errors encountered |