comparison lwasm/pass1.c @ 382:80d615a6642c

Add REORG pseudo op For Macro-80C compatibility, add REORG pseudo op. It has some utility so this one is not protected by a pragma. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 21:18:02 -0600
parents 71f507f404f1
children 4fd16faa4d93
comparison
equal deleted inserted replaced
381:e3f4aaa2a4e8 382:80d615a6642c
350 { 350 {
351 cl -> len = -1; 351 cl -> len = -1;
352 // call parse function 352 // call parse function
353 debug_message(as, 100, "len = %d, dlen = %d", cl -> len, cl -> dlen); 353 debug_message(as, 100, "len = %d, dlen = %d", cl -> len, cl -> dlen);
354 (instab[opnum].parse)(as, cl, &p1); 354 (instab[opnum].parse)(as, cl, &p1);
355
355 // if we're forcing address modes on pass 1, force a resolution 356 // if we're forcing address modes on pass 1, force a resolution
356 if (CURPRAGMA(cl, PRAGMA_FORWARDREFMAX) && instab[opnum].resolve) 357 if (CURPRAGMA(cl, PRAGMA_FORWARDREFMAX) && instab[opnum].resolve)
357 { 358 {
358 (instab[opnum].resolve)(as, cl, 1); 359 (instab[opnum].resolve)(as, cl, 1);
359 } 360 }
362 if (cl -> len == 0) 363 if (cl -> len == 0)
363 cl -> len = cl -> dlen; 364 cl -> len = cl -> dlen;
364 else 365 else
365 cl -> dlen = cl -> len; 366 cl -> dlen = cl -> len;
366 } 367 }
367
368 if (*p1 && !isspace(*p1) && !(cl -> err)) 368 if (*p1 && !isspace(*p1) && !(cl -> err))
369 { 369 {
370 // flag bad operand error 370 // flag bad operand error
371 lwasm_register_error2(as, cl, E_OPERAND_BAD, "(%s)", p1); 371 lwasm_register_error2(as, cl, E_OPERAND_BAD, "(%s)", p1);
372 } 372 }