mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 15:27:18 +00:00
while also adding some consistency. All listings now list . (dot) as defined so they need updating.
64 lines
3.4 KiB
Plaintext
64 lines
3.4 KiB
Plaintext
1 ;;;;;
|
|
2 ;
|
|
3 ; Test that commas create empty macro arguments.
|
|
4 ;
|
|
5 .macro tstarg a1,a2,a3,a4
|
|
6 .narg label
|
|
7 .endm
|
|
8
|
|
9 000000 start: tstarg ; 0 args
|
|
1 000000 .narg label
|
|
10 000000 tstarg 123 ; 1 arg
|
|
1 000001 .narg label
|
|
11 000000 tstarg 1, ; 2 args
|
|
1 000002 .narg label
|
|
12 000000 tstarg ,2 ; 2 args
|
|
1 000002 .narg label
|
|
13 000000 tstarg , ; 2 args
|
|
1 000002 .narg label
|
|
14 000000 tstarg ,, ; 3 args
|
|
1 000003 .narg label
|
|
15 000000 tstarg 1,, ; 3 args
|
|
1 000003 .narg label
|
|
16 000000 tstarg ,,3 ; 3 args
|
|
1 000003 .narg label
|
|
17 000000 tstarg 1,,3 ; 3 args
|
|
1 000003 .narg label
|
|
18 000000 tstarg 1,2,3 ; 3 args
|
|
1 000003 .narg label
|
|
19
|
|
20 ;;;;;
|
|
21 ;
|
|
22 ; Test what happens if we have invalid bracketed strings.
|
|
23 ; For now we fall back to treating them like unbracketed strings,
|
|
24 ; that will hopefully alert the user the best.
|
|
25 ;
|
|
26 .macro braket arg
|
|
27 ; arg
|
|
28 .endm
|
|
29
|
|
30 000000 braket <plain>
|
|
1 ; plain
|
|
31 000000 braket ^/simple/
|
|
1 ; simple
|
|
32 000000 braket <broken
|
|
1 ; <broken
|
|
33 000000 braket ^/broken
|
|
1 ; ^/broken
|
|
34 000000 braket <bro<ken>
|
|
1 ; <bro<ken>
|
|
35 000000 braket <bro<ken> string
|
|
1 ; <bro<ken>
|
|
35
|
|
|
|
|
|
Symbol table
|
|
|
|
. 000000R 001 LABEL = 000003 START 000000R 001
|
|
|
|
|
|
Program sections:
|
|
|
|
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
|
|
000000 001 (RW,I,LCL,REL,CON,NOSAV)
|