2 OPCODES USED FOR FOURS GENERETED BY THE PART
\r
3 OF SEMANTICAL ANALYZER OF CODE GENERATOR
\r
5 Opcodes were divided in relation to number of arguments, to which
\r
6 they assign values (2,1,0) and then in each group in relation to
\r
7 number of arguments being addresses in symbol table.
\r
8 The rest of not mentioned arguments are:
\r
9 -- values of canstants represented by INTEGER,
\r
10 -- numbers of REAL constants,
\r
11 -- addresses of atributes after dot in IPMEM,
\r
12 -- addresses of prototypes in IPMEM.
\r
15 -- AF - phisical address,
\r
16 -- AV - virtual address.
\r
20 --------------returning two arguments
\r
22 1 OPENRC A:=AV of new record B:=AF C=PROTOTYP(address in IPMEM)
\r
23 2 BACK A:=AV B:=AF of record from which follow return
\r
24 3 RAISE open record of handler A:=AH B:=AF C=number of signal
\r
28 4 OPEN A:=AH B:=AF of new record C=prototype of genereted record
\r
29 5 SLOPEN A:=AH B:=AF of new record C=AV of father synthetizing prototype
\r
32 ---------- returning one argument
\r
35 11 CLEAR 1,2 words A:=0
\r
37 13 take the value A from register B B>0 means number of register A:=reg
\r
38 B<0 means offset (negative) in relation to (R6)
\r
39 15 THIS A:=contents of DISPLAY (AV) for B B=address in IPMEM
\r
40 16 insert prototype A:=number of prototype B B=address in IPMEM
\r
41 20 VIRT.DISPLAY A:=prototype of virtual of number C from DISPLAY for B
\r
42 21 insert static type A:=(B,C) B:=constant<64 C=number of prototype
\r
43 22 read formal type through DISPLAY A:=formal type B=number in DISPLAY
\r
44 (address of prototype in IPMEM) C=address of description of type in IPMEM
\r
45 23 PARAMETR OUTPUT A:=value of parameter( C=number of paremeter)
\r
46 for standard procedure B (it reads parameter.output or
\r
47 value of function for standard procedure)
\r
51 29 address of variable using "." operator A:=address(B.C) (B-A0,C-offset)
\r
52 30 address of visible variable A:=address(B)
\r
53 31 SIGN A:=SIGN(B) (B - INTEGER or REAL)
\r
54 32 add 1 to atribute A:=B+1
\r
55 33 lower from MEMBER A:=LOWER(B) B=AV
\r
56 34 lower without MEMBER A:=LOWER(B) B=AV
\r
57 35 upper from MEMBER A:=UPPER(B) B=AV
\r
58 36 upper without MEMBER A:=UPPER(B) B=AV
\r
59 37 add constant A:=B+C C - constant INTEGER
\r
60 38 MOVE & SAVE substitute A:=B and store in working variable
\r
61 39 add short const. A:=B+C C-short const.
\r
62 40 read type of formal parameter A:=type of parameter of number C
\r
66 43 take AV A:=AV reconstracted from B=AH
\r
67 44 VIRT.DOT from MEMBER A:=prototype of virtual B=AV
\r
68 45 VIRT.DOT bez MEMBER A:=prototype of virtual without MEMBER
\r
69 46 take AF from MEMBER A:=AF from virtual B from MEMBER
\r
70 47 take AF without MEMBER A:=AF without MEMBER
\r
71 48 ABS INTEGER A:=ABS(B)
\r
72 49 MINUS UNARNY INTEGER A:=-B
\r
74 51 MINUS UNARNY REAL
\r
75 52 take AF of parameter A:=AF C=number of paramteter B=AF of record
\r
76 53 cyclic SHIFT towards left of constant A:=ISHIFT(B,CONST.C)
\r
77 54 find using SL-link formal type A:=formal type B=AV or AH
\r
78 C=address of type description in IPMEM
\r
79 55 IS A:=B IS C B=AV C=address of prototype in IPMEM
\r
81 57 QUA A:=AF from AV B with control QUA C C=addresd in IPMEM
\r
83 59 FLOAT A:=FLOAT(B)
\r
85 61 read 1,2,3 words from AF A:=(B)
\r
86 62 read 1,2,3 words from AF A:=(B)
\r
87 63 read 1,2,3 words from AF A:=(B)
\r
88 64 multiplication by 2 A:=2*B
\r
89 65 multiplication by 3 A:=3*B
\r
90 66 multiplication by 4
\r
91 67 multiplication by 5
\r
92 68 multiplication by 6
\r
93 69 multiplication by 7
\r
94 70 multiplication by 8
\r
95 71 multiplication by 9
\r
96 72 multiplication by 10
\r
97 73 division by 8 A:=B/8
\r
100 76 EQ 0 comparision with zero A:=B .EQ. 0 B-INTEGER or REAL
\r
106 82 NOT MEMBER A:=B .EQ. NONE B=AV
\r
107 83 MEMBER A:=B .NE. NONE
\r
108 84 read 1,2,3 words from record AF=B offset=C A:=B.C
\r
111 87 modify type A:=B+C A,B - formal type (2 words) C=short constant
\r
112 88 EQ CONST comparision with constant INTEGER A:=B .EQ. C C=constant
\r
118 94 EQ SHORT comparision with short constant A:=B .EQ. C C=short constant
\r
129 102 ARRAY with control of indexes, with MEMBER A:=AF of element of array
\r
130 B=AV of array C=ATS of index
\r
131 103 ARRAY with control of indexes, without MEMBER "" ""
\r
132 104 ARRAY without control of indexes, with MEMBER
\r
133 105 ARRAY without control of indexes, without MEMBER
\r
134 106 EQ comparision INTEGER A:=B .EQ. C B,C= ATS values of INTEGER
\r
140 112 begin in 1 ARG A:=B C B=AV C=number of prototype (insert to R1,R2,R3)
\r
141 113 + INTEGER A:=B+C
\r
142 114 - INTEGER A:=B-C
\r
143 115 * INTEGER A:=B*C
\r
144 116 cyclic SHIFT towards left A:=ISHIFT(B,C)
\r
145 117 DIVE INTEGER A:=B DIVE C
\r
146 118 MODE INTEGER A:=B MODE C
\r
151 123 EQ REF A:=B .EQ. C B,C- virtual addresses
\r
152 124 NE REF A:=B .NE. C
\r
153 125 EQ REAL A:=B .EQ. C B,C- arguments REAL (can be constant)
\r
162 ----------returning zero arguments
\r
164 132 CALL standard procedure A=number of standard procedure/function
\r
165 NOT IMPL - 133 return control to code written in asembler
\r
169 137 CLEAR 1 word from record which AF=A A.B:=0
\r
170 138 CLEAR 2 word from record which AF=A A.B:=0
\r
171 139 insert value of A to register B B>0 means number of register
\r
172 B<0 means offset(negative) regard to (R6)
\r
173 140 NOP null instruction with argument A
\r
174 141 RELEASE relase variable used for atrybute A (for FOR)
\r
175 (delete "alive" working variable)
\r
176 143 KILL A for blocks,procedures,functions,records,arrays
\r
177 144 dynamic control of headers A=AV of calling module
\r
178 B=number of parameter (function,procedure)
\r
179 145 parameter INPUT write value of A as a parameter of number C of
\r
180 standard procedure B
\r
181 146 GKILL A universal, with full control
\r
182 147 CLEAR 1 word from AF=A (A):=0
\r
183 148 CLEAR 2 words from AF=A (A):=0
\r
184 149 QUA TEST check correctness A QUA B A=AV B=address in IPMEM
\r
185 150 STYPE check correctness of substitution L:=A B=type of L (address in IPMEM)
\r
186 151 IF-FALSE conditional jump A=ATS B=number of label
\r
188 153 KILL AFTER RAISE A=AV
\r
189 158 CANCEL cancel informations : value of atribute A in register
\r
192 159 GO transmit control to record: A=AF B=AH
\r
193 160 GOLOCAL " " " for local without prefix
\r
194 161 write 1 word into AF (A):=B
\r
195 162 write 2 words into AF (A):=B
\r
196 163 write 3 words into AF (A):=B
\r
197 164 write 1 word into record for which AF=A offset=C A.C:=B
\r
198 165 write 2 words into record for which AF=A offset=C A.C:=B
\r
199 166 write 3 words into record for which AF=A offset=C A.C:=B
\r
203 170 DTYPE check correctness of substitution L:=B A=type of L C=type ofB
\r
205 --------requesting special service (172-176,178-194 end segment)
\r
206 ---opcodes which end base block (exeptcion 177)
\r
210 174 LAST WILL LABEL
\r
211 175 JUMP AT LAST WILL A=number of prototype
\r
212 176 forced end of base block (of segment for existing["alive"] variables)
\r
213 177 beginig of instruction of number A
\r
214 178 INNER A=level in prefix sequence
\r
215 179 FIRST LABEL = enter point to module
\r
216 180 BACKHD - return through RETURN from HANDLER
\r
217 181 LABEL A=number of label (for each module labels are numbered starting from 1)
\r
219 183 JUMP behind INNER A=address of prefix in IPMEM
\r
220 184 BEGIN begining of module (A=address in IPMEM)
\r
221 185 END end of module
\r
222 186 BLOCK A open record for A (address in IPMEM),transfer control,kill
\r
224 188 ATTACH A=current ATS
\r
225 189 CASE A=ATS of expression B=number label C=SUM of opction C,F
\r
226 190 ESAC A=number of labels B=base label C=minimal label
\r
227 and below A+1 numbers : range of labels and their descriptions
\r
229 ----- procedures R.S. (return from module)
\r
236 -------- services of symbol table and ending mark
\r
238 195 MOVE & SAVE A:=B enter working atrybute of number A and apetyte like for
\r
239 atrybute B and store in working variable
\r
240 (create A with apetyte like B and generate A:=B)
\r
241 197 REAL CONST rezervation of working atrubute contaning REAL constant
\r
242 A=number B=index of constant
\r
243 198 SHORT INT rezervation of working atrubute contaning short constant
\r
244 A=number B=value of constant
\r
245 199 LONG INT normal constant
\r
246 200 ending mark of code
\r
247 201 TSTEMP1 rezervation of working atrybute and apetyte 1
\r
248 A=address in symbol table
\r
252 205 TSINSE GLOBALY enter description of declared atrybute in main block
\r
253 A=address in symbol table B=address of atrybute
\r
254 206 TSINSE POREDNI atrybute from indirect module
\r
255 207 TSINSE LOKALNY local atrybute
\r
256 208 TSTEMP LIVE rezervation of working atrybute which address is A
\r
257 and apetyte 1.This atrybute is "alive" after quiting
\r
258 base block (for loop FOR) together with copying
\r
260 --------------------------------------------------------------------------
\r