comparison lwasm/pass1.c @ 171:d59f17580e8b

Actually check for 6309 instructions when in 6809 mode. Thanks to adamgr on IRC for finding the problem.
author lost@l-w.ca
date Fri, 02 Sep 2011 18:10:26 -0600
parents 324f28905144
children b0d53e2f3f53
comparison
equal deleted inserted replaced
170:372d7c881831 171:d59f17580e8b
272 for (opnum = 0; instab[opnum].opcode; opnum++) 272 for (opnum = 0; instab[opnum].opcode; opnum++)
273 { 273 {
274 if (!strcasecmp(instab[opnum].opcode, sym)) 274 if (!strcasecmp(instab[opnum].opcode, sym))
275 break; 275 break;
276 } 276 }
277 if ((as -> target == TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309))
278 lwasm_register_error(as, cl, "Illegal use of 6309 instruction in 6809 mode (%s)", sym);
277 279
278 // have to go to linedone here in case there was a symbol 280 // have to go to linedone here in case there was a symbol
279 // to register on this line 281 // to register on this line
280 if (instab[opnum].opcode == NULL && (*tok == '*' || *tok == ';' || *tok == '#')) 282 if (instab[opnum].opcode == NULL && (*tok == '*' || *tok == ';' || *tok == '#'))
281 goto linedone; 283 goto linedone;