mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-27 20:47:11 +00:00
Include undefined symbols in the symbol table for listing purposes.
MACRO11 V05.05 does this:
```
.MAIN. MACRO V05.05 Sunday 18-APR-2021 16:29 Page 1
1
2 000000 012700 000000G mov #lab1,r0
3
4 .dsabl gbl
5
U 6 000004 012700 000000 mov #lab2,r0
7
8 000001 .end
.MAIN. MACRO V05.05 Sunday 18-APR-2021 16:29 Page 1-1
Symbol table
LAB1 = ****** GX LAB2 = ******
. ABS. 000000 000 (RW,I,GBL,ABS,OVR)
000010 001 (RW,I,LCL,REL,CON)
Errors detected: 1
*** Assembler statistics
Work file reads: 0
Work file writes: 0
Size of work file: 34 Words ( 1 Pages)
Size of core pool: 9260 Words ( 35 Pages)
Operating system: RSX-11M/M-PLUS
Elapsed time: 00:00:00.01
GBL,GBL/-SP=GBL
```
This commit is contained in:
8
parse.c
8
parse.c
@@ -1133,7 +1133,7 @@ EX_TREE *parse_unary(
|
||||
sym = lookup_sym(label, &system_st);
|
||||
}
|
||||
|
||||
if (sym != NULL) {
|
||||
if (sym != NULL && !(sym->flags & SYMBOLFLAG_UNDEFINED)) {
|
||||
tp = new_ex_tree();
|
||||
tp->cp = cp;
|
||||
tp->type = EX_SYM;
|
||||
@@ -1144,7 +1144,11 @@ EX_TREE *parse_unary(
|
||||
}
|
||||
|
||||
/* The symbol was not found. Create an "undefined symbol"
|
||||
reference. */
|
||||
reference. These symbols are freed in free_tree(),
|
||||
in contrast to the symbol used in EX_SYM.
|
||||
implicit_gbl() will either make it an implicit global,
|
||||
or an undefined non-global symbol.
|
||||
*/
|
||||
sym = memcheck(malloc(sizeof(SYMBOL)));
|
||||
sym->label = label;
|
||||
sym->flags = SYMBOLFLAG_UNDEFINED | local;
|
||||
|
||||
Reference in New Issue
Block a user