! !************************************************************************ !* * !* G.E.Millard * !* ECODES8 26/06/86 * !* * !************************************************************************ ! {00} %constinteger HALT = 0 ! !--------------------------------------- generic int operations ------- ! {01} %constinteger IADD = 1 { (Etos-1) + (Etos) => (Etos) } {02} %constinteger ISUB = 2 { (Etos-1) - (Etos) => (Etos) } {03} %constinteger IMULT = 3 { (Etos-1) * (Etos) => (Etos) } {04} %constinteger IDIV = 4 { (Etos-1) / (Etos) => (Etos) } {05} %constinteger INEG = 5 { - (Etos) => (Etos) } {06} %constinteger IABS = 6 { abs( (Etos) ) => (Etos) } {07} %constinteger IREM = 7 { remainder from } { (Etos-1) / (Etos)=> (Etos) } ! {08} %constinteger IAND = 8 { (Etos-1) & (Etos) => (Etos) } {09} %constinteger IOR = 9 { (Etos-1) ! (Etos) => (Etos) } {0A} %constinteger INOT = 10 { ~ (Etos) => (Etos) } {0B} %constinteger IXOR = 11 { (Etos-1) !! (Etos) => (Etos) } {0C} %constinteger ISHLL = 12 { (Etos-1) << (Etos) => (Etos) } {0D} %constinteger ISHRL = 13 { (Etos-1) >> (Etos) => (Etos) } {0E} %constinteger ISHLA = 14 { arithmetic left shift } {0F} %constinteger ISHRA = 15 { arithmetic right shift } ! {10} %constinteger IGT = 16 { if } {11} %constinteger ILT = 17 { (Etos-1) <relop> (Etos) } {12} %constinteger IEQ = 18 { then } {13} %constinteger INE = 19 { true (1) => (Etos) } {14} %constinteger IGE = 20 { else } {15} %constinteger ILE = 21 { false (0) => (Etos) } {16} %constinteger BNOT= 22 { (Etos) = BNOT (Etos) 0<->1 } ! {18} %constinteger JIGT = 24 { if } {19} %constinteger JILT = 25 { (Etos-1) <relop> (Etos) } {1A} %constinteger JIEQ = 26 { then } {1B} %constinteger JINE = 27 { -> <label> } {1C} %constinteger JIGE = 28 { else } {1D} %constinteger JILE = 29 { continue } ! {1E} %constinteger JINTGZ = 30 { if (Etos) > 0 %then -> <lab> } {1F} %constinteger JINTLZ = 31 { if (Etos) < 0 %then -> <lab> } {20} %constinteger JINTZ = 32 { if (Etos) = 0 %then -> <lab> } {21} %constinteger JINTNZ = 33 { if (Etos) # 0 %then -> <lab> } {22} %constinteger JINTGEZ = 34 { if (Etos) >=0 %then -> <lab> } {23} %constinteger JINTLEZ = 35 { if (Etos) <=0 %then -> <lab> } ! {24} %constinteger ITWB = 36 { if (Etos) < 0 then -> <lab1> } { = 0 then -> <lab2> } { > 0 then -> <lab3> } ! !--------------------------------------- miscellaneous operations------ ! {26} %constinteger JUMP = 38 { -> <label> } {29} %constinteger SFA = 41 { SF => (Etos) } {2A} %constinteger RETURN = 42 { procedure exit } {2B} %constinteger ASF = 43 { SF = SF + (Etos) } ! {2C} %constinteger IPUSH = 44 { (Etos) => (Mstack) } {2D} %constinteger IPOP = 45 { (Mstack) => (Etos) } {2E} %constinteger EXCH = 46 { (Etos-1) <=> (Etos) } {2F} %constinteger DUPL = 47 { replicate (Etos) } {30} %constinteger DISCARD = 48 { discard (Etos) } ! {33} %constinteger INDEX1 = 51 { (@ Etos-1) + (Etos) } { => (@ Etos) } {34} %constinteger INDEX2 = 52 { (@ Etos-1) + (Etos)*2 } { => (@ Etos) } {35} %constinteger INDEX4 = 53 { (@ Etos-1) + (Etos)*4 } { => (@ Etos) } {36} %constinteger INDEX8 = 54 { (@ Etos-1) + (Etos)*8 } { => (@ Etos) } {37} %constinteger INDEX = 55 { (@ Etos-2) } { + (Etos-1)*(Etos) } { => (@ Etos) } ! {38} %constinteger MVB = 56 { move (Etos) bytes } { ((@ Etos-2)) => ((@ Etos-1)) } ! {39} %constinteger CHK = 57 { check that } { (Etos-1)<=(Etos-2)<=(Etos) } { (Etos-2) => (Etos) } ! {3A} %constinteger TMASK = 58 { (Etos-1) & (Etos) } { - to be followed by JI[N]Z } ! {3E} %constinteger CPBGT = 62 { if (Etos) bytes } {3F} %constinteger CPBLT = 63 { ((Etos-2)) <relop> ((Etos-1))} {40} %constinteger CPBEQ = 64 { then } {41} %constinteger CPBNE = 65 { true (1) => (Etos) } {42} %constinteger CPBGE = 66 { else } {43} %constinteger CPBLE = 67 { false (0) => (Etos) } ! !-------------------------------------- generic unsigned operations --- ! {50} %constinteger UADD = 80 { (Etos-1) + (Etos) => (Etos) } {51} %constinteger USUB = 81 { (Etos-1) - (Etos) => (Etos) } {52} %constinteger UGT = 82 { if } {53} %constinteger ULT = 83 { (Etos-1) <relop> (Etos) } {54} %constinteger UEQ = 84 { then } {55} %constinteger UNE = 85 { 1 => (Etos) } {56} %constinteger UGE = 86 { else } {57} %constinteger ULE = 87 { 0 => (Etos) } {58} %constinteger JUGT = 88 { if } {59} %constinteger JULT = 89 { (Etos-1) <relop> (Etos) } {5A} %constinteger JUEQ = 90 { then } {5B} %constinteger JUNE = 91 { -> <label> } {5C} %constinteger JUGE = 92 { else } {5D} %constinteger JULE = 93 { continue } {5E} %constinteger JUGTZ = 94 { if (Etos) > 0 %then -> <lab> } {5F} %constinteger JULTZ = 95 { if (Etos) < 0 %then -> <lab> } {60} %constinteger JUEQZ = 96 { if (Etos) = 0 %then -> <lab> } {61} %constinteger JUNEZ = 97 { if (Etos) # 0 %then -> <lab> } {62} %constinteger JUGEZ = 98 { if (Etos) >=0 %then -> <lab> } {63} %constinteger JULEZ = 99 { if (Etos) <=0 %then -> <lab> } {64} %constinteger UCVTII = 100 { (int Etos-1) => int size(Etos)}{*} ! !---------------------------------- generic int operations to store---- ! {65} %constinteger IADDST = 101 { (Etos-1) = (Etos-1)+(Etos) }{*} {66} %constinteger ISUBST = 102 { (Etos-1) = (Etos-1)-(Etos) }{*} {67} %constinteger IMULTST = 103 { (Etos-1) = (Etos-1)*(Etos) }{*} {68} %constinteger IDIVST = 104 { (Etos-1) = (Etos-1)/(Etos) }{*} {69} %constinteger INEGST = 105 { (Etos) = - (Etos) }{*} ! {72} %constinteger IANDST = 108 { (Etos-1) = (Etos-1)&(Etos) }{*} {73} %constinteger IORST = 109 { (Etos-1) = (Etos-1)!(Etos) }{*} {74} %constinteger INOTST = 110 { (Etos) = ~ (Etos) }{*} {75} %constinteger IXORST = 111 { (Etos-1) = (Etos-1)!!(Etos) }{*} ! !-------------------------------------- generic real operations ------- ! {71} %constinteger RADD = 113 { (Etos-1) + (Etos) => (Etos) } {72} %constinteger RSUB = 114 { (Etos-1) - (Etos) => (Etos) } {73} %constinteger RMULT = 115 { (Etos-1) * (Etos) => (Etos) } {74} %constinteger RDIV = 116 { (Etos-1) / (Etos) => (Etos) } {75} %constinteger RNEG = 117 { - (Etos) => (Etos) } {76} %constinteger RABS = 118 { abs( (Etos) ) => (Etos) } ! {88} %constinteger CVTII = 136 { (int Etos-1) => int size(Etos) } {89} %constinteger CVTIR = 137 { (int Etos-1) => real size(Etos)} {8A} %constinteger CVTRR = 138 { (real Etos-1)=> real size(Etos)} {8B} %constinteger TNCRI = 139 { (real Etos-1)=> int size(Etos) trunc toward 0} {8C} %constinteger RNDRI = 140 { (real Etos-1)=> int size(Etos) to nearest int} {8D} %constinteger EFLOOR = 141 { (real Etos-1)=> int size(Etos) towards -inf } {8E} %constinteger TNCRR = 142 {8F} %constinteger RNDRR = 143 ! {90} %constinteger RGT = 144 { if } {91} %constinteger RLT = 145 { (Etos-1) <relop> (Etos) } {92} %constinteger REQ = 146 { then } {93} %constinteger RNE = 147 { 1 => (Etos) } {94} %constinteger RGE = 148 { else } {95} %constinteger RLE = 149 { 0 => (Etos) } ! {96} %constinteger JRGT = 150 { if } {97} %constinteger JRLT = 151 { (Etos-1) <relop> (Etos) } {98} %constinteger JREQ = 152 { then } {99} %constinteger JRNE = 153 { -> <label> } {9A} %constinteger JRGE = 154 { else } {9B} %constinteger JRLE = 155 { continue } ! {9C} %constinteger JRGZ = 156 { if (Etos) > 0 %then -> <lab> } {9D} %constinteger JRLZ = 157 { if (Etos) < 0 %then -> <lab> } {9E} %constinteger JRZ = 158 { if (Etos) = 0 %then -> <lab> } {9F} %constinteger JRNZ = 159 { if (Etos) # 0 %then -> <lab> } {A0} %constinteger JRGEZ = 160 { if (Etos) >=0 %then -> <lab> } {A1} %constinteger JRLEZ = 161 { if (Etos) <=0 %then -> <lab> } ! {A2} %constinteger RTWB = 162 { if (Etos) < 0 then -> <lab1> } { = 0 then -> <lab2> } { > 0 then -> <lab3> } {A3} %constinteger JTRUE = 163 { if (Etos) true then -> <lab } {A4} %constinteger JFALSE = 164 { if (Etos) false then -> <lab> } ! !---------------------------------------------------------------------- ! {B1} %constinteger UCHECK = 177 { if (Etos) unassigned diagnose } {B8} %constinteger ESTORE = 184 { ((Etos)) = (Etos-1) } {B9} %constinteger EDUPSTORE = 185 { ((Etos)) = (Etos-1) } { retain (Etos-1) as new (Etos) } {BA} %constinteger PUSHVAL = 186 { push (Etos) as value param } {BB} %constinteger PUSHADDR = 187 { push (Etos) as ref param } {BC} %constinteger EVAL = 188 { force load of (Etos) } {BD} %constinteger EVALADDR = 189 { force load of @ at (Etos) } {BE} %constinteger EADDRESS = 190 { address(Etos) is required } {BF} %constinteger EINTRES = 191 { (Etos) is integer fn result } {C0} %constinteger EREALRES = 192 { (Etos) is real fn result } {C1} %constinteger ESIZE = 193 { size of (Etos-1) is (Etos) } {C2}%constinteger EPOWER = 194 { (Etos-3) @ result if cx } { (Etos-2) base (@ base if cx) } { (Etos-1) power(@ power if cx) } { (Etos) procindex } {C3}%constinteger EPOWERI = 195 { (Etos-2) base } { (Etos-1) power (int) } { (Etos) procindex (0-3) } { procindex = 0 powii } { 1 powri } { 2 powdi } { 3 powqi } { 4 powci } { 5 powzi } { 6 powzzi } { 9 powrr } { 10 powdd } { 11 powqq } { 12 powcc } { 13 powzz } { 14 powzzz } {C4} %constinteger ARGPROC = 196 { call formal procedure in (Etos } {C5} %constinteger PUSHBYTES = 197 { push (Etos) bytes from } { (@etos-1) as value parameter } {C6} %constinteger EAUXSF = 198 { AUXSF => (ETOS) } {C7} %constinteger EAUXADD = 199 { AUXSF = AUXSF + (ETOS) } {C8} %constinteger EAUXRES = 200 { AUXSF = (ETOS) } {C9} %constinteger EOLDLNB = 201 { stack LNB needed for diags } {CA} %constinteger EFILL = 202 { fill (ETOS-1) bytes at (ETOS-2) with (ETOS) } ! !*********************************************************************** !* * !* Fortran specific codes * !* * !*********************************************************************** ! %constinteger CXADD = 257 { ((Etos-3)) = ((Etos-2)) } %constinteger CXSUB = 258 { op } %constinteger CXMULT = 259 { ((Etos-1))} %constinteger CXDIV = 260 { (Etos) = variant<<8 ! sizecode } %constinteger CXNEG = 261 { ((Etos-2)) = - ((Etos-1)) } { (Etos) = sizecode } %constinteger CXASGN = 262 { ((Etos-2)) = ((Etos-1)) } { (Etos) = variant<<8 } { ! sizecode(RHS)<<2 } { ! sizecode(LHS) } %constinteger CXEQ = 263 { (Etos) = ((Etos-2)) } %constinteger CXNE = 264 { op ((Etos-1)) } { (Etos) = variant<<8 ! sizecode } %constinteger ECMPLX1 = 286 { ((Etos-2))=((Etos-1),0) } %constinteger ECMPLX2 = 287 { ((Etos-3))=((Etos-2),(Etos-1)) } { (Etos) = sizecode } %constinteger ECONJG = 279 { ((Etos-2) = conjg((Etos-1)) } { (Etos) = sizecode } { variant = 0 cx op cx } { 1 cx op real } { 2 real op cx } { sizecode = 0 c*8 (r*4) } { 1 c*16 (r*8) } { 2 c*32 (r*16) } %constinteger EANINT = 266 { (Etos) = anint (Etos) } %constinteger EM1EXP = 267 { (Etos) = (-1) ** (Etos) - int } %constinteger EISIGN = 268 { (Etos) = sign(Etos) } %constinteger ESIGN = 269 { * abs(Etos-1) } %constinteger EIMOD = 270 { (Etos) = int(Etos-1)/(Etos) } %constinteger ERMOD = 271 { * (Etos) } %constinteger EIDIM = 272 { (Etos) = if (Etos-1) > (Etos) } %constinteger ERDIM = 273 { then (Etos-1)-(Etos) } { else 0 %constinteger EIMIN = 274 { (Etos) = min( (Etos-1), } %constinteger ERMIN = 275 { (Etos) ) } %constinteger EIMAX = 276 { (Etos) = max( (Etos-1), } %constinteger ERMAX = 277 { (Etos) ) } %constinteger EDMULT = 278 { (Etos) = dble((Etos-1)*(Etos)) } %constinteger ECHAR = 280 { ((Etos-1)) = char(Etos) } %constinteger EICHAR = 281 { (Etos) = ichar((Etos-1)) } %constinteger EINDEXCHAR = 282 { (Etos) = index( C1,C2 ) } { ((Etos-3)) = Charad(C1) } { (Etos-2) = Charlen(C1) } { ((Etos-1)) = Charad(C2) } { (Etos) = Charlen(C2) } %constinteger ECONCAT = 283 { C1 = concat list } { ((Etos-3)) = @ concat table } { (Etos-2) = no. items } { ((Etos-1)) = Charad(C1) } { (Etos) = Charlen(C1) } %constinteger EASGNCHAR = 284 { C1 = C2 } { ((Etos-3)) = Charad(C1) } { (Etos-2) = Charlen(C1) } { ((Etos-1)) = Charad(C2) } { (Etos) = Charlen(C2) } %constinteger ECOMPCHAR = 285 { (Etos) = compare( C1,C2 ) } { ((Etos-4)) = Charad(C1) } { (Etos-3) = Charlen(C1) } { ((Etos-2)) = Charad(C2) } { (Etos-1) = Charlen(C2) } { (Etos) = relop } { relop = 0 > 1 < 2 = } { 3 # 4 >= 5 <= } %constinteger EISHFT = 288 { (Etos) = (Etos-1) << (Etos) } %constinteger EIBITS = 289 { (Etos) = (Etos) bits from } { bit (Etos-1) in (Etos-2) } %constinteger EIBSET = 290 { (Etos) = (Etos-1)&(1<<(Etos)) } %constinteger EIBTEST = 291 { (Etos) = (Etos-1)!(1<<(Etos)) } %constinteger EIBCLR = 292 { (Etos) = (Etos-1)&\(1<<(Etos)) } %constinteger EISHFTC = 293 { (Etos) = (Etos-1) <<c (Etos) } %constinteger PROCARG = 294 %constinteger IPROCARG = 295 %constinteger CHARARG = 296 %constinteger IPROCCALL = 297 %constinteger ARGPROCCALL = 298 { (Etos) = paramsize(bytes) } { (Etos-1) = arg } %constinteger CALLTPLATE = 299 %constinteger NOTEIORES = 300 %constinteger STKIORES = 301 %constinteger EFCVT = 302 { convert(Etos-1) } { (Etos) convert code } %constinteger EFCVTASGN = 303 { (Etos-1) = convert(Etos-2) } { (Etos) convert code } { convert code=oldmode<<3!newmode} { mode =[0 bit - futures] } { 1 I1 (byte) } { 2 I2 } { 3 I4 } { 4 I8 } { 5 R4 } { 6 R8 } { 7 R16 } %constinteger EARGLEN = 304 { (Etos) is char arg len } { - on Amdahl load bottom half } %constinteger EFDVACC = 305 { dope vector special evaluation } { (Etos-1) => (Etos) } { (Etos-2) + (Etos-1)*(Etos) } { => (Etos-1) } %constinteger EFNOTEVR = 306 { (Etos) is the variable return } { index } %constinteger EFSETVR = 307 { stack a descriptor for the } { variable return index } %constinteger EINCR = 308 %constinteger EDECR = 309 %constinteger ELOADB = 310 %constinteger ESTOREB = 311 %constinteger EINCRB = 312 %constinteger EDECRB = 313 %constinteger EDINIT = 314 ! !{************************************************************************} !{***** Pascal specific codes ******} !{************************************************************************} !* !* { string operations } !* %constinteger STRGT = 511 { if } %constinteger STRLT = 512 { (Etos-1) <relop> (Etos) } %constinteger STREQ = 513 { then } %constinteger STRNE = 514 { 1 => (Etos) } %constinteger STRGE = 515 { else } %constinteger STRLE = 516 { 0 => (Etos) } !* !* { pointer operations } !* %constinteger PTREQ = 520 { if } %constinteger PTRNE = 521 { (Etos-1) <relop> (Etos) } { (Etos-1) <relop> (Etos) } { then } { 1 => (Etos) } { else } { 0 => (Etos) } !* !* { set operations } !* %constinteger SETI = 530 { (Etos-1) * (Etos) => (Etos) } %constinteger SETU = 531 { (Etos-1) + (Etos) => (Etos) } %constinteger SETD = 532 { (Etos-1) - (Etos) => (Etos) } !* %constinteger SETLE = 533 { if } %constinteger SETEQ = 534 { (Etos-1) <relop> (Etos) } %constinteger SETNE = 535 { then } %constinteger SETIN = 536 { 1 => (Etos) } { else } { 0 => (Etos) } !* %constinteger SETSING = 537 { [(Etos)] => (Etos) } %constinteger SETRANGE = 538 { [(Etos-1)..(Etos)] => (Etos) } %constinteger SETEMPTY = 539 { [] => (Etos) } !* !* { array operations } !* %constinteger CAPMOVE = 547 { move (Etos-1) bytes from } { ((@ Etos-2)) => ((@ Etos)) } %constinteger INDEXP = 548 { construct packed field } { descriptor from } { (@ Etos-2)- array base } { (Etos-1) - index value } { (Etos) - elements per word } !* !* { file and i/o operations } !* %constinteger EOFOPT = 558 %constinteger EOFOP = 559 { if } %constinteger EOLOP = 560 { fn((@ Etos)) } { then } { 1 => (Etos) } { else } { 0 => (Etos) } %constinteger LAZYOP = 574 { fn((@ Etos)) => (Etos) } !* !* { Standard integer procedures } !* %constinteger ISQR = 601 { fn(Etos) => (Etos) } %constinteger IODD = 602 { fn(Etos) => (Etos) } %constinteger ISUCC = 603 { (Etos) + 1 => (Etos) } %constinteger IPRED = 604 { (Etos) - 1 => (Etos) } %constinteger UODD = 605 { fn(Etos) => (Etos) } %constinteger USUCC = 606 { (Etos) + 1 => (Etos) } %constinteger UPRED = 607 { (Etos) - 1 => (Etos) } !* !* { Standard real procedures } !* %constinteger RSQR = 611 { fn(Etos) => (Etos) } !* !* { Integer range-checking operations } !* %constinteger CHKLT = 620 { if } %constinteger CHKGT = 621 { (Etos-2) <relop> (Etos-1) } %constinteger CHKNE = 629 { then } { trap((Etos)) } { else } { (Etos-2) => (Etos) } %constinteger CHKRNG = 622 { if } { (Etos-3) < (Etos-2) or } { (Etos-3) > (Etos-1) } { then } { trap((Etos)) } { else } { [(Etos-3)] => [(Etos)] } !* !* { Set range-checking operations } !* %constinteger CHKSETGT = 623 { if } { max([(Etos-2)]) > (Etos-1) } { then } { trap((Etos)) } { else } { (Etos-2) => (Etos) } %constinteger CHKSETRNG = 624 { if } { min([(Etos-3)]) < (Etos-2) } { or } { max([Etos-3)]) > (Etos-1) } { then } { trap((Etos)) } { else } { [(Etos-3)] => [(Etos)] } !* !* { Unsigned range-checking operations } !* %constinteger UCHKLT = 625 { if } %constinteger UCHKGT = 626 { (Etos-2) <relop> (Etos-1) } %constinteger UCHKNE = 627 { then } { trap((Etos)) } { else } { (Etos-2) => (Etos) } %constinteger UCHKRNG = 628 { if } { (Etos-3) < (Etos-2) or } { (Etos-3) > (Etos-1) } { then } { trap((Etos)) } { else } { [(Etos-3)] => [(Etos)] } !* !* { Other checking operations } !* %constinteger CHKNEW2 = 630 { if } { ((@ Etos)-2) <> 0 } { then } { trap(325) } %constinteger CHKUNDEF = 631 { if (Etos) undefined } { then trap(343) } %constinteger SETUNDEF = 632 { ((@ Etos)) <- undefined } %constinteger TRAP = 633 { trap((Etos)) } !* !* { ICL Standard operations } !* %constinteger ICLPSH = 642 { (Etos-1) shift (Etos) => (Etos) } %constinteger ICLPROT = 643 { (Etos-1) rotate (Etos)=> (Etos) }