mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-26 04:01:44 +00:00
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:
6
parse.c
6
parse.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user