|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 94464 (0x17100) Types: TextFile Names: »algpass74tx «
└─⟦01e83a425⟧ Bits:30008166 Bånd med SW8010 og SW8500 source code └─⟦75ff9bef3⟧ └─⟦this⟧ »algpass74tx «
; jz.fgs 1987.06.10 algol 8, pass 7, page 1 ; to be blamed: jz k=e0 s. b170, c100, d59, f39, g30, h30, i172, j6 ; w. ; ; use of names: ; a: local points in internal blocks ; b: output bytes + a few input byte values ; c: conditional actions or switching actions, literal actions. ; i.e. all actions which do not neccessarily continue with ; the next byte in the main table. ; d: unconditional actions, i.e. actions which continue with ; the next byte in the main table, possibly after using parameters. ; e: pass 0 names ; f: variables, constants, full word masks ; g: tables and points in tables ; h: definitions of halfword masks and constants. ; i: points in the main table, referenced by the input byte table. ; j: odd addresses in the code g1=k ; w. g2 ; no of bytes in pass 7 h. 4 , 7<1 + 0 ; entry=4, passno=7, direction=forwards g3=e1+2046 ; reference base for initpass7 w. al. w1 g3. ; w1 := reference base; jl x1+g4 ; goto initpass7; (at the end) ; zone descriptor sizes, ; used by declaration of and references to zones and zonearrays. h0=e48 ; base buffer, relative to record base h4=e54 ; block proc , - - - - h5=e52 ; zone descriptor size h6=h0+h5 ; record base, relative to top descriptor h7=h4+h5+2 ; blockproc , - - - - \f ; jz.fgs 1987.06.10 algol 8, pass 7, page 2 ; output byte values ; modifications added to the basic byte values to give shown actions: b0= -3<9+1 ; output byte, next b1= -1<9+1 ; output byte, return b2= -4<9+1 ; output byte, outopand, next b3= -2<9+1 ; output byte, outopand, return ; basic outbyte values b10=36 , b11=b10+2 , b12=b10+4 ; bz , rl , dl b13=42 , b14=74 , b15=b14+2 ; loadpoint , hs , rs b16=b14+4 , b17=16 , b18=14 ; ds , shortlit , medlit b19=12 , b20=8 , b21=10 ; longlit , lngstrng , strnxt b22=242 , b23=244 , b24=196 ; trouble , newline , takeform b25=44 , b26=b25+2 , b27=b25+4 ; ba , wa , aa b28=b25+6 , b29=52 , b30=b29+2 ; fa , ws , ss b31=b29+4 , b32=58 , b33=60 ; fs , wm , fm b34=72 , b35=268 , b36=118 ; longmult , multtest , prepuvop b37=62 , b38=64 , b39=66 ; wd , fd , longdiv b40=68 , b41=70 , b42=120 ; rlw10 , longmod , intexp b43=122 , b44=90 , b45=108 ; realexp , alw00 , shortsh b46=b45+2 , b47=b45+4 , b48=114 ; medsh , longsh , formmask b49=92 , b50=94 , b51=96 ; law10 , la , lo b52=98 , b53=164 , b54=128 ; lx , condj , se b55=130 , b56=126 , b57=124 ; sn , sl , sh b58=132 , b59=134 , b60=142 ; slw11 , shw1-1 , sew00 b61=140 , b62=146 , b63=150 ; snw00 , slw00 , shw00 b64=144 , b65=148 , b66=116 ; slw01 , shw0-1 , low02 b67=162 , b68=166 , b69=174 ; boolean , condbyp , byplab b70=158 , b71=80 , b72=b71+2 ; ldw164 , absint , abslong b73=b71+4 , b74=86 , b75=88 ; absreal , acw1x1 , ac b76=100 , b77=102 , b78=104 ; cf , ci , floatlng b79=106 , b80=154 , b81=156 ; longround , blw02 , blw00 b82=208 , b83=b82+2 , b84=b82+4 ; asw10 , asw11 , asw12 b85=240 , b86=270 , b87=18 ; reserve , loadw3 , zonebase b88=216 , b89=238 , b90=206 ; initzone , loadznseg , indexch b91=236 , b92=226 , b93=220 ; fieldalarm , indexalarm , recceck0 b94=b93+2 , b95=b93+4 , b96=218 ; reccheck1 , reccheck3 , reccheck b97=230 , b98=b97+2 , b99=b97+4 ; fieldch0 , fieldch1 , fieldch2 b100=228 , b101=214 , b102=136 ; fieldch , zindexch , szw11 b103=272 , b104=274 , b105=266 ; storebase , getdoper , begcall b106=262 , b107=264 , b110=282 ; endcall , begpar , endparbase ; note the order: b110, b109, b108 b109=b110+22,b108=b110+20,b111=182 ; valueex , addrex , forif b112=138 , b113=258 , b114=260 ; sow11 , of , ofsw b115=188 , b116=190 , b117=256 ; else , endelse , case b118=254 , b119=252 , b120=250 ; litcase , endcase , endlitcase b121=20 , b122=22 , b123=24 ; begblock , begproc , endblock b124=26 , b125=28 , b126=30 ; endzblck , exitbl , exitprnt b127=32 , b128=248 , b129=198 ; exittppr , endext , intval b130=200 , b131=204 , b132=202 ; realval , takarr , takezarr b133=176 , b134=192 , b135=194 ; gotobyp , localgo , compgo b136=34 , b137=b22 , b138=170 ; colon , stop , doabs b139=172 , b140=184 , b141=186 ; forlab , step , testfirst b142=168 , b143=180 , b144=178 ; bypabs , enddo1 , enddon b145=152 , b146=160 , b147=246 ; slw10 , lxw0 , endpass b148=276 , b149=278 , b150=280 ; sew10a , sew00a , low10 b151=314 , b152=316 , b153=318 ; disable , enable , long compare b154=320 , b155=322 , b156=324 ; longval , blockprocformal, ixw1 b157=330 , b158=b157+2, b159=b157+4; doperelbool, doperelint, doperellong b160=b159-2, b161=b159-4 ; doperelint , doperellong, <*field*> ; note the sequence b157 ... b161 \f ; jz 1979.06.22 algol 8, pass 7, page 3 h. ; input byte table, only referenced from nextin (at c3,a7). g8: ; converts the input bytes, which form a tight sequence from ; 0 to 173, to a relative entry point (i-name) in the pass 7 ; main table. the input byte is used as a linear index in the ; byte table, which for convenience is written in two dimensions. ;+0 , +1 , +2 , +3 , +4 , +5 , +6 , +7 , +8 , +9 ; i44 , i46 , i45 , i125, i126, i33 , i34 , i127, i128, i31 ; 0 i32 , i50 , i51 , i52 , i53 , i54 , i55 , i56 , i57 , i58 ; 10 i59 , i60 , i61 , i62 , i63 , i64 , i65 , i66 , i67 , i47 ; 20 i48 , i49 , i36 , i35 , i37 , i39 , i38 , i40 , i68 , i135; 30 i166, i167, i120, i122, i42 , i41 , i43 , i69 , i70 , i169; 40 i71 , i71 , i170, i72 , i129, i130, i131, i132, i124, i134; 50 i135, i136, i137, i138, i139, i140, i141, i142, i143, i144; 60 i146, i145, i161, i162, i163, i164, i159, i160, i158, i121; 70 i123, i148, i149, i151, i153, i154, i155, i84 , i85 , i86 ; 80 i87 , i112, i150, i152, i119, i119, i118, i117, i116, i115; 90 i94 , i95 , i96 , i97 , i107, i106, i114, i113, i88 , i89 ; 100 i90 , i91 , i92 , i93 , i157, i156, i147, i168, i165, i133; 110 i82 , i83 , i82 , i73 , i74 , i75 , i76 , i77 , i78 , i79 ; 120 i80 , i81 , i98 , i99 , i100, i101, i108, i109, i110, i111; 130 i102, i103, i104, i105, i1 , i2 , i3 , i4 , i5 , i6 ; 140 i7 , i8 , i9 , i10 , i11 , i12 , i13 , i14 , i15 , i16 ; 150 i17 , i18 , i19 , i20 , i21 , i22 , i23 , i24 , i25 , i26 ; 160 i27 , i28 , i29 , i3 , i30 , i171, i172 ; 170 g9: ; top input byte table ; input byte values used for explicit tests in the actions ; tastenext(d24), if tasteendparam(c20), and if tasteendbounds(c21): b5= 96 ; par , lowest endparam value b6= 98 ; addrpar , highest - - (valpar=97) b7= 90 ; endbounds b8=118 ; trouble b9=117 ; newline ; return stack, only referenced from c3 ff and c17 ff. holds return ; points, i.e. w2-values, to the maintable, stacked by the interpreter ; when an s.-action is encountered, and unstacked by return. ; the absolute address of the current stacktop is kept in f0 (curr w2top) ; and points at the first not used word in the return stack. ; f0 is initialized to point at the absolute top of the stack (g6) and ; when the interpreter is entered at c3, after init pass 7, it will thus ; return to maintable(0) which holds the action return, the stack will ; thus be initialized (see c3) until it finally returns to i0 (startpass7). ; the neccessary size of the stack is determined by the maximum nesting of ; s.-calls in the maintable, and the assigned size (10) should be plenty. w. g5: i0, 0, 0, 0, 0, 0, 0, 0, 0, 0; g6: \f ; fgs fgs 1988.10.07 algol 6, pass 7, page ...4... b. a7; interrupt handling, multalarm w. ; d56: ; interrupt address: a0: 0 ; a1: 0 ; saved w0w1 a2: 0 ; a3: 0 ; saved w2w3 0 ; a4: 0 ; return address; a5: 0 ; cause c.e100-16 jl. 2, r.(:d56.+e100+2:)>1 z. al. w2 a0. ; interprete interrupt: rl. w0 a5. ; se w0 0 ; sl w0 5 ; if cause not arith overfloww then jl. e36. ; goto pass 0 interrupt; a6: al w0 b22 ; overflow: jl. w3 e3. ; outbyte(stop); al. w1 a7. ; jl. w3 e4. ; message(<:over/underflow:>); dl. w2 a2. ; restore w1w2; al w0 1<10 ; set warning bit: lo. w0 e29. ; modebit(warning) := true; rs. w0 e29. ; al w3 0 ; al w0 1 ; result := 1; jl. (a4.) ; goback; d57: ds. w2 a2. ; multalarm: rs. w3 a4. ; save w1 w2 and return; jl. a6. ; goto overflow; a7: <:over/underflow<0>:> ; e. ; end interrupt handling \f ; rc 1.3.1971 algol 6, pass 7, page 5 ; operand descriptions. ; in the operand stack (w1-stack) each operand is described by 6 bytes ; (3 words), some of which may be irrelevant. w1 points normally at ; the last byte of the top entry in the stack, which thus may be re- ; ferenced via x1-5 through x1. the six bytes holds: ; descr: ; x1-5: wherebits, describing where the operand is: ; 1<0 : in short work ; 3<0 : in long work ; 1<2 : in register ; 1<3 : a literal ; 1<4 : in uv ; 1<5 : only together with 1<2: address in register. ; 1<6 : clear wanted, i.e. the operand may have to be ; saved in a working location, e.g. simples in input. ; 1<11: shield, a special bit used to delimit levels in the ; stack, e.g. a block, the operand itself may be either ; a literal or a pseudo operand which only holds inter- ; nally used parameters. ; x1-4: kind type: ; kindno<6 : kindno is used as index in the operand directing ; byte table for the normaloutput of an operand, ; or in the param directing byte table when the operand ; is output as a procedure parameter. otherwise it ; is only used in special cases when wherebits and ; type do not suffice. possible values, see descr ; table below. ; blinds<2 : number of irrelevant bytes in the value, used to ; determine how much to output (see below). ; possible values: 0, 1, 2, 3, 4. ; type <0 : the type of the operand: ; 0: boolean ; 1: integer ; 2: long (also label, string and no types) ; 3: real ; label <5: a special bit, which really is a fifth type indi- ; cating a label. ; only used by the action loadreg, to determine when ; to output a loadpoint. ; value: ; x1-3-x1: from 0 to 4 bytes, right justified, holding: ; for literals: the value ; for others : the addressing information: relative address, ; external no, blockno, etc. \f ; rc 24.2.1971 algol 6, pass 7, page 6 ; for each entry in the operand description table below, the ; contents of value is denoted as follows: ; content: x1-3: x1-2: x1-1: x1: ; 0: irr irr irr irr ; l1: - - - value ; l2: - - value value ; l4: value value value value ; b1: irr irr blockrel blockno ; ex: - - extno blockno-1 ; el: bl or ex ; ar: doperel noofsubs. blockrel blockno ; wk: irr irr irr blockrel ; zr: - - zonebaserel 0 ; uv: - - irr 1 ; the 1 for uv is a fictive blockno only used during clear. ; definitions of where-bits and other bit masks. h10= 1<0 ;work h11= 1<1 ;work is long h12= 1<2 ;register h13= 1<3 ;literal h14= 1<4 ;uv h15= 1<5 ;address h16= 1<6 ;clear wanted h17= 1<11 ;shield h18=h10+h11 ;long work h19=h12+h15 ;address in register, no clear, i.e. only save address. h20=h19+h16 ; - - - , clear, i.e. save the value h21=h13+h17 ;literal shield h22=h12+h16 ;value in register h23=h14+h16 ;value in uv h26=h12+h14 ;expr == uv or reg h24= 1<6 ;spill.yes, only used by initialize pass 7 h25= 1<3 ;index.yes, - - - - - - \f ; rc 11.3.1971 algol 6, pass 7, page 7 ; operand description table. ; this table is used whenever a new operand is stacked or when ; the description of an old one is changed. ; it holds the descr, i.e. one word, for each possible operand kind. ; and is referenced from the actions via the g-names and from the ; main table relative to g10 or to the other g-names which again ; are redefined so that they are relative to g10. the range of such ; relative addressing is indicated below in the column ref. ; if the type part always must be set separately this is indicated ; by a t, otherwise some useful type is given. ; the kindno in a descr is used as index both in the operand directing ; byte table and in the endparam table, the number of different kinds ; is therefore the union of the distinct kinds needed in these 2 tables. ; wherebits type ; kindno value-format w.h. ; blinds ref operands in input g10: h13, 1<6 + 3<2 + 0 ; l1 0 lit bool h13, 2<6 + 2<2 + 1 ; l2 +2 lit int h13, 3<6 + 0<2 + 2 ; l4 +4 lit long h13, 3<6 + 0<2 + 3 ; l4 +6 lit real 0 , 4<6 + 2<2 +34 ; ex +8 label (type 1<5 + 2) 0 , 5<6 + 2<2 + 2 ; el +10 procs, except noparpr. 0 , 6<6 + 2<2 + 2 ; el +12 zone 0 , 7<6 + 2<2 + 2 ; bl +14 zone array h16, 8<6 + 2<2 ; t ; el +16 simple var 0 , 9<6 + 2<2 + 2 ; bl +18 formals 0 , 10<6 + 2<2 + 2 ; ex +20 noparpr 0 , 11<6 + 2<2 ; t ; ar +22 array ; internally generated operands h18, 0<6 + 3<2 + 2 ; wk -4 long work h10, 0<6 + 3<2 ; t ; wk -2 value in work g11: h10, 12<6 + 3<2 ; t ; wk 0 addr in work g12: h22, 13<6 + 4<2 ; t ; 0 0 value in reg h20, 14<6 + 4<2 ; t ; 0 +2 addr in reg h12, 15<6 + 4<2 + 1 ; 0 +4 zaddr in reg g13: h23, 16<6 + 4<2 + 3 ; uv 0 value in uv g14: 0 , 8<6 + 2<2 + 1 ; bl 0 no clear var, local int. h21, 2<6 + 2<2 + 1 ; l2 -4 shield, literal 0 , 17<6 + 3<2 + 1 ; wk -2 zonereladdr g15: h13, 2<6 + 2<2 + 1 ; l2 0 lit int (=g10+2) ; kind numbers used for explicit tests h27= 4; label h28=11; array h29= 0; work, i.e. arr field in end param actions h30= 6; zone \f ; rc 24.2.1971 algol 6, pass 7, page 8 ; operand direction byte table. ; only accessed from outopand (d3,a6+20) where it is indexed by ; the kind of the operand. ; -1 is not output (no direction byte required). w.h. g18: ; first of operand direction byte table g19: ; the first direction byte is also the variable curr block ; kindno operand addressing -4 ; 0 block addr 16 ; 1 lit sh 14 ; 2 lit med 12 ; 3 lit long -1 ; 4 block addr -1 ; 5 - - -1 ; 6 - - -1 ; 7 - - -1 ; 8 - - -1 ; 9 - - -1 ; 10 - - -1 ; 11 - - 2 ; 12 indirect (local block) -1 ; 13 not relevant (value in reg) 4 ; 14 x1-addressing -1 ; 15 not relevant (zaddr in reg) 6 ; 16 uv 0 ; 17 zonereladdr ; endparam modif. ; only accessed from savemodif (in c4:) with savetyp holding a ; kindno. g17: ; kindno endparam 24 ; 0 arrfield 12 ; 1 literal 12 ; 2 - 12 ; 3 - 14 ; 4 label 6 ; 5 proc 0 ; 6 zone 4 ; 7 zonearray 10 ; 8 simple 2 ; 9 formals 8 ; 10 procnopar 16 ; 11 array 0 ; 12 irrelevant, should not occur 28 ; 13 registerexpr 26 ; 14 subscriptexpr 18 ; 15 zoneaddr 30 ; 16 uv expression ; - ; 17 irrelevant should not occur \f ; fgs 1987.06.10 algol 6, pass 7, page 9 ; small conversion and modification byte tables, all indexed with ; a type value: g20: 1<6+3<2+0 ; lit kindtype(type) 2<6+2<2+1 ; used when the top operand type is changed and 3<6+0<2+2 ; it happens to be a literal 3<6+0<2+3 ; g21: b10, b11, b12, b12 ; load reg output byte(type): bl, rl, dl, dl, b13 ; loadpoint. (used only by d1,d2) g22: 0 , 0 , 1 , 2 ; type switch(type), see c25 g23: 0 , 1 , 2 , 2 ; length switch(type), see c27 g24: 0 , 0 , 2 , 4 ; typemodif(type), see c4, c5 g25: 0 , 2 , 4 , 4 ; lengthmodif(type), see c4, c5 g26: 1 , 3 , 2 , 0 ; pass7type (pass5type), see d46 g27: 2 , 2 , 4 , 6 ; pass8type (type), see conditions, i120 ff g28: 0 ,-2 ,-4 ,-4 ; negative g25, see c4 and i98 .. i101 \f ; rc 10.3.1971 algol 6, pass 7, page 10 ; variables: w. f0: 0 ; currw2 stack top; set to g5 abs by init pass 7. f1: 0 ; release: boolean, true=0, false<>0. f2: 0 ; regused by: holds either an operand stack pointer for the ; entry using the register (reg used true) or a ; return point (regused false, <g0) f3: 0 ; save w1 internal: (by clearreg) f4: 0 ; place: an operand stack pointer, used by copy entry. f5: 0 ; save w1: f6=k+1 ; savetyp: holds a type saved from the operand stack 0 ; or set explicitly. used to modify output bytes or ; set the toptype. used both as byte and word(dirty) f7: 0 ; dbw: workbits1: used by the working location f8: 0 ; - : workbits: workbits2: administration f9: 0 ; dbw: lastwork: - - f10: 0 ; - : workinf: workbase: - - h. f11: 0 ; not used f12: 0 ; relbase: dopebaserel: appetite: f13: 0 ; arraytype: f14: 0 ; counter: w. f15: 0 ; bool: used by zone declarations; false=0, true =c0 f16: 0 ; zonedecl: - - - - ; true =0, false=c0 f17: 0 ; save return1: for getwork and newline f18: 0 ; blockw1: the w1 value after begin block of the ; current block, only used for check-purposes f19: 0 ; save return2: outopand, reg to work, taste next f21: 0 ; abs top w1 stack, set by initpass7 and after that ; not used ; combined masks and constants f31: h11<12 ; f32: 1<22 ; dbw: used to set and clear workbits 3<22 ; - f33: h13<12 ; nxtlit , used in conditional actions f34: h12<12+h13 ; nxtreg or toplit - - - f35: h12<12 ; nxtreg - - - f36=k+2 ; f. -.5 ; w. -1<23 ; dbw f38: 0 ; - dbw initialize workbits f37: 1<10 ; - roundconstant in litact real long. f39=k+2 ; f. -1.0 ; w. ; \f ; fgs 1987.06.15 algol 6, pass 7, page 11 b.a20; w. ; a0: rl w0 x1-10 ; callact: hl w0 x1-5 ; w0:= wherebits(nxt)<12 + wherebits(top); jl. w3 x3+g0. ; call(act(w3)); c0: ; next: j0=k+1 a1: al w2 ;savedw2 ; w2:= savedw2; c1: ; nextw2: a2: bl. w3 x2+g0. ; w3:= instr(w2); al w2 x2+1 ; w2:= w2+1; sl w3 0 ; if w3 >= 0 then jl. a6. ; goto s.call; a4: hs. w2 j0. ; instrinw3: savedw2:=w2; so w3 1 ; if w3 even then jl. a0. ; goto callact; ; outacts: al w0 2.111111110; la w0 6 ; as w3 -8 ; set return from outbyte according to al. w3 x3+a5. ; bit 13, 14 of w3; jl. e3. ; goto outbyte(w3); ;a5-8: ; afterb2: jl. w3 d3. ; outopand; ;a5-6: ; afterb0: jl. a1. ; goto next; ;a5-4: ; afterb3: jl. w3 d3. ; outopand; ;a5-2: ; afterb1: c3:a3:rl. w2 f0. ; return: unstackw2: w2:= currw2stacktop; a5: sh. w2 g5. ; w2topinw2: if w2 = firstw2stack then jl. a7. ; goto nextin; al w3 x2-2 ; rs. w3 f0. ; currw2stacktop:= w2-2; rx w2 x3 ; swop(w2, w2stack(w2-2)); jl. a2. ; goto nextw2; a6: rx. w2 (f0.) ; s.call: stackw2: rs. w2 f0. ; swop(w2, w2stack(currw2stacktop)); al w2 x3 ; currw2stacktop:= w2; jl. a2. ; w2:= w3; goto nextw2; a7: jl. w3 e2. ; nextin: bl. w2 x2+g8. ; w2:= inputtable(nextin); jl. a2. ; goto nextw2; \f ; fgs 1987.06.18 algol 6, pass 7, page 12 c4: rl. w3 f6. ; savemodif(modif, outbyte): ea. w3 x2+g0. ; el. w3 x3+g10. ; al w2 x2+1 ; jl. a9. ; c5: al w3 3 ; toptypeop(outbyte): la w3 x1-4 ; a8: bl. w3 x3+g24. ; a9: ba. w3 x2+g0. ; al w2 x2+1 ; jl. a4. ; goto instrinw3; c6: am 1 ; skip3(,,): c7: am 1 ; skip2(,): c8: al w2 1 ; skip1(): ba. w2 j0. ; jl. a2. ; goto nextw2; c9: rl. w3 f6. ; setsavetyp.: jl. a10. ; c10: am -3 ; setbool.: c13: am 1 ; setreal.: c12: am 1 ; setlong.: c11: al w3 1 ; setint.: a10: al w0 -4 ; la w0 x1-4 ; sz. w0 (f33.) ; hl. w0 x3+g20. ; lo w3 0 ; rs w3 x1-4 ; jl. a3. ; goto return; c14: am 2 ; zonereg: c15: am 2 ; addrreg: c16: al w3 0 ; valreg: al w1 x1+6 ; al w0 3 ; la w0 x1-4 ; wa. w0 x3+g12. ; rs w0 x1-4 ; rs. w1 f2. ; jl. a3. ; goto return; c57: rl. w3 f0. ; tripplereturn: al w2 x3-2 ; rs w3 x2 ; rs. w2 f0. ; c17: rl. w3 f0. ; doublereturn: al w2 x3-2 ; rs w3 x2 ; rs. w2 f0. ; jl. a5. ; goto w2topinw2; c18: bl. w2 x2+g0. ; go(s.): jl. a2. ; c59: ; create_new_doperel: al w3 6 ; dope.block rel - base.block rel := jl. a11. ; 6; c19: el w3 x1-9 ; newdope_to_type_literal (reldope); es w3 x1-7 ; operand.value := a11: rs w3 x1 ; dope.block rel - base.block rel; al w3 0 ; rs w3 x1-2 ; zl. w3 f6. ; ls w3 1 ; operand type := rl. w3 x3+g10. ; literal (top type); rs w3 x1-4 ; jl. a2. ; goto nextw2; e. ; \f ; rc 24.2.1971 algol 6, pass 7, page 13 b. a7; w. ; d1: a0: sz w0 h12 ; toptoreg: jl. a3. ; if topreg then goto test addrreg; jl. w3 d8. ; clearreg; al. w3 c0. ; set return to next; d2: a1: al w2 2.100011; loadreg: la w2 x1-4 ; sz w2 2.100000; w0:= loadregoutputbyte al w2 4 ; (if toplabel then 4 else toptyp); bz. w0 x2+g21. ; rs. w3 f19. ; set return from outopand; jl. w3 e3. ; outbyte(w0); jl. a5. ; goto outopandintern; a3: sz w0 h15 ; test addrreg: jl. a1. ; if addrreg then goto loadreg; jl. a7. ; goto release; d3: a4: rs. w3 f19. ; outopand: a5: al w3 2.011100; outopandintern: la w3 x1-4 ; jl. x3+a6. ; for i:= blinds(top) step 1 until 3 do a6: bz w0 x1-3 ; outbyte(byte(x1-3+i)); jl. w3 e3. ; bz w0 x1-2 ; a6+4: jl. w3 e3. ; bz w0 x1-1 ; a6+8: jl. w3 e3. ; bz w0 x1 ; a6+12: jl. w3 e3. ; bz w3 x1-4 ; a6+16: ls w3 -6 ; bl. w0 x3+g18. ; w0:= operand direction byte(kindno(top)); se w0 -1 ; if w0 <> -1 then jl. w3 e3. ; outbyte(w0); rl. w3 f19. ; restore return; d4: a7: al w0 0 ; release: rx. w0 f1. ; se w0 0 ; jl x3 ; al w1 x1-6 ; bz w0 x1+1 ; sz w0 h10 ; jl. d11. ; sz w0 h12 ; rs. w3 f2. ; jl x3 ; e. ; \f ; rc 24.2.1971 algol 6, pass 7, page 14 b. a8 ; clear administration w. ; d5: a0: bl w0 x1 ; clearblk: jl. a1. ; d6: am 2045 ; clearuv: d7: al w0 -2045 ; clearall: a1: hs. w0 j1. ; al. w3 a7. ; d8: a2: rx. w3 f2. ; clearreg: rs. w1 f3. ; sh. w3 g0. ; jl. (f2.) ; al w1 x3 ; bz w0 x1-5 ; sz w0 h15 ; jl. w3 a4. ; am -2 ; a3: rl. w0 g11. ; jl. w3 a8. ; rl. w1 f3. ; jl. (f2.) ; a4: so w0 h16 ; jl. a3. ; rs. w0 f1. ; jl. d2. ; a5: bl w3 x1 ; sz w0 h16 ; j1=k+1 ; sh w3; clearblk; jl. a6. ; rs. w0 f1. ; jl. w3 d2. ; rl. w0 g11.-2 ; jl. w3 a8. ; a6: al w1 x1-6 ; a7: bl w0 x1-5 ; sl w0 0 ; jl. a5. ; rl. w1 f3. ; jl. c0. ; \f ; rc 2.3.1971 algol 6, pass 7, page 15 d9: a8: rs. w3 f19. ; regtowork (w0 = workdescr); al w2 3 ; la w2 x1-4 ; se. w0 (g11.) ; hs w2 4 ; lo w2 0 ; rs w2 x1-4 ; jl. w3 d10. ; al w0 b15-1 ; ba w0 x1-5 ; jl. w3 e3. ; bz w0 x1 ; jl. w3 e3. ; bz. w0 g19. ; rl. w3 f19. ; jl. e3. ; e. ; \f ; rc 1.3.1971 algol 6, pass 7, page 16 b. a5 ; work administration w. ; d10: rs. w3 f17. ; reservework: comment with the description dl. w0 f8. ; given in top; rl w2 x1-4 ; so. w2 (f31.) ; jl. a1. ; ld w0 -1 ; lo. w3 f7. ; lo. w0 f8. ; a1: nd. w0 j2. ; bz w3 x1-5 ; jl. w2 a3. ; bl. w2 j2. ; sh w2 -47 ; jl. a4. ; wa w2 4 ; sh. w2 (f9.) ; rs. w2 f9. ; wa. w2 f10. ; ba w2 x1-5 ; rs w2 x1 ; jl. (f17.) ; d11: a2: al w2 x3 ; releasework: bz w3 x1+1 ; ac w0 x3 ; wa w0 x1+6 ; ws. w0 f10. ; as w0 -1 ; hs. w0 j2. ; a3: al w0 0 ; setworktable: rl. w3 x3+f32. ; j2 = k + 1 ; ld w0; workno ; lx. w3 f7. ; lx. w0 f8. ; ds. w0 f8. ; jl x2 ; a4: jl. w1 a5. ; <:works:> ; d12: a5: jl. w3 e5. ; e. ; \f ; rc 1978.08.10 algol 6, pass 7, page 17 b. a2 ; input-output, set operands w. ; d13: al. w3 g10. ; outfrompar(g10rel): sz w0 0 ; d14: al w3 x1 ; outfromw1(w1rel): ba. w3 x2+g0. ; bl w0 x3 ; jl. w3 e3. ; jl. c8. ; d15: bl. w0 x2+g0. ; inout(n): a0: jl. w3 e2. ; rx w2 0 ; jl. w3 e3. ; al w0 x2-1 ; sl w0 1 ; jl. a0. ; jl. c8. ; goto skip1; d16: al. w0 g10. ; intopar(g10rel): sz w0 0 ; d17: al w0 x1 ; intow1(w1rel): ba. w0 x2+g0. ; jl. w3 e2. ; hs w2 (0) ; jl. c8. ; d18: jl. w3 e2. ; in4 newop(descraddr): hs w2 x1+3 ; d19: jl. w3 e2. ; in3 newop(descraddr): hs w2 x1+4 ; d20: jl. w3 e2. ; in2 newop(descraddr): hs w2 x1+5 ; d21: jl. w3 e2. ; in1 newop(descraddr): hs w2 x1+6 ; bl. w2 j0. ; restore w2; d22: bl. w3 x2+g0. ; newop(descraddr): rl. w0 x3+g10. ; d23: al w1 x1+6 ; newdescrinw0: rs w0 x1-4 ; sh. w1 (f21.) ; jl. c8. ; goto skip1; jl. w1 d12. ; <:stack:> ; d58: al. w3 g10. ; outputfrompar1: ba. w3 x2+g0. ; al w0 -e101 ; w0 := - noofbytes for anom. var.; ba w0 x3 ; jl. w3 e3. ; jl. c8. ; \f ; rc 27.2.1971 algol 6, pass 7, page 18 d24: rs. w3 f19. ; tastenext: a1: jl. w3 e2. ; al. w3 a1. ; sn w2 b9 ; jl. d25. ; al w0 b22 ; sn w2 b8 ; jl. e3. ; jl. w3 e11. ; jl. (f19.) ; d25: rs. w3 f17. ; newline: al w0 b23 ; jl. w3 e3. ; jl. w3 e1. ; jl. (f17.) ; c20: jl. w3 d24. ; if tasteendparam(do): sl w2 b5 ; sl w2 b6+1 ; jl. c8. ; jl. c0. ; c21: jl. w3 d24. ; if tasteendbounds(do): se w2 b7 ; jl. c8. ; jl. c0. ; d26: bl. w0 x2+g0. ; newval and op(value,descr addr): a2: ds w0 x1+6 ; al w2 x2+1 ; hs. w2 j0. ; jl. d22. ; d27: bl. w3 x2+g0. ; newfullvaland op(value,descr addr): dl. w0 x3+g10. ; jl. a2. ; d28: bl. w0 x2+g0. ; newlocalvar(relbaserel): ba. w0 f12. ; hs w0 0 ; hl. w0 g19. ; rs w0 x1+6 ; rl. w0 g14. ; jl. d23. ; d29: rl w0 x1-8 ; newdopeaddr(descraddr): hl w0 x1-6 ; rs w0 x1+6 ; jl. d22. ; \f ; rc 27.2.1971 algol 6, pass 7, page 19 d30: am -12 ; w1down: d31: al w1 x1+6 ; w1up: jl. c1. ; goto nextw2; d32: ba. w1 x2+g0. ; setw1(incr): jl. c8. ; goto skip1; d33: al w0 x1 ; setplace(incr): ba. w0 x2+g0. ; rs. w0 f4. ; jl. c8. ; goto skip1; d34: rl. w1 f4. ; placetow1: jl. c1. ; goto nextw2; d35: dl w0 x1 ; copyentry: ds. w0 (f4.) ; rl w0 x1-4 ; am. (f4.) ; rs w0 -4 ; jl. c1. ; goto nextw2; d36: al w2 x1-6 ; exch: rl. w0 f2. ; sn w0 x1 ; rs. w2 f2. ; sn w0 x2 ; rs. w1 f2. ; rl w0 x1 ; rx w0 x2 ; rs w0 x1 ; dl w0 x1-2 ; rx w0 x2-2 ; rx w3 x2-4 ; ds w0 x1-2 ; jl. c0. ; goto next; d37: bl. w0 x2+g0. ; toprel(+n): ba w0 x1-1 ; hs w0 x1-1 ; jl. c8. ; goto skip1; e. ; \f ; rc 5.3.1971 algol 6, pass 7, page 20 b. a0 ; w. ; d38: al w0 3 ; savetoptyp. la w0 x1-4 ; jl. a0. ; d39: am -3 ; savebool: d42: am 1 ; savereal: d41: am 1 ; savelong: d40: al w0 1 ; saveint: a0: rs. w0 f6. ; jl. c1. ; d43: al w0 -1 ; formlitmask: am (x1) ; ls w0 -24 ; rs w0 x1 ; jl. c1. ; d44: bl. w0 x2+g0. ; topval(incr): wa w0 x1 ; rs w0 x1 ; jl. c8. ; d45: bz. w3 x2+g0. ; delete(wherebits): ac w3 x3+1 ; la w3 0 ; hs w3 x1-5 ; jl. c8. ; d46: bl w3 x1-55 ; preparrdecl: bs. w3 f14. ; bs. w3 f14. ; al w3 x3+2 ; hs w3 x1-55 ; bl. w3 f13. ; bl. w3 x3+g26. ; rs. w3 f6. ; jl. c1. ; d47: rs. w3 f1. ; norelease: jl. c1. ; \f ; jz 1982.06.23 algol 8, pass 7, page 21 d48: rs. w1 f5. ; savew1: jl. c1. ; d49: rl. w1 f5. ; restorew1: jl. c1. ; d50: ac w0 h5 ; prepzonedecl: bl. w3 f14. ; wm w3 0 ; relbase := ba. w3 f12. ; relbase - descrlength*counter - al w3 x3-h6+1 ; baserel; hs. w3 f12. ; al w3 0 ; zonedecl := true else d51: rs. w3 f16. ; prepzonearrdecl: zonedecl := false; jl. c0. ; goto next; d52: rl w3 x1 ; prepcall: ls w3 2 ; al w3 x3+5 ; sl w3 2045 ; jl. d59. ; hs w3 6 ; rs w3 x1 ; jl. c1. ; e. ; \f ; rc 27.2.1971 algol 6, pass 7, page 22 b. a3 ; conditions w. ; c22: sz. w0 (f33.) ; if toplit and nxtlit(litact(anytype)): c23: so w0 h13 ; if toplit(litact(anytype)): jl. c8. ; jl. a0. ; c24: sz. w0 (f33.) ; if toplit and nxtlit(littypeact(int,long,real)): c25: so w0 h13 ; if toplit(lit typact(int,long,real)): jl. c6. ; al w3 3 ; la w3 x1-4 ; ba. w2 x3+g22. ; a0: bl. w2 x2+g0. ; dl w0 x1 ; jl. x2+g0. ; c26: sz. w0 (f33.) ; if toplit and nxtlit(litlnthact(int,long,real)): c27: so w0 h13 ; if toplit(litlnthact(int,long,real)): jl. c6. ; al w3 3 ; la w3 x1-4 ; ba. w2 x3+g23. ; jl. a0. ; c28: sz. w0 (f34.) ; relationswitch(s.,s.,s.,s.,s.,s.): al w2 x2+3 ; if toplit or nxtreg w2:=w2+3; c29: al w3 3 ; typeswitch(s.int,s.long,s.real): la w3 x1-4 ; ba. w2 x3+g22. ; jl. c18. ; goto go; c30: so. w0 (f35.) ; if toplit or nxtreg(do): c31: sz w0 h13 ; if toplit(do): jl. c1. ; jl. c8. ; c32: so w0 h13 ; if toplit(go(s.)): jl. c8. ; jl. c18. ; goto go; \f ; jz 1982.06.18 algol 8, pass 7, page 23 c33: so. w0 (f35.) ; if nxtreg(do): jl. c8. ; jl. c1. ; c34: so w0 h10 ; if not topwork(do,do): jl. c1. ; jl. c7. ; c35: bl. w3 x2+g0. ; if top(som wherebit)do:(do): sz w0 x3 ; jl. c8. ; jl. c7. ; c36: al w0 3 ; if toptyp(type)do:(do): la w0 x1-4 ; bl. w3 x2+g0. ; se w0 x3 ; jl. c7. ; jl. c8. ; c100: al w0 2046 ; if top(longextvar): la w0 x1-4 ; se w0 8<6+2<2+2; jl. c8. ; jl. c37. ; c37: rl w0 x1 ; if topext(do): so w0 1 ; jl. c8. ; jl. c1. ; j3 = k + 1 ; c38: jl. c8. ; if spillyes(do): ; or if spill.yes: ; ; jl. c1. ; c39: rl w0 x1 ; testexp value: sh w0 7 ; sh w0 1 ; if topval < 2 or topval > 7 then jl. c3. ; goto return; jl. c1. ; goto nextw2; c40: al w2 x2+7 ; selectexp: ws w2 x1+6 ; w2 := w2+7-oldtopval; jl. c1. ; goto nextw2; \f ; fgs 1987.05.13 algol 6, pass 7, page 24 c41: sn. w3 (f16.) ; if zonedecl(do): jl. c8. ; jl. c1. ; c42: bl. w3 f14. ; if count(+step) isless1 go(s.): ba. w3 x2+g0. ; hs. w3 f14. ; sl w3 1 ; jl. c7. ; al w2 x2+1 ; jl. c18. ; c43: rl w0 x1 ; if topvalneg(do): bl w3 x1-4 ; sz w3 2.10 ; rl w0 x1-2 ; sl w0 0 ; jl. c8. ; jl. c1. ; c44: bl. w0 x2+g0. ; if savetyp(type)do:(do): se. w0 (f6.) ; jl. c7. ; jl. c8. ; c45: al w3 0 ; setboolfalse(ifwastrue(do)): c46: rx. w3 f15. ; setbooltrue (ifwasfalse(do)): se. w3 (f15.) ; jl. c1. ; jl. c8. ; j4 = k + 1 ; c47: jl. c8. ; if indexcheck(do): ; or if indexcheck: ; ; jl. c1. ; j6 = k + 1 ; c52: jl. c8. ; if ix.yes (do): ; ; jl. c1. ; if ix.no skip 1; c48: bl. w3 x2+g0. ; if topkind(kindno) do:(do): bz w0 x1-4 ; ls w0 -6 ; se w0 x3 ; jl. c7. ; jl. c8. ; \f ; jz 1982.06.23 algol 8, pass 7, page 25 c49: bl w3 x1-3 ; parkind(expract,arrayact): bs w3 x1-1 ; hs. w3 f12. ; dopebaserel := byte(w1-3) - byte(w1-1); bz w3 x1-4 ; comment only used if kind = array; ls w3 -6 ; rs. w3 f6. ; savetyp := kindno(top); sz w0 h26 ; if topreg or topuv jl. c1. ; then goto next; sn w3 h28 ; if kindno = array jl. c8. ; then goto skip1; al w2 x2+2 ; w2 := w2 + 2; comment skip2; so w0 h13 ; sn w3 h27 ; if toplit or kindno=label then jl. d53. ; countlit; se w3 h29 ; if kindno=arrfield then jl. c1. ; begin countlit; countlit end; am 4 ; goto next; d53: al w0 4 ; countlitpar: ba w0 x1-7 ; nxtrel := nxtrel + 4; sl w0 2045 ; jl. d59. ; hs w0 x1-7 ; jl. c1. ; goto nextw2; c50: bl. w0 g19. ; if toptobal(do): bl w3 x1 ; sl w0 x3-1 ; jl. c8. ; jl. c1. ; c51: jl. e7. ; exitpass: goto pass0 (next pass); \f ; jz 1982.06.23 algol 8, pass 7, page ...26... d54: rs. w1 f18. ; prepblock: blockw1:=w1; al w3 2 ; al w0 -2 ; lastwork:=2; ba. w0 f12. ; workbase := relbase-2; ds. w0 f10. ; dl. w0 f38. ; workbits1:= 1<23; ds. w0 f8. ; workbits2:= 0; al w0 -2 ; currblock := currblock-2; jl. a1. ; goto nextw2; d55: se. w1 (f18.) ; termblock: jl. a2. ; if w1 <> blockw1 then pass7err1; rl w0 x1-10 ; rs. w0 f18. ; unstack(blockw1); dl. w0 f38. ; sn. w3 (f7.) ; if workbits <> 1<23 or se. w0 (f8.) ; workbits2<> 0 then jl. a3. ; pass7err2; dl w0 x1-6 ; ds. w0 f8. ; unstack(workbits); rl. w0 f10. ; wa. w0 f9. ; appetit := hs. w0 f12. ; workbase + lastwork; dl w0 x1 ; ds. w0 f10. ; unstack(workbase,lastwork); al w0 2 ; a1: ba. w0 g19. ; currblock := hs. w0 g19. ; currblock + 2; jl. c1. ; goto nextw2; a2: jl. w1 d12. ; <:give up, one of above errors too severe<0>:> a3: jl. w1 d12. ; <:programerr2pass7<0>:> d59: jl. w1 d12. ; <:too many parameters<0>:> e. ; end conditions \f ; rc 25.2.1971 algol 6, pass 7, page 27 b. a1 ; dyadic lit actions, w3w0 = value(top) w. ; c64: bz w0 1 ; shsh: c65: al w3 0 ; shmed: c66: ld w0 (x1-6) ; shlong: a0: rl w2 x1-4 ; rs w2 x1-10 ; a1: al w1 x1-6 ; ds w0 x1 ; jl. c3. ; c67: bl w0 1 ; addsh: ba w0 x1-6 ; jl. a0. ; c68: wa w0 x1-6 ; addmed: jl. a0. ; c69: al w2 0 ; addlong: rs w2 x1-8 ; aa w0 x1-6 ; jl. a0. ; c70: bz w0 1 ; extrsh: c71: la w0 x1-6 ; extrmed: extrlng: jl. a0. ; \f ; rc 5.3.1971 algol 6, pass 7, page 28 c72: fd w0 x1-6 ; divreal: jl. a1. ; c73: wm w0 x1-6 ; multint: al w1 x1-6 ; w1down; jl. c90. ; goto longint; c74: fm w0 x1-6 ; multreal: jl. a1. ; c75: wa w0 x1-6 ; pluint: jl. a1. ; c76: aa w0 x1-6 ; plulong: jl. a1. ; c77: fa w0 x1-6 ; plureal: jl. a1. ; c78: ws w0 x1-6 ; subint: jl. a1. ; c79: ss w0 x1-6 ; sublong: jl. a1. ; c80: fs w0 x1-6 ; subreal: jl. a1. ; c81: wa w0 x1-6 ; addandclearnxt: rs w0 x1 ; al w0 0 ; rs w0 x1-6 ; jl. c8. ; e. ; \f ; rc 24.06.1971 algol 6, pass 7, page 29 b. a5 ; monadic lit actions, w3w0 = value(top) w. ; c86: al w3 0 ; addext: jl. a1. ; c87: rl. w3 f6. ; litlim: bl. w3 x3+g23. ; ls w0 x3 ; val := val shift(length switch(savetyp)); rs w0 x1 ; jl. c3. ; c88: bl w3 0 ; intlong: bl w3 6 ; a1: ds w0 x1 ; jl. c12. ; goto setlong; c89: ci w0 0 ; intreal: a2: ds w0 x1 ; jl. c13. ; goto setreal; c90: sh w0 -1 ; longint: am -1 ; se w3 0 ; j5 = k + 1 ; jl. w3 a3. ; ; or if spill.yes : ; ; jl. w3 d57. ; a3: ds w0 x1 ; jl. c11. ; goto setint; c91: al w2 0 ; longreal: nd w0 5 ; ad w0 -1 ; aa. w0 f37. ; nd. w0 a4. ; a4 = k + 1 ; al w2 x2; exp1; al w2 x2+48 ; sn w3 0 ; al w2 -2048 ; hs w2 1 ; jl. a2. ; c92: cf w0 0 ; realint: jl. a3. ; c93: fs. w0 f36. ; reallong: value := value - (-.5) bl w2 1 ; ad w0 -12 ; ad w0 x2-35 ; jl. a1. ; \f ; rc 2.3.1971 algol 6, pass 7, page 30 c94: ac w0 (x1) ; negint: a5: ds w0 x1 ; jl. c3. ; c95: ld w0 64 ; neglong: ss w0 x1 ; jl. a5. ; c96: fm. w0 f39. ; negreal: jl. a5. ; c99: rl w0 6 ; real0: c98: lo w0 6 ; long0: c97: se w0 0 ; int0: jl. c6. ; if value <> 0 then goto skip3; al w1 x1-6 ; w1down; jl. c3. ; goto return; e. ; endmonadic lit actions \f ; fgs 1987.06.15 algol 8, pass 7, page 31 ;maintable g0: ; k=0 ; b.j20 ; j-names are used for long-range s.calls in the maintable. h. ; ;redefinitions of c, d, f, and g -names referenced from maintable: c0 =c0 -g0, c1 =c1 -g0, c3 =c3 -g0, c4 =c4 -g0; c5 =c5 -g0, c6 =c6 -g0, c7 =c7 -g0, c8 =c8 -g0, c9 =c9 -g0; c10=c10-g0, c11=c11-g0, c12=c12-g0, c13=c13-g0, c14=c14-g0; c15=c15-g0, c16=c16-g0, c17=c17-g0, c18=c18-g0, c19=c19-g0; c20=c20-g0, c21=c21-g0, c22=c22-g0, c23=c23-g0, c24=c24-g0; c25=c25-g0, c26=c26-g0, c27=c27-g0, c28=c28-g0, c29=c29-g0; c30=c30-g0, c31=c31-g0, c32=c32-g0, c33=c33-g0, c34=c34-g0; c35=c35-g0, c36=c36-g0, c37=c37-g0, c38=c38-g0, c39=c39-g0; c40=c40-g0, c41=c41-g0, c42=c42-g0, c43=c43-g0, c44=c44-g0; c45=c45-g0, c46=c46-g0, c47=c47-g0, c48=c48-g0, c49=c49-g0; c50=c50-g0, c51=c51-g0, c52=c52-g0, c57=c57-g0, c59=c59-g0; c64=c64-g0; c65=c65-g0, c66=c66-g0, c67=c67-g0, c68=c68-g0, c69=c69-g0; c70=c70-g0, c71=c71-g0, c72=c72-g0, c73=c73-g0, c74=c74-g0; c75=c75-g0, c76=c76-g0, c77=c77-g0, c78=c78-g0, c79=c79-g0; c80=c80-g0, c81=c81-g0; c86=c86-g0, c87=c87-g0, c88=c88-g0, c89=c89-g0; c90=c90-g0, c91=c91-g0, c92=c92-g0, c93=c93-g0, c94=c94-g0; c95=c95-g0, c96=c96-g0, c97=c97-g0, c98=c98-g0, c99=c99-g0; c100=c100-g0; d1 =d1 -g0, d3 =d3 -g0, d4 =d4 -g0; d5 =d5 -g0, d6 =d6 -g0, d7 =d7 -g0, d8 =d8 -g0 ; d10=d10-g0, d11=d11-g0, d13=d13-g0, d14=d14-g0; d15=d15-g0, d16=d16-g0, d17=d17-g0, d18=d18-g0, d19=d19-g0; d20=d20-g0, d21=d21-g0, d22=d22-g0, d24=d24-g0; d25=d25-g0, d26=d26-g0, d27=d27-g0, d28=d28-g0, d29=d29-g0; d30=d30-g0, d31=d31-g0, d32=d32-g0, d33=d33-g0, d34=d34-g0; d35=d35-g0, d36=d36-g0, d37=d37-g0, d38=d38-g0, d39=d39-g0; d40=d40-g0, d41=d41-g0, d42=d42-g0, d43=d43-g0, d44=d44-g0; d45=d45-g0, d46=d46-g0, d47=d47-g0, d48=d48-g0, d49=d49-g0; d50=d50-g0, d51=d51-g0, d52=d52-g0, d53=d53-g0, d54=d54-g0; d55=d55-g0, d58=d58-g0; g11=g11-g10, g12=g12-g10, g13=g13-g10, g14=g14-g10, g15=g15-g10; g17=g17-g10, g18=g18-g10, g19=g19-g10, g24=g24-g10, g25=g25-g10; g27=g27-g10, g28=g28-g10; f6 =f6 -g10, f8 =f8 -g10, f10=f10-g10, f12=f12-g10, f13=f13-g10; f14=f14-g10, f18=f18-g10, f36=f36-g10, f39=f39-g10; ; start of maintable: c3 ; maintable(0): return. used to initialize ; the return stack. i0: d15 , 1 ,b1+b147; start pass 7: inout(1), b.endpass. \f ; rc 16.04.1971 algol 6, pass 7, page 32 b. a7 ; operands in input h. ; i1: d21 , 0 , c3 ; lit bool: in1newop(0), return. i2: d20 , 2 , c3 ; - int : in2newop(2), return. i3: d18 , 4 , c3 ; - long: in4newop(4), return. i4: d18 , 6 , c3 ; - real: in4newop(4), return. i5: d20 , 16 , c10 ; simplebool: in2newop(16), setbool. i6: d20 , 16 , c11 ; - int : in2newop(16), setint. i7: d20 , 16 , c12 ; - long: in2newop(16), setlong. i8: d20 , 16 , c13 ; - real: in2newop(16), setreal. i9: a1 , c10 ; formalbool: s.getformal, setbool. i10: a1 , c11 ; - int : - - , setint. i11: a1 , c12 ; - long: - - , setlong. i12: a1 , c13 ; - real: - - , setreal. i13: a2 , c10 ; array bool: s.getarray , setbool. i14: a2 , c11 ; - int : - - , setint. i15: a2 , c12 ; - long: - - , setlong. i16: a2 , c13 ; - real: - - , setreal. i17: a3 , c10 ; parpr bool: s.getparpr , setbool. i18: a3 , c11 ; - int : - - , setint. i19: a3 , c12 ; - long: - - , setlong. i20: a3 , c13 ; - real: - - , setreal. i21: a5 , c10 ; noppr bool: s.getnoppr , setbool. i22: a5 , c11 ; - int : - - , detint. i23: a5 , c12 ; - long: - - , setlong. i24: a5 , c13 ; - real: - - , setreal. i25=i19 ; procnotyp: see parpr long. i26: d20 , 12 , a6 ; zone : in2newop(12), s.testzone. i27: d20 , 18 , c3 ; formalzone: in2newop(18), return. i28: d20 , 14 , c3 ; zonearray : in2newop(14), return. i29: d20 , 8 , c3 ; label : in2newop(8) , return. i30: c31 , a7 ; nxtofstrng: if toplit(s.longstr), d15 , 4 , b1+b21; inout(4), b.strnext. a1: d20 , 18 , d5 ; getformal : in2newop(18), clearblk, c20 , c3 ; if tasteendparam(return.), b2+b24, c15 ; op.takeform, addrreg. a2: d20 , 22 ; getarray : in2newop(22), d17 , -3 ; intow1(-3), d17 , -2 , c3 ; intow1(-2), return. a3: d20 , 10 , d7 ; getparpr : in2newop(10), clearall, c20 , a4 , c3 ; if tasteendparam(s.testfp), return. a4: c37 , c3 , d30 ; testfp : if topext(return.), w1down, d22 , 18 , c3 ; newop(18), return. a5: d20 , 20 , d7 ; getnoppr : in2newop(20), clearall, c3 ; return. a6: c37 , c17 ; testzone : if topext(doublereturn.), d37 , -h6+1 , c17 ; toprel(-zonebaserel), doublereturn. a7: d8 , d14 , -3 ; longstr : clearreg, outfromw1(-3), d14 , -2 ; outfromw1(-2), d14 , -1 ; outfromw1(-1), d14 , 0 , d30 ; outfromw1(0) , w1down, b0+b20, c16 ; b.lngstrng, valreg. e. ; end operands in input \f ; rc 17.3.1971 algol 6, pass 7, page 33 b. a8 ; normal dyadic operators h. ; j5: ; i31: c33 , d36 ; plus: if nxtreg(exch), c24 ; if toplit and nxtlit(littypact c75 , c76 , c77 ; (pluint.,plulong.,plureal.)), d1 , c5 , b2+b26; toptoreg, toptypop(wa), j0: c16 ; valreg: valreg. i32: d36 ; minus: exch, j1: c24 ; subtr1: if toplit and nxtlit(littypact c78 , c79 , c80 ; (subint.,sublong.,subreal.)), j2 , c16 ; s.subtr2, valreg. j2: d1 ; subtr2: toptoreg, j3: c25 ; subtr3: if toplit(littestact c97 , c98 , c99 ; (int0.,long0.,real0.)), c5 , b3+b29 ; toptypop(ws.) i33: c33 , d36 ; mult: if nxtreg(exch), c24 ; if toplit and nxtlit(littypact c73 , c6 , c74 ; (mulint.skip3,mulreal.)), c29 ; typswitch a1 , a2 , a3 ; (s.intm.,s.longm.,s.realm.). a1: d1 , b2+b32 ; intm: toptoreg, op.wm, j4: c38 , b0+b35, c16 ; multest:if spillyes(b.multtest), valreg. a2: d6 , b2+b36 ; longm: clearuv, op.prepuvop, b2+b34 ; op.longmult, j16: d26 , 1 , g13 ; uvlong: newvalandop(1,uv), c12 ; setlong. a3: d1 , b2+b33, c16 ; realm: toptoreg, op.fm, valreg. i34: d36 , c22 ; div: exch, if toplit and nxtlit c72 ; (litact(divreal.)), d1 , b2+b38, c16 ; toptoreg, op.fd, valreg. i35: j7 ; ldivi: s.intlong, i36: d6 , b2+b36 ; ldivl: clearuv, op.prepuvop, b2+b39, j16 , c3 ; op.longdiv, s.uvlong, return. a4: ; i37: d36 ; idivi: exch, d1 , b2+b37, c16 ; toptoreg, op.wd, valreg. i38: j7 ; lmodi: s.intlong, i39: d6 , b2+b36 ; lmodl: clearuv, op.prepuvop, b2+b41, j16 , c3 ; op.longmod, s.uvlong, return. i40: a4 , b1+b40 ; imodi: s.divi, b.rlw10. \f ; rc 14.04.1971 algol 6, pass 7, page 34 i41: j8 ; explong:s.longint, i42: c31 , a5 ; expint: if toplit(s.litexp), d36 , d6 , b2+b36; exch, clearuv, op.prepuvop, b2+b42, j17 , c3 ; op.intexp, s.uvreal, return. a5: c39 , d30 , d8 ; litexp: testexpval., w1down, clearreg, c34 , d1 , d31 ; if nottopwrk(toptoreg,w1up), c40 , b0+b33, b0+b33; selectexp(b.fm,b.fm, b0+b33, b0+b33, b0+b33; b.fm,b.fm,b.fm), b2+b33, j0 , c17 ; op.fm, s.valreg, doublereturn. i43: d36 , d6 , b2+b36; expreal:exch, clearuv, op.prepuvop, b2+b43 ; op.realexp, j17: d26 , 1 , g13 ; uvreal: newvalandop(1,uv), c3 ; return. i44: d36 ; add: exch, c26 ; if toplit and nxtlit(litlnthact c67 , c68 , c69 ; (addsh.,addmed.,addlong.)), d38 ; savetoptyp, c36 , 2 , a6 ; if toptyp(long,s.addext), c36 , 3 , a6 ; if toptyp(real,s.addext), c33 , d36 , d1 ; if nxtreg(exch), toptoreg, c4 , g25 , b2+b25; savmodif(length,op.ba), j0 , c9 ; s.valreg, setsavtyp. a6: d36 , c23 , c86 ; addext: exch, if toplit(litact(addext.)), c35 , h12 , b1+b44; if top(reg,b.alw00.), d8 , b1+b44 ; clearreg, b.alw00. i45: d36 ; shift: exch, c26 ; if toplit and nxtlit(litlnthact c64 , c65 , c66 ; (shsh.,shmed.,shlong.)), d38 , d1 ; savetoptyp, toptoreg, c4 , g25 , b2+b45; savmodif(length,op.shift), j0 , c9 ; s.valreg, setsavetyp. i46: c32 , a8 ; extract:if toplit(go(s.litmask).), d8 , b2+b48, a7 ; clearreg, op.formmask, s.gethalf, b0+b49, j0 , c11 ; b.law10, s.valreg, setint. a7: c36 , 0 , b3+b10; gethalf:if toptyp(bool,op.bl.), b3+b11 ; op.rl. a8: d43 ; litmask:formlitmask, c26 ; if toplit and nxtlit(litlnthact c70 , c71 , c71 ; (extrsh.,extrmed.,extrlong.)), c33 , d36 , d1 ; if nxtreg(exch), toptoreg, b2+b50, j0 , c11 ; op.la, s,valreg, setint. i47: c33 , d36 ; and: if nxtreg(exch), d1 , b2+b50, c16 ; toptoreg, op.la, valreg. i48: c33 , d36 ; or: if nxtreg(exch), d1 , b2+b51, c16 ; toptoreg, op.lo, valreg. i49: c33 , d36 , j6 ; equiv: if nxtreg(exch), s.not, d1 , b2+b52, c16 ; toptoreg. op.lx, valreg. e. ; end normal dyadic operators \f ; rc 16.3.1971 algol 6, pass 7, page 35 b. a28; relational operators h. ; i50: a1 , a26 ; < : s.ls , s.boolres. i51: a2 , a26 ; <=: s.lseq, s.boolres. i52: a5 , a26 ; = : s.eq , s.boolres. i53: a3 , a26 ; >=: s.greq, s.boolres. i54: a4 , a26 ; > : s.gr , s.boolres. i55: a6 , a26 ; <>: s.neq , s.boolres. i56: a1 , b1+b53 ; <then : s.ls , b.condj. i57: a2 , b1+b53 ; <=then: s.lseq, b.condj. i58: a5 , b1+b53 ; =then : s.eq , b.condj. i59: a3 , b1+b53 ; >=then: s.greq, b.condj. i60: a4 , b1+b53 ; >then : s.gr , b.condj. i61: a6 , b1+b53 ; <>then: s.neq , b.condj. i62: a1 , a27 ; <while : s.ls , s.whileres. i63: a2 , a27 ; <=while: s.lseq, s.whileres. i64: a5 , a27 ; =while : s.eq , s.whileres. i65: a3 , a27 ; >=while: s.greq, s.whileres. i66: a4 , a27 ; >while : s.gr , s.whileres. i67: a6 , a27 ; <>while: s.neq , s.whileres. j20=i63, j19=i60 ; used in for statements. ; the action relationswitch switches to one of its six s.parameters ; as follows: ; not (toplit or nxtreg): topint: 1., toplong: 2., topreal: 3. ; toplit or nxtreg: - : 4., - : 5., - : 6. a1: c28 ; ls: relationswitch (see above and a12 , a17 , a24 ; a-actions on next page) a8 , a17 , a17 ; a2: c28 ; lseq: a13 , a22 , a22 ; a16 , a22 , a19 ; a3: c28 ; greq: a15 , a21 , a20 ; a14 , a21 , a21 ; a4: c28 ; gr: a9 , a18 , a18 ; a11 , a18 , a23 ; a5: c30 , d36 , d1 ; eq: if toplit or nxtreg(exch), toptoreg, c36 , 1 , b3+b54; if toptyp(int,op.se.), a25 , b0+b66, b1+b60; s.relatsub, b.low02, b.sew00. a6: c30 , d36 , d1 ; neq: if toplit or nxtreg(exch), toptoreg, c36 , 1 , b3+b55; if toptyp(int,op.sn.), a25 , b0+b66, b1+b61; s.relatsub, b.low02, b.snw00. \f ; jz 1979.09.14 algol 8, pass 7, page 36 ; relational operators, auxilliary actions, switched to from previous ; page. a7: d44 , 1 ; topval(+1), a8: d36 ; exch, a9: d1 , b3+b56 ; toptoreg, op.sl. a10: d44 , -1 ; topval(-1), a11: d36 ; exch, a12: d1 , b3+b57 ; toptoreg, op.sh. a13: d36 ; exch, a14: c32 , a10 ; if toplit(go(s.a10).), d36,j2, b1+b59 ; exch, s.subtr2, b.shw1-1. a15: d36 ; exch, a16: c32 , a7 ; if toplit(go(s.a7).), d36,j2, b1+b58 ; exch, s.subtr2, b.slw11. a17: d36 ; exch, a18: j2 , b1+b62 ; s.subtr2, b.slw00. a19: d36 ; exch, a20: j2 , b1+b64 ; s.subtr2, b.slw01. a21: d36 ; exch, a22: j2 , b1+b65 ; s.subtr2, b.shw0-1. a23: d36 ; exch, a24: j2 , b1+b63 ; s.subtr2, b.shw00. a25: c25 ; relatsub: if toplit(littestact c97 , c98 , c98 ; (int0.,long0.,long0.)), b3+b153 ; op.long compare. a26: b0+b67, j0 ; boolres: b.boolean, s.valreg, a28 , c17 ; s.setbool, doublereturn. a27: b0+b68, b0+b69 ; whileres: b.condbyp, b.byplab, c17 ; doublereturn. a28: c10 ; setbool: setbool. e. ; end relational operators \f ; rc 4.3.1971 algol 6, pass 7, page 37 b. a1 ; monadic operators h. ; j6: ; i68: d26 , -1 , 2 ; not: newvalandop(-1,litint), c33 , d36 ; if nxtreg(exch), d1 , b2+b52, c16 ; toptoreg, op.lx, valreg. i69: c23 , c94 ; negint: if toplit(litact(negint.)), c35 , h15 , a1 ; if top(addr,s.negvar.), c35 , h12 , b1+b74; if top(reg,b.acw1x1.), d8 , a1 ; clearreg, s.negvar. a1: b2+b75, j0 , c17 ; negvar: op.ac, s.valreg, doublereturn. i70: c23 , c95 ; neglong: if toplit(litact(neglong.)), d8 , b0+b70, b2+b30; clearreg, b.ldw164, op.ss, c16 ; valreg. i169: c23 , c96 ; negreal: if toplit(litact(negreal.)), d1 , d27 , f39 ; toptoreg, newentry(-1.0, 6 , b2+b33, c16 ; litreal), op.fm, valreg. i71: d8 ; absint: abslong: clearreg, c34 , d1 , d31 ; if nottopwrk(toptoreg,w1up), c5 , b2+b71, c16 ; toptypop(abs), valreg. i170: d1 , d27 , f39 ; absreal: toptoreg, newentry(-1.0, 6 , b2+b73, c16 ; litreal), op.absreal, valreg. i72: d27 , f36 , 6 ; entier: newentry(-.5,litreal), j5 , j9 , c3 ; s.plus, s.realint, return. j7: ; i73: c23 , c88 ; intlong:if toplit(litact(intlong.)), d1 , b0+b80, b0+b81; toptoreg, b.blw02, b.blw00, j0 , c12 ; s.valreg, setlong. j10: ; i74: c23 , c89 ; intreal:if toplit(litact(intreal.)), d1 , b0+b77 ; toptoreg, b.ci, j0 , c13 ; s.valreg, setreal. j8: ; i75: c23 , c90 ; longint:if toplit(litact(longint.)), d1 , j4 , c11 ; toptoreg, s.multest, setint. j11: ; i76: c23 , c91 ; lngreal:if toplit(litact(longreal.)), d1 , b0+b78 ; toptoreg, b.floatlng, j0 , c13 ; s.valreg, setreal. j9: ; i77: c23 , c92 ; realint:if toplit(litact(realint.)), d1 , b0+b76 ; toptoreg, b.cf, j0 , c11 ; s.valreg, setint. i78: c23 , c93 ; reallng:if toplit(litact(reallong.)), d1 , b0+b79 ; toptoreg, b.longround, j0 , c12 ; s.valreg, setlong. i79: d36 , j7 ; nxtintlong: exch. s.intlong, d36 , c3 ; exch, return. i80: d36 , j10 ; nxtintreal: exch, s.intreal, d36 , c3 ; exch, return. i81: d36 , j11 ; nxtlngreal: exch, s.lngreal, d36 , c3 ; exch, return. i82: c12 ; oplong: opstrng: setlong. i83: c13 ; opreal: setreal. e. ; end monadic operators \f ; rc 11.05.1971 algol 6, pass 7, page 38 b. a12; array declarations, see also stackpicture on next page. h. ; i84: ; begbounds: d16 , f13 ; intopar(arraytype), d16 , f14 ; intopar(counter), d16 , f12 ; intopar(relbase), d28 , 0 ; newlocalvar(0), d26 , 1 , g15 ; newvalandop(1,litint), d32 , +12 ; setw1(+2*6), d28 , 4 ; newlocalvar(loweraddr), d32 , +18 ; setw1(+3*6), d28 , 2 ; newlocalvar(upperaddr), d32 , +18 ; setw1(+3*6), d28 , 6 ; newlocalvar(ciaddr), d26 , -1 , g15-4 ; newvalandop(-1,shield), c3 ; return. i85: ; firstbounds: c35 , h15 , a0 ; if top(addrreg,s.getvalreg), c35 , h12 , c8 ; if top(reg, skip1 d8 ; (clearreg)), a1 , d32 , -30 ; s.bounds, setw1(ui1), c21 , c3 ; if tasteendbounds(return.), a2 ; s.setlimit, d32 , -30 , a2 ; setw1(li1), s.setlimit, d32 , +42 , c3 ; setw1(shield), return. i86: ; notfirstbound: d8 , a1 , d31 ; clearreg,s.bounds, w1up, c35 , h10 , a7 ; if top(work,s.litorreg), a6 , j1 , j1 ; s.savesub1, s.subtr1, s.subtr1, d33 , -36 , d35 ; setplace(ci2), copyentry, d33 , -12 , a4 ; setplace(ci1), copyandmove, d32 , -36 ; setw1(li1), d45 , h18 ; delete(workbits), d32 , +12 , a7 ; setw1(ci2), s.litorreg, a8 , j5 , a2 ; s.mult1, s.plus, s.setlimit, d33 , -6 , d35 ; setplace(li1), copyentry, d32 , +30 ; setw1(ci1), a8 , j5 ; s.mult1, s.plus, c21 , c3 ; if tasteendbounds(return), a2 , d32 , +12 ; s.setlimit, setw1(ciaddr), d37 , +2 ; toprel(+2), d26 , -1 , g15-4 ; newvalandop(-1,shield), c3 ; return. a0: d1 , c16 ; getvalreg: toptoreg, valreg. a1: d33 , -36 , d35 ; bounds: setplace(ui1), copyentry, d30 , d33 , -54 ; w1down, setplace(li1), d35 , c3 ; copyentry, return. \f ; rc 4.3.1971 algol 6, pass 7, page 39 ; array declarations, subroutines etc. a2: ; setlimit: comment resulting w1: w1up; d33 , +6 ; setplace(+1*6), c32 , a3 ; if toplit(go(litlim).), d1 , b2+b15, d31 ; toptoreg, op.rs, w1up, a3: d35 , d34 , c3 ; litlim: copyentry, placetow1, return. a4: ; copyandmove: comment resulting w1: -2*6; c35 , h12 , a5 ; if top(reg,s.copyaddrentry.), d35 , d1 , b3+b15; copyentry, toptoreg, op.rs. a5: d1 , d35 ; copyaddrentry: toptoreg, copyentry, b2+b15, c17 ; op.rs, doublereturn. a6: d30 ; savesub1: w1down, c22 ; if toplit and nxtlit(litact c81 ; (addandclearnxt)), d31 ; w1up, j18: c3 ; return: return. a7: ; litorreg: c22 , c3 ; if toplit and nxtlit(return.), d30 , c16 ; w1down, valreg. j12: ; a8: c33 , d36 ; mult1: if nxtreg(exch), c22 ; if toplit and nxtlit(litact c73 ; (mulint.)), d1 , b2+b32, c16 ; toptoreg, op.wm, valreg. ; picture of the w1-stack after begbounds has been processed. the names ; used during array declarations are shown. the ones in () have not been ; initialized by begbounds. ; x1-84: (before begbounds) ; -78: baseword descr ; -72: lit 1 ; -66: (lower1) ; -60: (upper1 or, in endbounds, length) ; -54: loweraddr ; -48: (li1) ; -42: (limitl) ; -36: (ci2) ; -30: upperaddr ; -24: (ui1) ; -18: (limitu) ; -12: (ci1) ; -6: ciaddr ; 0: shield -1 ; (+6: li) ; (+12: ui) \f ; rc 5.3.1971 algol 6, pass 7, page 40 ; array declarations, endbounds. ; comment the action preparrdecl sets savetyp:= pass7typ(arraytyp) ; and rel(baseword descr):= rel(baseword descr) - 2 *(counter-1); i87: d46 ; endbounds: preparrdecl, a11 ; s.shiftlim, d33 , -36 , a4 ; setplace(upper1), s.copyandmove, d32 , -12 , a11 ; setw1(li1), s.shiftlim, d26 , 1 , 2 ; newvalandop(1,litint), a11 , d36 , j1 ; s.shiftlim, exch, s.subtr1, d33 , -18 , a4 ; setplace(lower1), s.copyandmove, d32 , -6 ; setw1(lower1), d33 , +12 , d35 ; setplace(loweraddr), copyentry, d34 , a7 , j1 ; placetow1, s.litorreg, s.subtr1, a6 , d33 , -6 ; s.savesub1, setplace(-1*6), c42 , -1 , a10 ; if count(-1) iszero:(go(s.declarr1),), c32 , a10 ; if toplit(go(s.declarr1).), d8 ; clearreg, comment continues; a9: d34 , b0+b85 ; declnxtarr: placetow1, b.reserve, b2+b29, j3 , b2+b15; op.ws, s.subtr3, op.rs, c42 , 0 , j18 ; if count(+0) iszero:(go(s.return).), c42 , -1 , a12 ; if count(-1) iszero:(go(s.lastdecl).), d47 ; norelease a12: d31 , d37 , +2 ; lastdecl: w1up, toprel(+2), d32 , 18 ; setw1(length), a10: d1 , c18 , a9 ; declarr1: toptoreg, go(s.declnxtarr). j13: ; shiftindex: a11: ; shiftlim: c44 , 0 , c3 ; if savetyp(bool,return.), c23 , c87 ; if toplit(litact(litlim.)), d1 ; toptoreg, c4 , g25 , b0+b82; savmodif(length,basw10), c16 ; valreg. e. ; end array declarations \f ; jz.fgs 1985.06.12 algol 6, pass 7, page 41 b. a3 ; zone and zonearray declarations h. ; i88: d48 , d16 , f14 ; beginzone: savew1, intopar(counter), d16 , f12 , d50 ; intopar(relbase), prepzonedecl, ; comment adjusts relbase and sets zonedecl to true, d28 , 0 ; newlocalvar(0), d28 , h7 ; newlocalvar(procrel), d28 , h6 ; newlocalvar(sharenorel), d28 , h6+2 , c3 ; newlocalvar(lengthrel), return. i89: d48 , d16 , f12 ; beginzonearr: savew1, intopar(relbase), d51 , d28 , 0 ; prepzarrdecl, newlocalvar(0), ; comment sets zonedecl to false, d26 , h7 , g15-2 ; newvalandop(procrel,zonereladdr), d26 , h6 , g15-2 ; newvalandop(sharenorel,zonereladdr), d28 , 0 ; newlocalvar(0), d26 , h6+2 , g15-2 ; newvalandop(lengthrel,zonereladdr). d28 , 0 ; newlocalvar(0), d26 , -h6 , g15 ; newvalandop(-baserel-1,litint), d26 , -h5 , g15 ; newvalandop(-descrlength,litint), d28 , -2 , c3 ; newlocalvar(-2),return. i90: d1 , b2+b15, b2+b32; noofzones: toptoreg, op.rs, op.wm, b0+b85, b2+b26, b3+b15; b.reserve, op.wa, op.rs. i91: d1 , c41 , b3+b15; firstzcom: toptoreg, if zonedecl(op.rs.), b0+b86, b2+b15, d3 ; b.loadw3, op.rs, outopand, b1+b87 ; b.zonebase. i92: d1 ; seczncom: toptoreg, c46 , b3+b15 ; setbooltrue(ifwasfalse(op.rs.)), c3 ; return. i93: a1 ; endzdecl: s.blockproc, c45 ,a2 ; setboolfalse(ifwastrue(s.termzdecl), d49 , c3 ; restorew1, return. a1: c37 , b3+b13 ; blockproc: if topext(op.loadpoint), b3+b155 ; op.blpr is formal a2: b2+b16 ; termzdecl: op.ds, c41 , a3 , d47 ; if zonedecl(s.loadzone.), norelease, d3 , b0+b87,b2+b12 ; outopand, b.zonebase, op.dl, b1+b88 ; b.initzone. a3: d13 , f14 ; loadzone: outfrompar(counter), b2+b89, b0+b88, c17 ; op.loadznseg, b.initzone, doublereturn. e. ; end zone and zonearray declarations \f ; fgs 1987.06.15 algol 6, pass 7, page 42 b. a30; subscripting h. ; i94: a3 ; endsub1:s.begsub, comment continues , a1: d32 , -12 , d38 ; endsub: setw1(arraydescr), savetoptyp, d32 , +12 , a4 ; setw1(index), s.getindex, j14: c15 ; addrreg:addrreg. i95: j5 , a1 , c3 ; endsubm:s.plus, s.endsub, return. i96: a3 ; frstsub:s.begsub, comment continues a2: d30 , d37 , +2 ; notlsub:w1down, toprel(+2), d33 , +12 , d35 ; setplace(+2*6), copyentry, d34 , j12 , c3 ; placetow1, s.mult1, return. i97: j5 , a2 , c3 ; notfsub:s.plus, snotlsub, return. a3: d29 , g14 ; begsub: newdopeaddr(noclearvar), d36 , c3 ; exch, return. a4: c52 , a21 ; getindex: if ix.yes (s.makeix_index). c47 , a5 ; if indexcheck(s.checkindex.) j13 , d1 , d30 ; s.shiftindex, toptoreg, w1down. b2+b26, c3 ; op.wa, return. a5: d1 ; checkindex: toptoreg, c4 , g25 , b0+b82; savmodif(length,b.asw10), d29 , g14 ; newdopeaddr(noclearvar), b2+b90, d30 ; op.indexch, w1down. b2+b26, c17 ; op.wa, doublereturn. i98: d39 , a7 ; fieldbool: savebool, s.field. i99: d40 , a7 ; fieldint : saveint , s.field. i100: d41 , a7 ; fieldlong: savelong, s.field. i101: d42 , a7 ; fieldreal: savereal, s.field. i102: d39 , a6 ; fieldsubbool: savebool, s.fieldsub. i103: d40 , a6 ; fieldsubint : saveint , s.fieldsub. i104: d41 , a6 ; fieldsublong: savelong, s.fieldsub. i105: d42 , a6 ; fieldsubreal: savereal, s.fieldsub. a6: j13 , j5 ; fieldsub: s.shiftindex, s.plus, a7: d30 , a8 , c17 ; field: w1down, s.fieldref, doublereturn. a8: c48 , h28 , a9 ; fieldref: if topkind(arr,s.fieldindex), d31 , d1 ; w1up, toptoreg, c35 , h10 , b0+b86; if top(work,b.loadw3), c52 , a24 ; if ix (s.makeix_z_field), c47 , a10 ; if indexcheck(s.recfieldch), a11 , c3 ; s.recref, return. a9: d31 , c52 , a22 ; fieldindex: w1up, if ix (s.makeixfield), c47 , a16 ; if index (s.fieldch), d1 , b2+b26, j14 ; toptoreg, op.wa, s.addrreg, j15 , c17 ; s.setsavetyp, doublereturn. \f ; fgs 1987.06.15 algol 6, pass 7, page 43 a10: b0+b96 ; recfieldch: b.reccheck, c4 , g25 , b0+b93; savmodif(length,b.recch0), b1+b91 ; b.fieldalarm. i106: d42 , d1 ; endrec: savereal, toptoreg, c35 , h10 , b0+b86; if top(work,b.loadw3), c52 , a23 ; if ix (s.makeixzrec), b0+b84, c47 , a15 ; b.as2, if indexcheck(s.reccheck), a11: b0+b26, a12 , j14 ; recref: b.wa, s.zoneref, s.addrreg, j15: c9 ; setsavetyp: setsavetyp. a12: c48 , h30 , a13 ; zoneref: if topkind(zone,s.simplezone), d26 , 0 , g15-2 ; newvalandop(0,zonereladdr), d3 , d3 , b1+b87; outopand, outopand, b.zonebase. a13: c37 , c3 ; simplezone: if topext(return), d3 , c17 ; outopand, doublereturn. a15: b0+b96 ; reccheck: b.reccheck, c4 , g25 , b0+b93; savmodif(length,b.recch0), b1+b92 ; b.indexalarm. a16: d29 , g14 , d36 ; fieldch: newdopeaddr(noclearvar), exch, d1 ,b2+b100 ; toptoreg, op.fieldch, c4 , g25 , b0+b97; savmodif(length,b.fieldch0), b0+b91, c16 ; b.fieldalarm, valreg. i107: d1 ,b2+b101, d31 ; zonesub:toptoreg, op.zindexch, w1up, d26 , h5 , g15 ; newvalandop(descrlength,litint), b2+b32, b2+b26, c14 ; op.wm, op.wa, zonereg. i108: d39 , a17 ; arrfbool: savebool, arrfield. i109: d40 , a17 ; arrfint : saveint , arrfield. i110: d41 , a17 ; arrflong: savelong, arrfield. i111: d42 , a17 ; arrfreal: savereal, arrfield. a17: d1 , j0 , d8 ; arrfield: toptoreg, s.valreg, clearreg, d36 , a18 , c17 ; exch, s.arrf1, doublereturn. a18: c48 , h28 , a20 ; arrf1: if topkind(arr,s.arrref.) c35 , h10 , b0+b86; if top(wrk,b.loadw3), c48 , h30 , a19 ; if topkind(zone,s.simplezone1.), d26 , 0 , g15-2 ; newvalandop(0,zonereladdr), b2+b103 ; op.storebase, d26 , 6 , g15-2 ; newvalandop(6,zonereladdr), b2+b104, d3 , b1+b87; op.getdoper, outopand, b.zonebase. a19: c37 , c3 ; simplezone1: if topext(return.), b2+b103, d31 ; op.storebase, w1up, d37 , 6 ,b2+b104; toprel(+6), op.getdoper, c17 ; doublereturn. a20: b2+b103, d32 , +12 ; arrref: op.storebase, setw1(+2*6), d29 , g14 ; newdopeaddr(varnoclear), b2+b104, d32 , -12 ; op.getdoper, setw1(-2*6), c17 ; doublereturn. \f ; fgs 1987.06.15 algol 6, pass 7, page 43b a21: d1 , c19 , d36 ; makeix_index: toptoreg, newdope_to_type_literal(doperel), exch, b2+b156, ; op.ixw1, c4 , g25 ,b2+b157; savmodif (length, b.dopereltype_index), c17 ; doublereturn. a22: d1 , d29 , g14 ; makeixfield: toptoreg, newdopeaddr (noclearvar), c19 , d36 ; newdope_to_literal_type (doperel), exch, b2+b156 ; op.ixw1, c4 , g28 ,b2+b157; savemodif (length, b.dopereltype_field), j14 , j15 ; s.addrreg, s.setsavetyp, c57 ; tripplereturn. a23: b0+b156 ; makeixzindex: b.ixw1, a12 , j14 , j15 ; s.zoneref, s.addrreg, s.setsavetyp, d31 , c59 ; w1up, createnewdoperel, c4 , g25 ,b2+b157; savemodif (length, b.dopereltype_index), c17 ; doublereturn. a24: b0+b156 ; makeixzfield: b.ixw1, a12 , j14 , j15 ; s.zoneref, s.addrreg, s.setsavetyp, d31 , c59 ; w1up, createnewdoperel, c4 , g28 ,b2+b157; savemodif (length, b.dopereltype_field), c17 ; doublereturn. e. ; end subscripting \f ; rc 29.04.1971 algol 6, pass 7, page 44 b. a6 ; procedure calls h. ; i112: d26 , 0 , g15-4 ; begcall: newvalandop(0,shield), d17 , 0 , d52 ; intow1(0), prepcall, b1+b105 ; b.begcall. i113: d26 , 0 , g15-4 ; callnopar: newvalandop(0,shield), d52 ,b0+b105 ; prepcall, b.begcall, i114: d14 , 0 ; endcall: outfromw1(0), d14 , -1 , d30 ; outfromw1(-1), w1down, d38 ,b2+b106 ; savetoptyp, op.endcall, j17 , c9 ; s.uvreal, setsavetyp. i115:b1+b107 ; begpar: b.begpar. i116: c35 , h15 , a1 ; addrpar: if top(addr, s.addrex.), i117: c49 ; valpar: parkind a2 , a5 ; (s.valex., s.arrpar1), d15 , 1 ; inout(1), c4 , g17 ,b3+b110; savmodif(param,op.endpar.) a1: d15 , 1 , d4 ; addrex: inout(1), release, b0+b108, c17 ; b.addrex, doublereturn. a2: d53 , d1 ; valex: countlitpar, toptoreg, d15 , 1 ,b0+b109; inout(1), b.valueex, c17 ; doublereturn. i118: d15 , 1 , c49 ; par: inout(1), parkind a4 , a6 ; (s.parex.,s.arrpar2), a3: c4 , g17 ,b3+b110; parout: savmodif(param,op.endpar.) a4: c4 , g17 ,b0+b110; parex: savmodif(param,b.endpar), d4 , c17 ; release, doublereturn. a5: d15 , 1 ; arrpar1: inout(1), a6: d13 , f12 , c3 ; arrpar2: outfrompar(dopebaserel), return. i119: d4 , c3 ; deletecall: release, return. e. ; end procedure calls \f ; rc 1978.08.10 algol 6, pass 7, page 45 b. a6 ; conditions, case, switch h. ; i120:b0+b111 ; if: b.forif, i121: d7 , c3 ; case: clearall, return. i122: d1 ,b0+b112, b1+b53; then: toptoreg, b.sow11, b.condj. i123: d1 ,b1+b113 ; of: toptoreg, b.of. i124: d1 ,b1+b114 ; ofsw: toptoreg, b.ofsw. i125: a3 ,b1+b115 ; elseex: s.prepelem, b.else. i126: a3 , a5 ; endelseex: s.prepelem, s.copytyp, b0+b116, j0 , c9 ; b.endelse, s.valreg, setsavetyp. i127: c32 , a1 ; caseex: if toplit(go(litcase).), a3 ,b1+b117 ; s.prepelem, b.case. i128: c32 , a2 ; endcaseex: if toplit(go(endlitcase).), a3 , a5 ; s.prepelem, s.copytyp, b0+b119, j0 , c9 ; b.endcase, s.valreg, setsavetyp. a1: d38 , a4 ; litcase: savetoptyp, s.pass8typ, b3+b118 ; op.litcase. a2: d38 , a4 ; endlitcase: savetoptyp, s.pass8typ, a5 ,b2+b120 ; s.copytyp, op.endlitcase, j0 ,c9 ; s.valreg, setsavetyp. a3: d38 , d1 ; prepelem: savetoptyp, toptoreg a4: c4 , g27 , b1 ; pass8typ: savmodif(pass8typ,b.0.) a5: d16 , f6 ; copytyp: intopass(savetyp), a4 , c3 ; s.par8typ, return. i129: b0+0 ,b1+b115 ; elsest: b.0, b.else. i130: b0+0 , b0+0 ,b1+b116; endelsest: b.0, b.0, b.endelse. i131: b0+0 ,b1+b117 ; casesem: b.0, b.case. a6: ; i132: b0+0 , b0+0 ,b1+b119; endcasest: b.0, b.0, b.endcase. i133: d1 , a6 ; endswitch: toptoreg, s.endcasest, b0+b16, d58 , g19 ; b.ds, outfrompar1(currbl), d13 , g19 , c3 ; outfrompar(currbl), return. e. ; end conditions, case, switch \f ; jz 1982.06.18 algol 8, pass 7, page 46 b. a19; for statements h. ; i134: d22 , g11-2 , d10 ; for: newop(valinwrk), reservework, d22 , g11-4 , d10 ; newop(longwrk), reservework, b1+b111 ; b.forif. i135: d45 , h16 , c3 ; forass: addr: delete(clearbit), return. a14: ; i136: a1 , a12 ; forelem:s.forlab ,s.while, b0+b138, b1+b69 ; b.doabs , b.byplab. a1: d8 , d48 ; forlab: clearreg, savew1, d32 , -12 , d47 ; setw1(forlabwrk), norelease, b2+b139, d49 , c3 ; op.forlab, restorew1, return. i137: a1 , a12 ; step: s.forlab, s.while, b0+b140, b1+b69 ; b.step, b.byplab. i138: d6 ; until: clearuv, c100 , a19 ; if top(longextvar, s.extvartowork), c35 , h10 , a2 ; if top(wrk,s.workstep), d47 , d1 , d30 ; norelease, toptoreg, w1down, d38 , d47 ; savetoptyp, norelease, c5 , b2+b26, d47 ; toptypop(wa), norelese, c4 , g25 , b2+b14; savmodif(length,op.hs), d33 , 12 , d35 ; setplace(+2*6), copyentry, d34 , d45 , h18 ; placetow1, delete(workbits), b1+b69 ; b.byplab. a19: ; extvartowork: d1 , d22 , g11-4 ; toproreg, newop(longwrk), d10 , d47 , b3+b16; reservework, norelease, op,ds. a2: d48 , d32 , -18 ; workstep: savew1, setw1(stepwrk), d47 ,b2+b141, b0+b58; norelease, op.testfirst, b.slw11, d49 ,b1+b53 ; restorew1, b.condj. i139: d32 , -12 ; stepelem: setw1(stepdescr), c32 , a4 ; if toplit(go(s.litstep1).), a8 , a3 , b1+b53; s.teststep, s.stepcond1, b.condj. a3: c44 , 1 ,b1+b145; stepcond1: if savetyp(int,b.slw10.), b1+b62 ; b.slw00. a4: a5 , j19 , d30 ; litstep1: s.litstep, s.>then, w1down, c3 ; return. a5: c43 , a7 ; litstep: if topvalneg(s.negstep.), a6: d32 , +12 ; contrdescr: setw1(until), c35 , h26 , c3 ; if top(regoruv,return), d30 ; w1down, c34 , d30 , j0 ; if nottopwrk(w1down, s.valreg), d31 , c3 ; w1up, return. a7: a6 , d36 , c17 ; negstep: s.contrdescr, exch, doublereturn. \f ; rc 17.3.1971 algol 6, pass 7, page 47 ; for statements, continued a8: d32 , +12 , d1 ; teststep: setw1(untildescr), toptoreg, d38 , c29 ; savetoptyp, typswitch a16 , a17 , a18 ; (s.intunt.,s.longunt.,s.realunt.) a16: b2+b29,b0+b148, b3+b52; intunt: op.ws, b.sew10, op.lx. a17: b2+b30,b0+b150,b0+b148; longunt: op.ss, b.low10, b.sew10a, a9: c36 , 1 ,b3+b146; signtest: if toptyp(int,op.lxw00.), c35 , h10 , a15 ; if top(wrk, s.wrksign.), d37 , -2 ,b3+b146; toprel(-2), oplxw0. a18: b2+b31,b0+b149, a9 ; realunt: op.fs, b.sew00a, s.signtest, c3 ; return. a15: d44 , -2 , d47 ; worksign: topval(-2), norelease, b2+b146, d44 , +2 ; op.lxw0, topval(+2), d4 , c17 ; release, doublereturn. a12: ; i140: d1 , d47 , d38 ; while: toptoreg, norelease, savetoptyp, c4 , g25 , b3+b14; savmodif(length,op.hs.) i141: d1 ,b0+b102, b1+b53; whilele: toptoreg, b.szw11, b.condj. i142: a14 ,b0+b142, b1+b69; fordo: s.forelem, b.bypabs, b.byplab. i143: d32 , -12 ; stepdo: setw1(stepdescr), c32 , a11 , a8 ; if toplit(go(litstep2).), s.teststep, a10 , b0+b68, b1+b69; s.stepcond2, b.condbyp, b.byplab. a10: c44 , 1 , b1+b59; stepcond2: if savetyp(int,b.shw1-1.), b1+b65 ; b.shw0-1. a11: a5 , j20 , d30 ; litstep2: s.litstep, s.<=while, w1down, c3 ; return. i144: d1 ,b0+b112, b0+b68; whiledo:toptoreg, b.sow11, b.condbyp, b1+b69 ; b.byplab. i145: d4 ,b2+b143, d4 ; enddo1: release, openddo1, release, c3 ; return. i146: d4 ,b2+b144, d4 ; enddon: release, op.enddon, release, c3 ; return. i147: d8 , d30 , d47 ; whilelab: clearreg, w1down, norelease, b2+b139, d31 , b1+b69; op.forlab, w1up, b.byplab. e. ; end for statements \f ; rc 14.04.1971 algol 6, pass 7, page 48 b. a5 ; blocks, odds and ends h. ; i148: d24 , d16 , f12 ; begext: tastenext, intopar(blind), c3 ; return. comment skips a gotobyp. i149: a1 ,b1+b121 ; begblock: s.initbl, b.begblock. i150: d15 , 1 , a1 ; begproc: inout(1), s.initbl, b1+b122 ; b.begproc. a1: d27 , f8 , f18 ; initbl: newentry(workbits,blockw1), d27 , f10 , g15-4 ; newentry(workinform,shield), d16 , f12 , d54 ; intopar(relbase), prepblock, c3 ; return. i151: d55 , d13 , f12 ; endblock: termblock, outfrompar(appetit), d32 , -12 ,b1+b123; setw1(-2*6), b.endblock. i152: d55 , d13 , f12 ; endzblock: termblock, outfrompar(appetit), d32 , -12 ,b1+b124; setw1(-2*6), b.endzblock. i153:b1+b125 ; exitblock: b.exitbl. i154:b1+b126 ; exitprnt: b.exitprnt. i155:b1+b127 ; exittppr: b.exittppr. i156: d15 , 4 ,b0+b128; endext: inout(4), b.endext, i157: d15 , 1 ; endpass:inout(1), d16 , f14 ; intopar(counter), d27 , f14 , g15-4 ; newentry(counter,shield), c42 , 0 , a3 ; if count(0) isless1:(go(s.finis).), a2: d15 , 12 ; copystd:inout(12), c42 , -1 , a3 ; if count(-1) isless1:(go(s.finis).), c18 , a2 ; go(copystd). a3: d14 , 0 , d30 ; finis: outfromw1(0), w1down, c51 ; exitpass. \f ; jz 1979.02.15 algol 8, pass 7, page 49 ; blocks, odds and ends, continued i158: d47 , b2+b24 ; takeval:norelease, op.takeform, d38 , a5 ; savetoptyp, s.val, c4 , g25 , b3+b14; savmodif(length,op.hs.) a5: c36 , 1 ,b1+b129; val: if toptyp(int,b.intval.), c36 , 2 ,b1+b154; if toptyp(long,b.longva.) c36 , 3 ,b1+b130; if toptyp(real,b.realval.), j14 , j15 ; s.addrreg, s.setsavetyp, d1 , c3 ; toptoreg, return. i159: b2+b12, d15 , 2 ; takearr:op.dl, inout(2), b1+b131 ; b.takeaar. i160: b3+b132 ; takezarr: op.takezarr. i161: b1+b133 ; gotobyp: b.gotobyp. i162: b1+b69 ; byplab: b.byplab. i163: c48 , h27 , a4 ; goto: if topkind(label,s.local.), d1 ,b1+b135 ; toptoreg, b.compgo. a4: c50 , c3 ; local: if topglobal(return.), b2+b134, c17 ; op.localgo, doublereturn. i164: d15 , 1 ,b1+b136; label: inout(1), b.label. i165: b1+b137 ; trouble:b.stop. i166: d38 ; assign: savetoptyp, c4 , g25 , b3+b14; savmodif(length,op.hs.) i167: d1 , c3 ; prepass: toptoreg, return. i168: d25 , c3 ; newline: newline, return. i171: b1+b151 ; disable: b.disable i172: b1+b152 ; enable: b.enable ; i169: see after i70 ; i170: - - i71 e. ; end blocks, odds and ends \f ; fgs 1987.05.13 algol 6, pass 7, page 50 ; termination of maintable: i. ; e. ; end maintable k=k+g0; reset k g4=k-g3 ; init pass 7 relative to reference base. ; init pass 7 ; is overwritten by the w1-stack. b. a5 ; begin block init pass7 w. g7: rl w2 x1+e17-g3 ; init pass 7: w1 = rebase = g3. al w3 c1-j3+1+g0; w2:= modebits; sz w2 h24 ; if spill.yes hs w3 x1+j3-g3 ; then set goto nextw2 in c38; al w3 c1-j6+1+g0; sz. w2 (a0.) ; if ix.yes hs w3 x1+j6-g3 ; then set goto nextw2 in c52; al w3 c1-j4+1+g0; sz w2 h25 ; if indexcheck.yes hs w3 x1+j4-g3 ; then set goto nextw2 in c47; al w3 d57-j5+1 ; sz w2 h24 ; if spill.yes hs w3 x1+j5-g3 ; then set goto multalarm in c90; al w0 -1 ; al w3 -1<10-1 ; so w2 h24 ; ld w0 -12 ; al w3 x1+d56-g3 ; interrupt address:= d56; jd 1<11 ; set interrut; rl w3 x1+e9+4-g3; al w3 x3-30 ; abstop w1 stack:= rs w3 x1+f21-g3 ; lastwork - 5 entries; al w3 x1+g6-g3 ; rs w3 x1+f0-g3 ; currw2stack:= abstopw2stack; al. w3 g7.-1 ; rx w3 2 ; w1:= base w1 stack; jl x3+c3-g3+g0; goto return; a0: 1<15 ; ix bit in modeword e. ; end block init pass7 ; terminate pass 7 slang-code: g2=k-g1 ; number of bytes e30=e30+g2 i. ; idlist e. ; end pass 7 segment m. jz.fgs 1988.10.07 algol 8, pass 7 \f ▶EOF◀