diff lwasm/pass1.c @ 212:b0d53e2f3f53

Make --6309/--6809 work properly Fixed an inverted test that checked for 6809/6309 mode incorrectly. This also fixes the fact that 6309 mode was not the default as per the documentation.
author William Astle <lost@l-w.ca>
date Sat, 09 Jun 2012 23:17:43 -0600
parents d59f17580e8b
children afd50d6b4113
line wrap: on
line diff
--- a/lwasm/pass1.c	Sat Jun 09 17:23:04 2012 -0600
+++ b/lwasm/pass1.c	Sat Jun 09 23:17:43 2012 -0600
@@ -274,7 +274,7 @@
 				if (!strcasecmp(instab[opnum].opcode, sym))
 					break;
 			}
-			if ((as -> target == TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309))
+			if ((as -> target != TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309))
 				lwasm_register_error(as, cl, "Illegal use of 6309 instruction in 6809 mode (%s)", sym);
 			
 			// have to go to linedone here in case there was a symbol