Change delimiters of local symbol blocks to be more like page 3-10 of the manual.

Also, to make Kermit sources work, only increase the local symbol block
counter if there actually was a local symbol used in the block.
This way, conditional inclusions (which include source text only in the
first pass) will have less potential for de-synchronisation between the
passes. After all, if the generated internal local symbol names do
not match, phase errors will result (showing themselves as strange label
redefinition problems).
This commit is contained in:
Olaf Seibert
2015-05-10 17:51:32 +02:00
parent 2bc55f39f3
commit f75f5e1242
7 changed files with 55 additions and 11 deletions

View File

@@ -9,6 +9,7 @@
#include "util.h"
#include "rad50.h"
#include "listing.h"
#include "assemble_globals.h"
@@ -510,10 +511,15 @@ char *get_symbol(
char *newsym = memcheck(malloc(32)); /* Overkill */
sprintf(newsym, "%ld$%d", strtol(symcp, NULL, 10), lsb);
if (enabl_debug && lstfile) {
fprintf(lstfile, "lsb %d: %s -> %s\n",
lsb, symcp, newsym);
}
free(symcp);
symcp = newsym;
if (islocal)
*islocal = SYMBOLFLAG_LOCAL;
lsb_used++;
} else {
free(symcp);
return NULL;