X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=procln.c;h=ab9d53a0eefc98397348f71a3a55cfd7f7565608;hp=8127d7337cf070a6f4cb28ac8d66b6b8f61261db;hb=11a78647f7f170e6ea39dd04a3734a359151debb;hpb=d16b8ea0ee65b2ad901ca6b0624c07e6e4930cc4 diff --git a/procln.c b/procln.c index 8127d73..ab9d53a 100644 --- a/procln.c +++ b/procln.c @@ -29,6 +29,7 @@ #define DECL_MR #include "risckw.h" + IFENT * ifent; // Current ifent static IFENT ifent0; // Root ifent static IFENT * f_ifent; // Freelist of ifents @@ -103,7 +104,7 @@ void init_procln(void) // // Line Processor // -void assemble(void) +void Assemble(void) { int state; // Keyword machine state (output) int j; // Random int, must be fast @@ -134,6 +135,7 @@ loop: // Line processing loop label // Get another line of tokens if (tokln() == TKEOF) { +if (verb_flag) printf("Assemble: Found TKEOF flag...\n"); if (list_flag && listflag) // Flush last line of source listeol(); @@ -316,7 +318,7 @@ as68label: if (label != NULL) warn(lab_ignored); - exitmac(); + ExitMacro(); } goto loop; @@ -533,10 +535,15 @@ normal: if (label != NULL) { do_label: + // Check for dot in front of label; means this is a local label if present +#if 0 j = 0; if (*label == '.') j = curenv; +#else + j = (*label == '.' ? curenv : 0); +#endif sy = lookup(label, LABEL, j); @@ -570,7 +577,7 @@ do_label: lab_sym = sy; if (!j) - ++curenv; + curenv++; // Make label global if (labtyp == DCOLON) @@ -621,7 +628,7 @@ do_label: // Call RISC code generator if we found a mnemonic if (state >= 3000) { - risccg(state); + GenerateRISCCode(state); goto loop; } }