open-simh.simtools/tests/test-include.lst.ok
Olaf Seibert e3042c9175 Remove dubious workaround in parse_unary().
The comment "eat first char of illegal label, else endless loop on
implied .WORD" was no longer true. It did reveal some other small
gotchas, which are corrected now as well.
2021-01-23 21:30:52 +01:00

68 lines
3.3 KiB
Plaintext

1 ;;;;;
2 ;
3 ; Test some delimiters for the .INCLUDE directive
4 ;
5
6 .include "incl.mac"
1 ;;;;;
2 ;
3 ; file to be included
4
5 000000 000001 .word 1 ; to show it is included
5
7 .include /incl.mac/
1 ;;;;;
2 ;
3 ; file to be included
4
5 000002 000001 .word 1 ; to show it is included
5
8 .include \incl.mac\
1 ;;;;;
2 ;
3 ; file to be included
4
5 000004 000001 .word 1 ; to show it is included
5
9 .include ?incl.mac?
1 ;;;;;
2 ;
3 ; file to be included
4
5 000006 000001 .word 1 ; to show it is included
5
10 .include >incl.mac>
1 ;;;;;
2 ;
3 ; file to be included
4
5 000010 000001 .word 1 ; to show it is included
5
11
12 ; these are errors: (in MACRO V05.05, some terminate the assembler)
13
test-include.mac:14: ***ERROR Bad .INCLUDE file name
14 .include <incl.mac>
test-include.mac:15: ***ERROR Bad .INCLUDE file name
15 .include <incl.mac<
16 .include =incl.mac= ; looks like assignment
test-include.mac:17: ***ERROR Invalid expression in .WORD
17 000012 000000G .include :incl.mac: ; looks like a label
18
19 ; this is an error: file does not existst
20
test-include.mac:21: ***ERROR Unable to find .INCLUDE file "does-not-exist.mac"
21 .include "does-not-exist.mac"
21
Symbol table
. ******R 001 .INCLU 000012R 001 INCL.M= ****** GX
Program sections:
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
000014 001 (RW,I,LCL,REL,CON,NOSAV)