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