Implement .ENABL and .DSABL LC.

This commit is contained in:
Olaf Seibert 2015-05-21 22:24:31 +02:00
parent 168340c54c
commit b8a15a89b5
3 changed files with 16 additions and 2 deletions

View File

@ -47,6 +47,10 @@ static int assemble(
if (line == NULL)
return -1; /* Return code for EOF. */
if (!enabl_lc) { /* If lower case disabled, */
upcase(line); /* turn it into upper case. */
}
cp = line;
/* Frankly, I don't need to keep "line." But I found it quite
@ -677,8 +681,11 @@ static int assemble(
else if (strcmp(label, "LSB") == 0) {
enabl_lsb = 1;
lsb = get_next_lsb();
} else if (strcmp(label, "GBL") == 0)
} else if (strcmp(label, "GBL") == 0) {
enabl_gbl = 1;
} else if (strcmp(label, "LC") == 0) {
enabl_lc = 1;
}
free(label);
cp = skipdelim(cp);
}
@ -693,8 +700,11 @@ static int assemble(
else if (strcmp(label, "LSB") == 0) {
lsb = get_next_lsb();
enabl_lsb = 0;
} else if (strcmp(label, "GBL") == 0)
} else if (strcmp(label, "GBL") == 0) {
enabl_gbl = 0;
} else if (strcmp(label, "LC") == 0) {
enabl_lc = 0;
}
free(label);
cp = skipdelim(cp);
}

View File

@ -33,6 +33,8 @@ int enabl_lsb = 0; /* When set, stops non-local symbol
int enabl_gbl = 1; /* Implicit definition of global symbols */
int enabl_lc = 1; /* If lowercase disabled, convert assembler
source to upper case. */
int suppressed = 0; /* Assembly suppressed by failed conditional */

View File

@ -46,6 +46,8 @@ extern int enabl_lsb; /* When set, stops non-local symbol
extern int enabl_gbl; /* Implicit definition of global symbols */
extern int enabl_lc; /* If lowercase disabled, convert assembler
source to upper case. */
extern int suppressed; /* Assembly suppressed by failed conditional */
extern MLB *mlbs[MAX_MLBS]; /* macro libraries specified on the command line */