Mercurial > hg > index.cgi
comparison lwasm/main.c @ 333:507f442dc71e
Add support for 6800 compatibility instructions.
The occasional program uses the 6800 compatibility instructions since they
are actually specified by Motorola in at least some documentation. They
advertised the 6809 as source compatible with the 6800.
This mode is not enabled by default, however. It is my belief that receiving
an error when using a non-6809 instruction is more useful since it is
unlikely that much 6800 source code is being assembled for the 6809 these
days. Nevertheless, the --6809compat option is present for just those
purposes so one does not have to resort to using macros (which would work
equally well in most cases).
author | William Astle <lost@l-w.ca> |
---|---|
date | Tue, 15 Apr 2014 10:57:34 -0600 |
parents | d4ac484d0ec6 |
children | 5d401d1eb3e9 |
comparison
equal
deleted
inserted
replaced
332:26bfe8d557e2 | 333:507f442dc71e |
---|---|
57 { "6309", '3', 0, 0, "Set assembler to 6309 mode (default)" }, | 57 { "6309", '3', 0, 0, "Set assembler to 6309 mode (default)" }, |
58 { "includedir", 'I', "PATH", 0, "Add entry to include path" }, | 58 { "includedir", 'I', "PATH", 0, "Add entry to include path" }, |
59 { "define", 'D', "SYM[=VAL]", 0, "Automatically define SYM to be VAL (or 1)"}, | 59 { "define", 'D', "SYM[=VAL]", 0, "Automatically define SYM to be VAL (or 1)"}, |
60 { "preprocess", 'P', 0, 0, "Preprocess macros and conditionals and output revised source to stdout" }, | 60 { "preprocess", 'P', 0, 0, "Preprocess macros and conditionals and output revised source to stdout" }, |
61 { "unicorns", 0x142, 0, 0, "Add sooper sekrit sauce"}, | 61 { "unicorns", 0x142, 0, 0, "Add sooper sekrit sauce"}, |
62 { "6800compat", 0x200, 0, 0, "Enable 6800 compatibility instructions, equivalent to --pragma=6800compat" }, | |
62 { 0 } | 63 { 0 } |
63 }; | 64 }; |
64 | 65 |
65 | 66 |
66 static int parse_opts(int key, char *arg, void *state) | 67 static int parse_opts(int key, char *arg, void *state) |
188 as -> target = TARGET_6309; | 189 as -> target = TARGET_6309; |
189 break; | 190 break; |
190 | 191 |
191 case 'P': | 192 case 'P': |
192 as -> preprocess = 1; | 193 as -> preprocess = 1; |
194 break; | |
195 | |
196 case 0x200: | |
197 as -> pragmas |= PRAGMA_6800COMPAT; | |
193 break; | 198 break; |
194 | 199 |
195 case lw_cmdline_key_end: | 200 case lw_cmdline_key_end: |
196 break; | 201 break; |
197 | 202 |