open-simh.simtools/tests/test-gbl.mac
Olaf Seibert 652c047711 Better error message for .globl 1$
Local labels can't be exported (or imported).
2021-05-30 13:19:39 +02:00

18 lines
580 B
Plaintext

;;;;
;
; 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
.globl 1$ ; error: locals can't be globals too
.globl 2$ ; error: locals can't be globals too
1$: mov #1$,r0
.end