|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen GIER Computer |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen GIER Computer Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 13793 (0x35e1) Description: Bits:30000731 GIER ALGOL III PASS 2 Types: 8-hole paper tape Notes: Gier Text
[23.2.65] [PASS 2. Page 1] [Synopsis Pass 2 recognises byte strings representing identifiers and substitutes a unique byte for each such string. This is done regardless of block struc- ture so that the same identifier will be represented by the same byte throughout the text. The values of the bytes will be in the range 1023 > <byte> > 511. Standard identifiers are assigned fixed values in tight sequence starting from 1022. Other identifiers follows in tight sequence from last standard identifier. Tables. Pass 2 uses two tables: letter table[1:56| and table [first free after pass 2: top of store|; Table holds, starting at top of store, one word (referred to as short word) for each distinct identifier. All words representing identifiers with the same first letter form a chain whose links are the address parts. The starting point of each chain is given in the addresspart of the corre- sponding word in the letter table. A letter which does not start a chain is represented in the letter table by 0. The last word in a chain has bit 41 = 1 all others have bit 41 = 0; The rest of the identifier is assembled as an integer in a base 67 number system.If this integer < 2∧30 it will be stored in the remaining 30 bits of the |short word and bit 40 will be 1. Otherwise the last 20 bits of the integer will be stored in bit 20 to 39 of short word and bit 40 will be 0. The rest of the integer is stored in one or more words (long words) starting at the first free word at the bottom of table and the address - 1 of the first of these words will have bit 0 = 1, the others, if any, will have bit 0 = 1. [PASS 2. Page 2 Initialization The entries in the tables pertaining to standard identifiers are formed during loading of the translator and are stored on drum starting on track e88. track e88 word 0 holds: qq address of last long word .9 + number of tracks for long words - 1.19 + number of tracks for short words .29 + core address of first free short word .39; words 1 to 14 hold the letter table in packed form with the entry for a in bits 0 to 9 of word 1, for b in bit 10 to 19 of word 1 and so on until entry for Ø in word 14 bit 30 to 39. Word 14 has bit 40 = 1 the rest bit 40 = 0; word 15 and onwards using as many tracks as necessary hold the long words for standard identifiers. The following tracks hold the corresponding short words starting with the words to be loaded in 983 to 1022, 943 to 982 etc. Pass 2 starts by unpacking word 0 to 14 of track e88. The value of e88 is given in 8e4h: ar , pp e88 and Pass two will leave the number of the last track for short words in 8e4h: for use by pass 6 which takes in the fol- lowing tracks which holds the standard declaration table. Table look up Each identifier encountered by pass 2 is added to the table but the lin- king is not performed. Pass 2 now compares each entry in the corresponding chain with the new identifier. If the identifier is found in the table the new identifier is removed from the table otherwise the necessary linking is performed, including clear of bit 41 of the hitherto last short word in the chain. Finally the address of the short word corresponding to the identifier is put out. Program:]b k=e15+e70, i= 205e13, a30, b20, d10; _d e17=i _[d1 = letter table[0|, defined at end d2= chain list[0|, defined at end d3 not used]d d4=77 ; output value CR _d d5=78 ; - - short string _d d6=79 ; - - long string _d d7=80 ; - - layout _d d8=241 ; - - endpass _[PASS 2. Page 3] ; initialize letter table: k:= 0;a1: pmn d_ X 1 IPC ; for i:= 1, i+1 while PC = 0 do _2 ___ _____ __a2h:pp 0 , pp p1 ; begin R:= chain start list[i]; _____gm d_ t 1 M ; split(R, 40, 41, PC); _1ga (r-1) , bs p508 ; for p:= 1 step 1 until 4 do ___ ____ _____ __ck 10 , hh a2 ; begin k:= k + 1; _____hv a1 NPC ; pack(letter table[k], 0, 9, part(p, R), ; 10, 39, 0, 40, 41, 0); end unpack one word from list; ___; end; ___a3: vk 0 , ps a3 ; start byte processing: wait for track; a4: pmn(e1) X 1 ; next: byte:= first char:= input;hs e2 LA ; if byte > 56 then not identifier: __ ____ga b1 ; begin if byte > 511 then _____ __ ____b1: bs __ V 56 NT ; begin R:= 0; M:= neg; go_to act[byte-101 -1 _____ __ __8] end; ___hh (b1) X a16 ; output(byte); go_to next __ __hv e3 ; end; ___b2: ppn __ IZC ; start identifier: p:= i long; R:= 0; -1; short:= t; ZC:= 3; a5: pm (e1) X 1 ; nextchar: hs e2 LA ; RM:= R; byte:= input; finis:= t;ga b3 ; if byte > 66 then CR or end identifier: __ ____b3: bs __ V 66 NT ; begin if byte = input CR then go_to CR; -1 _____ __ ____ __ __ca 1020 , hv a15 ; R:= RM; go_to end identifier __ __hv a7 X ; end; ___ck 10 , ml b10 ; RM:= RM⨯67 + byte; finis:= f;hv a5 X LZ ; if RM < 2∧39 then word not full: __ | ____; begin R:= RM; go_to next char end; _____ __ __ ___gm p1 V NZA ; if -, short then store long word: __ ____; begin table[p+1]:= remain(RM, 2∧39); _____ |a6: cl 19 XV IZA ; p:= p + 1; R:= RM_2∧39; go_to next char : | __ __; end; ___pp p1 , hv a5 ; store first long: a6: short:= f; ZC:= 1; ck -19 ; pack (table[i short], 0, 9, 0, 10, 19, p,gr (b6) X MZC ; 20, 39, remain(RM, 2∧20), 40, 41, ZC); |it p , pt (b6) ; R:= RM_2∧20; : |hv a5 LA ; if -, finis then go_to next char; __ ____ __ __; end identifier:a7: nc 0 XV LZA ; if short then try store short: __ ____ar 512 DV ; begin RM:= R; if part 1(R) | 0 then _____ __ = ____hvn a6 ; go_to store first long; M:= mask short; __ __gr p1 V NZA ; pack(table[i short], 0, 39, RM, 40, 41, ZC)gm (b6) MZC ; end ___pm b11 V LZA ; else store last of long: ____pm b12 , pp p1 ; begin table[p+1]:= R + 2∧39; _____ |; p:= p + 1; M:= mask long; end; ___[PASS 2. Page 4]b4h:bs p-511 t __ ; test storage: if p-511 > i short test then -1 __ ____hv a14 ; goto table overflow; ____qq (e1) X -1 ; start look up: reset input to same byte; pm (b1) XV d1 IPC ; R:= letter table[first char];a8: arn(b5) V IPC ; split(R, 40, 41, PC); goto if R = 0 then ____ __ ____hv a12 LZ ; first identifier in chain else look up; ____; after long failed: a8: a9: ga b5 XV NPB ; R:= table[chain]; split(R, 40, 41, PC);hv a13 ; look up: a9: if PB = 0 then chain := part 1(R) __ ____b5: pm __ X IPC ; else go_to new identifier; -1 ____ __ __b6: cm ___ ; R:= table[chain]; split(R, 40, 41, PC); 512hv a9 ; if mask(M, R) | mask(M, table[ ishort] ∨ __ =qq V NPA ; -, (short _ PA = 1) then go_to look up; = ____ __ __hv a9 NZA ;hv a11 LPA ; agree on short: if short then go_to found; __ ____ __ __hv a9 LZA ; it (b2) , pa b7 ; test long: i long 1:= i long; ck 10 , ga b8 ; ilong 2:= part 2(R); a10: ; test next long: i long 1:= i long 1 + 1;b7: arn __ t 1 ITA ; R:= table[i long 1]; TA:= R _ 2∧39; -1 > |b8: sr __ t 1 ; if R | table[i long 2] then -1 __ = ____hv a8 NZ ; go_to after long failed; __ __hv a10 NTA ; if -, TA then goto test next long; __ ____ ____a11:pm (b5) DX ; found:hv e3 ; output(chain); go_to next; __ __; first identifier in chain: a12:it (b1) , pa b5 ; chain:= first char + base letter table a13:pm (b6) DX ; new identifier: connect to chain ga (b5) MPA ; pack(table[chain] 0, 9, i short, 41, 41, 0);gp b2 NZA ; if -, short then i long:= p; __ ____is (b6) t -1 ; outbyte:= i short; i short:= ishort - 1; it s-512 , pt b4 ; i short test:= i short - 512;qq (2e4) t 1 ; inf 1:= inf 1 + 1; if outbyte > 511 then __ ____hv e3 LT ; begin output(out byte); go_to next end; _____ __ __ ___a14:hs e5 ; table overflow:qq , qqn e37 ; alarm(|<too many identifiers|,8+ 0); < >a15:qq (e4) X 1 ; CR: CRcounter:= CR counter + 1pm d4 D ; if M = neg then __ ____hv e3 X LT ; begin output(out CR); go_to next end _____ __ __ ___hs e3 X ; output(outCR);hv a5 X ; go_to next char; __ __; constants: comment _______b10:qq 67.39, ; 67 b11:qq 1.9 - 1.39 ; mask short b12:qq 1.19 - 1.39 ; mask long; [PASS 2. Page 5][switch act:= endpass, free CR, sh str, lg str, layout;] ______[-5]pm d8 DX ; endpass: R:= outend; go_to end pass 2; __ __[-4]hv a17 , hv a15 ; free CR: go_to CR; __ __[-3]pm d5-d7 DXV ; sh str: R:= outshstr - outlay; go_to layout; __ __[-2]pm d6 DXV ; lg str: R:= outlgstr; go_to outcopy __ __[-1]ar d7 D ; layout: R:= R + outlay; a16:pp 4 , pp p-1 ; outcopy: p:= 4; rep copy: p:= p - 1; hs e3 ; output(R); pmn(e1) X 1 ; R:= input; hs e2 LA ;bs p , hh a16 ; if p > 0 then go_to rep copy; __ ____ __ __hv e3 ; output(R); go_to next; __ __a17:b13:nt __ , it (b2) ; endpass 2: inf 2:= i long - initial i long; -1pa 3e4 , hs e3 ; output(R); pmn(b6) DX ;d1: ps e92-1 , hv e3 ; output(i short); go_to endpass track __ __; commend the following is overwritten by _______; initialize letter table; a18:qq , ud 4e4 ; start pass 2: p:= standard table track; vk p , lk d2 ; call track(p, chain start list[0]; vk p , arn d2 ; unpack inf: R:= chain start list[0]; ga b2 , ga b13 ; i long:= initial i long:= part 1(R); gt b14 , tk 20 ; rest long tracks:= part 2(R); ga b16 , gt b4 ; short tracks:= part 3(R); tk 10 , ac b6 ; i short test:= part 4(R); ; i short:= 512 + part 4(R);b14:gp b15 , pp __ ; trackno:= p; i:= 0; -1a19:hv a20 , pp p-1 ; for p:= rest long track step - 1 until 0 do ___ ____ _____ __b15:vk __ t 1 ; begin trackno:= trackno + 1; i:= i + 40; -1 _____lk d_ t 40 ; call track(trackno, chainstartlist[i]) _2a20:bs p , hh a19 ; end; ___; i:= top tableb16:pp __ , hv a22 ; for p:= short tracks step -1 until 0 do -1 ___ ____ _____ __a21:pp p-1 , ud b15 ; begin trackno:= trackno + 1; i:= i - 40; _____lk __e__ t -40 ; call track(trackno, table[i]) 40_25a22:bs p , hv a21 ; end; ___it (b15) , pt 4e4 ; standard table track:= trackno;hv a1 ; go_to initialize letter table; __ __d d2=d1+42 ; define chain start list[0]; _d e91=d2 ; define chain start list[0] for use by TLA; _d e18=a18, i=39i, e16=k-e70; Information for password _e ; end pass 2 _d i=e21, e22=e16-e15-1 ; Load password _qq e15.9-e24.9+e18.19+e22.36+e22.34+205e13.39;d e15=e16 ; set first free track _s _