Mercurial > hg > index.cgi
comparison lwasm/pass1.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 | 9f7889139b06 |
children | 30b2bad9b5eb |
comparison
equal
deleted
inserted
replaced
332:26bfe8d557e2 | 333:507f442dc71e |
---|---|
269 for (; *p1 && isspace(*p1); p1++) | 269 for (; *p1 && isspace(*p1); p1++) |
270 /* do nothing */ ; | 270 /* do nothing */ ; |
271 | 271 |
272 for (opnum = 0; instab[opnum].opcode; opnum++) | 272 for (opnum = 0; instab[opnum].opcode; opnum++) |
273 { | 273 { |
274 // ignore 6800 compatibility entries unless asked for | |
275 if ((instab[opnum].flags & lwasm_insn_is6800) && !CURPRAGMA(cl, PRAGMA_6800COMPAT)) | |
276 continue; | |
274 if (!strcasecmp(instab[opnum].opcode, sym)) | 277 if (!strcasecmp(instab[opnum].opcode, sym)) |
275 break; | 278 break; |
276 } | 279 } |
277 | 280 |
278 // have to go to linedone here in case there was a symbol | 281 // have to go to linedone here in case there was a symbol |