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:
Olaf Seibert
2021-04-18 18:31:35 +02:00
parent d0445ef8f4
commit 7bbcbba5f5
10 changed files with 73 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ TESTS="test-asciz \
test-enabl-lcm \
test-endm \
test-float \
test-gbl \
test-if \
test-impword \
test-include \

26
tests/test-gbl.lst.ok Normal file
View File

@@ -0,0 +1,26 @@
1 ;;;;
2 ;
3 ; Test that .dsabl gbl at the end of the source does not carry
4 ; over to the beginning of the next pass.
5 ; This is actually guaranteed automatically, since it is used in pass 1 only.
6 ; The symbol should however be entered into the symbol table as UNKNOWN.
7 ;
8
9 000000 012700 000000G mov #lab1,r0 ; ok: implicitly global (imported)
10 .dsabl gbl
test-gbl.mac:11: ***ERROR Invalid expression (complex relocation)
11 000004 012700 000000 mov #lab2,r0 ; error: undefined
12
13 .end
13
Symbol table
. ******R 001 LAB1 = ****** GX LAB2 = ******
Program sections:
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
000010 001 (RW,I,LCL,REL,CON,NOSAV)

13
tests/test-gbl.mac Normal file
View File

@@ -0,0 +1,13 @@
;;;;
;
; Test that .dsabl gbl at the end of the source does not carry
; over to the beginning of the next pass.
; This is actually guaranteed automatically, since it is used in pass 1 only.
; The symbol should however be entered into the symbol table as UNKNOWN.
;
mov #lab1,r0 ; ok: implicitly global (imported)
.dsabl gbl
mov #lab2,r0 ; error: undefined
.end