open-simh.simtools/tests/test-operands.lst.ok

261 lines
16 KiB
Plaintext

1 ;;;;;
2 ;
3 ; Test operand checking for various instructions and try to exercise
4 ; all operand parsing error messages.
5 ; Some cases are checked elsewhere (e.g. test-jmp.mac).
6 ;
7
8 ; OC_MARK
9
10 000000 006400 mark 0
11 000002 006401 mark 1
12 000004 006477 mark 77
test-operands.mac:13: ***ERROR Literal operand too large (64. > 63.)
13 000006 006477 mark 100 ; too large
test-operands.mac:14: ***ERROR Instruction requires simple literal operand
14 000010 006400 mark . ; must be literal
test-operands.mac:15: ***ERROR Junk at end of line (',0 ; bad')
15 000012 006400 mark 0,0 ; bad
16
17 000014 104000 emt 0
18 000016 104001 emt 1
19 000020 104377 emt 255.
test-operands.mac:20: ***ERROR Literal operand too large (256. > 255.)
20 000022 104377 emt 256. ; too large
21 000024 024' 210 emt . ; allowed though strange
22
23 000026 104400 trap 0
24 000030 104401 trap 1
25 000032 104777 trap 255.
test-operands.mac:26: ***ERROR Literal operand too large (256. > 255.)
26 000034 104777 trap 256. ; too large
27 000036 036' 211 trap . ; allowed though strange
28
29 ; OC_1GEN
30
31 000040 005700 tst r0
test-operands.mac:32: ***ERROR Junk at end of line (',(r0) ; bad
')
32 000042 005700 tst r0,(r0) ; bad
test-operands.mac:33: ***ERROR Invalid addressing mode (Invalid expression)
33 tst @ ; bad
**:0: ***ERROR Register expression out of range.
test-operands.mac:34: ***ERROR Invalid addressing mode (Invalid expression)
34 tst %77 ; bad
test-operands.mac:35: ***ERROR Invalid addressing mode (Invalid expression)
35 tst <> ; bad
36
37 ; OC_2GEN
38
39 000044 060001 add r0,r1
test-operands.mac:40: ***ERROR Junk at end of line (',r2 ; bad
')
40 000046 060001 add r0,r1,r2 ; bad
test-operands.mac:41: ***ERROR Invalid addressing mode (1st operand: Invalid expression)
41 add @ ; bad
test-operands.mac:42: ***ERROR Invalid syntax (comma expected)
42 add r0 r1 ; bad
test-operands.mac:43: ***ERROR Invalid addressing mode (2nd operand: Invalid expression)
43 add r0,@ ; bad
44
45 ; OC_BR
46
47 ; branch offset is counted in words
48 ; from the address after instruction (. + 2)
49
test-operands.mac:50: ***ERROR Branch target out of range (distance=-402)
50 000050 000400 br .+2-258. ; bad
51 000052 000600 br .+2-256.
52 000054 000400 br .+2
53 000056 000577 br .+2+254.
test-operands.mac:54: ***ERROR Branch target out of range (distance=400)
54 000060 000400 br .+2+256. ; bad
test-operands.mac:55: ***ERROR Bad branch target (odd address)
55 000062 000400 br .+2+1 ; bad (odd)
56
57 ; OC_SOB
58
59 000064 077001 sob r0,.
60 000066 077001 sob 0,. ; yes MACRO11 accepts this
test-operands.mac:61: ***ERROR Junk at end of line (',3 ; bad
')
61 000070 077001 sob r0,.,3 ; bad
test-operands.mac:62: ***ERROR Invalid addressing mode (register expected)
62 sob ; bad
test-operands.mac:63: ***ERROR Invalid syntax (comma expected)
63 sob r0 ; bad
test-operands.mac:64: ***ERROR Invalid syntax (comma expected)
64 sob r0 . ; bad
test-operands.mac:65: ***ERROR Invalid addressing mode (register expected)
65 sob 10,. ; bad
66
67 ; OC_ASH
68
69 000072 072027 000003 ash #3,r0
70 000076 072027 000003 ash #3,0 ; yes MACRO11 accepts this
test-operands.mac:71: ***ERROR Junk at end of line (',r1 ; bad
')
71 000102 072027 000003 ash #3,r0,r1 ; bad
test-operands.mac:72: ***ERROR Invalid addressing mode (1st operand: Invalid expression)
72 ash ; bad
test-operands.mac:73: ***ERROR Invalid syntax (comma expected)
73 ash #3 ; bad
test-operands.mac:74: ***ERROR Invalid syntax (comma expected)
74 ash #3 r0 ; bad
test-operands.mac:75: ***ERROR Invalid addressing mode (2nd operand: register expected)
75 ash #3,#0 ; bad
76
77 ; OC_JSR tested in test-jmp.mac
78
79 ; OC_FPPGENAC
80
81 000001 ac1 = %1
82 000005 ac5 = %5
83
84 000106 171111 mulf (r1),ac1
85 000110 171111 mulf (r1),1
test-operands.mac:86: ***ERROR Junk at end of line (',ac1 ; bad
')
86 000112 171111 mulf (r1),ac1,ac1 ; bad
test-operands.mac:87: ***ERROR Invalid addressing mode (1st operand, fsrc: Invalid expression)
87 mulf ; bad
test-operands.mac:88: ***ERROR Invalid addressing mode (1st operand, fsrc: Register expected after '(')
88 mulf ( ; bad
test-operands.mac:89: ***ERROR Invalid syntax (comma expected)
89 mulf (r1) ; bad
test-operands.mac:90: ***ERROR Invalid syntax (comma expected)
90 mulf (r1) ac1 ; bad
test-operands.mac:91: ***ERROR Invalid destination fp register
91 000114 171011 mulf (r1),ac5 ; bad
92
93 ; OC_FPPACGEN
94
95 000116 174115 stf ac1,(r5)
96 000120 174115 stf 1,(r5)
test-operands.mac:97: ***ERROR Invalid source fp register
test-operands.mac:97: ***ERROR Invalid syntax (comma expected)
97 stf ; bad
test-operands.mac:98: ***ERROR Invalid syntax (comma expected)
98 stf ac1 ; bad
test-operands.mac:99: ***ERROR Invalid syntax (comma expected)
99 stf ac1 (r5) ; bad
test-operands.mac:100: ***ERROR Invalid source fp register
100 000122 174015 stf ac5,(r5) ; bad
101
102 ; OC_CIS2 operands are optional and an extension
103
104 000124 076152 cmpni
105 000126 076152 000001 000002 cmpni 1,2
test-operands.mac:106: ***ERROR Junk at end of line (',3 ; bad
')
106 000134 076152 000001 000002 cmpni 1,2,3 ; bad
test-operands.mac:107: ***ERROR Invalid syntax (operand 2: comma expected)
test-operands.mac:107: ***ERROR Invalid expression (operand 2)
test-operands.mac:107: ***ERROR Invalid expression (complex relocation)
107 000142 076152 000003 000000 cmpni 3 ; bad
test-operands.mac:108: ***ERROR Invalid syntax (operand 2: comma expected)
108 000150 076152 000004 000005 cmpni 4 5 ; bad
test-operands.mac:109: ***ERROR Invalid expression (operand 1)
test-operands.mac:109: ***ERROR Invalid expression (operand 2)
test-operands.mac:109: ***ERROR Invalid expression (complex relocation)
test-operands.mac:109: ***ERROR Invalid expression (complex relocation)
109 000156 076152 000000 000000 cmpni <>,<> ; bad
110
111 ; OC_CIS3 operands are optional and an extension
112
113 000164 076150 addni
114 000166 076150 000001 000002 addni 1,2,3
000174 000003
115 000176 076150 000001 000002 addni 1,2,3,4 ; bad
test-operands.mac:115: ***ERROR Junk at end of line (',4 ; bad
')
000204 000003
test-operands.mac:116: ***ERROR Invalid syntax (operand 2: comma expected)
test-operands.mac:116: ***ERROR Invalid expression (operand 2)
test-operands.mac:116: ***ERROR Invalid syntax (operand 3: comma expected)
test-operands.mac:116: ***ERROR Invalid expression (operand 3)
test-operands.mac:116: ***ERROR Invalid expression (complex relocation)
test-operands.mac:116: ***ERROR Invalid expression (complex relocation)
116 000206 076150 000001 000000 addni 1 ; bad
000214 000000
test-operands.mac:117: ***ERROR Invalid syntax (operand 3: comma expected)
test-operands.mac:117: ***ERROR Invalid expression (operand 3)
test-operands.mac:117: ***ERROR Invalid expression (complex relocation)
117 000216 076150 000001 000002 addni 1,2 ; bad
000224 000000
test-operands.mac:118: ***ERROR Invalid syntax (operand 2: comma expected)
test-operands.mac:118: ***ERROR Invalid syntax (operand 3: comma expected)
118 000226 076150 000001 000002 addni 1 2 3 ; bad
000234 000003
test-operands.mac:119: ***ERROR Invalid expression (operand 1)
test-operands.mac:119: ***ERROR Invalid expression (operand 2)
test-operands.mac:119: ***ERROR Invalid expression (operand 3)
test-operands.mac:119: ***ERROR Invalid expression (complex relocation)
test-operands.mac:119: ***ERROR Invalid expression (complex relocation)
test-operands.mac:119: ***ERROR Invalid expression (complex relocation)
119 000236 076150 000000 000000 addni <>,<>,<> ; bad
000244 000000
120
121 ; OC_CIS4 operands are optional and an extension
122
123 000246 076132 movtci
124 000250 076132 000001 000002 movtci 1,2,3,4
000256 000003 000004
125 000262 076132 000001 000002 movtci 1,2,3,4,5
test-operands.mac:125: ***ERROR Junk at end of line (',5
')
000270 000003 000004
test-operands.mac:126: ***ERROR Invalid syntax (operand 2: comma expected)
test-operands.mac:126: ***ERROR Invalid expression (operand 2)
test-operands.mac:126: ***ERROR Invalid syntax (operand 3: comma expected)
test-operands.mac:126: ***ERROR Invalid expression (operand 3)
test-operands.mac:126: ***ERROR Invalid syntax (operand 4: comma expected)
test-operands.mac:126: ***ERROR Invalid expression (operand 4)
test-operands.mac:126: ***ERROR Invalid expression (complex relocation)
test-operands.mac:126: ***ERROR Invalid expression (complex relocation)
126 000274 076132 000001 000000 movtci 1 ; bad
test-operands.mac:126: ***ERROR Invalid expression (complex relocation)
000302 000000 000000
test-operands.mac:127: ***ERROR Invalid syntax (operand 3: comma expected)
test-operands.mac:127: ***ERROR Invalid expression (operand 3)
test-operands.mac:127: ***ERROR Invalid syntax (operand 4: comma expected)
test-operands.mac:127: ***ERROR Invalid expression (operand 4)
test-operands.mac:127: ***ERROR Invalid expression (complex relocation)
127 000306 076132 000001 000002 movtci 1,2 ; bad
test-operands.mac:127: ***ERROR Invalid expression (complex relocation)
000314 000000 000000
test-operands.mac:128: ***ERROR Invalid syntax (operand 4: comma expected)
test-operands.mac:128: ***ERROR Invalid expression (operand 4)
128 000320 076132 000001 000002 movtci 1,2,3 ; bad
test-operands.mac:128: ***ERROR Invalid expression (complex relocation)
000326 000003 000000
test-operands.mac:129: ***ERROR Invalid syntax (operand 2: comma expected)
test-operands.mac:129: ***ERROR Invalid syntax (operand 3: comma expected)
test-operands.mac:129: ***ERROR Invalid syntax (operand 4: comma expected)
129 000332 076132 000001 000002 movtci 1 2 3 4 ; bad
000340 000003 000004
test-operands.mac:130: ***ERROR Invalid expression (operand 1)
test-operands.mac:130: ***ERROR Invalid expression (operand 2)
test-operands.mac:130: ***ERROR Invalid expression (operand 3)
test-operands.mac:130: ***ERROR Invalid expression (operand 4)
test-operands.mac:130: ***ERROR Invalid expression (complex relocation)
test-operands.mac:130: ***ERROR Invalid expression (complex relocation)
test-operands.mac:130: ***ERROR Invalid expression (complex relocation)
130 000344 076132 000000 000000 movtci <>,<>,<>,<> ; bad
test-operands.mac:130: ***ERROR Invalid expression (complex relocation)
000352 000000 000000
131
132 .end
132
Symbol table
. 000356R 001 AC1 =%000001 AC5 =%000005
Program sections:
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
000356 001 (RW,I,LCL,REL,CON,NOSAV)