A quick experiment to see if Imp(AA) takeon program from a VERY early Imp on the KDF9 can be made to work. It looks like this version of Imp was where the %else keyword was added. File came from Andrew McKenrick's paper tapes. ***A JOB MAC022 IMP50 PS PREPARATION OUTPUT 0 LINE PRINTER 200000 LINES COMPILER IMP %LIST %BEGIN %INTEGER I,J,K,SS %INTEGER %ARRAY CLETT(1:750),SYMBOL(1300:3000),CC(0:300) %BEGIN %INTEGER CNEXT,DNEXT,CNUM,DNUM,ALT,DEF,ASL,NIDFLAG %INTEGER %ARRAY KK,DWORD(1001:1100),DLETT(1:750),CWORD(1:200) %ROUTINE %SPEC READ STRING %ROUTINE %SPEC RECORD(%INTEGER %ARRAY %NAME WORD,LETT,%C %INTEGER %NAME NUM,NEXT) %ROUTINE %SPEC LOOK UP(%INTEGER %ARRAY %NAME WORD,LETT,%C %INTEGER FIRST,LAST) ASL=1300 CNEXT=1 DNEXT=1 CNUM=0 NIDFLAG=0 DNUM=1000 1:READ SYMBOL(I) %IF I=67 %THEN ->2 ; ! 'C' %IF I=68 %THEN ->3 ; ! 'D' %IF I=80 %THEN ->4 ; ! 'P' %IF I=69 %THEN ->5 ; ! 'E' ->1 2:READ SYMBOL(I) READ STRING RECORD(CWORD,CLETT,CNUM,CNEXT) ->1 3:READ SYMBOL(I) READ STRING RECORD(DWORD,DLETT,DNUM,DNEXT) ->1 4:READ SYMBOL(I) READ STRING LOOK UP(DWORD,DLETT,1012,DNUM) KK(I)=ASL DEF=ASL ALT=ASL+1 ASL=ASL+2 6:READ SYMBOL(I) %IF I=91 %THEN ->7 ; ! '[' %IF I=34 %THEN ->8 ; !'"' OR EQUIVALENT %IF I=44 %THEN ->9 ; ! ',' %IF I=59 %THEN ->10 ; ! ; %IF I=48 %THEN ->11 ; ! '0' ->6 7:READ STRING LOOK UP(DWORD,DLETT,1001,DNUM) 12:SYMBOL(ASL)=I ASL=ASL+1 ->6 8:READ STRING LOOK UP(CWORD,CLETT,1,CNUM) ->12 9:SYMBOL(ALT)=ASL ALT=ASL ASL=ASL+1 ->6 10:SYMBOL(ALT)=ASL SYMBOL(DEF)=ASL ->1 11:I=1000 ->12 5:%CYCLE I=1300,1,ASL-1 %IF 1<=SYMBOL(I)<=CNUM %THEN SYMBOL(I) =CWORD(SYMBOL(I)) %IF 1012<=SYMBOL(I)<=DNUM %THEN SYMBOL(I)=KK(SYMBOL(I)) %REPEAT SS=KK(DNUM) NEWLINE %CYCLE K=1,1,2 SELECT PUNCH %IF K=2 RUNOUT(200) NEWLINES(2) WRITE (CNEXT-1,1) NEWLINE %CYCLE I=1,1,CNEXT-1 WRITE (CLETT(I),5) NEWLINE %IF I&7=0 %REPEAT NEWLINES(2) RUNOUT(100) NEWLINES(2) WRITE (ASL-1,1) NEWLINE %CYCLE I=1300,1,ASL-1 WRITE(SYMBOL(I),5) NEWLINE %IF (I-1299)&7=0 %REPEAT NEWLINES(2) WRITE (SS,1) NEWLINES(2) RUNOUT(200) %STOP %UNLESS NIDFLAG=0 %REPEAT RUNOUT (200) NEWLINE;%PRINTTEXT'***A CARDS ' RUNOUT(200) SELECT PRINTER %STOP %ROUTINE READ STRING %INTEGER UNDER ; UNDER = 0 J=0 1:READ SYMBOL(I) -> 12 %UNLESS I=37 ; !PERCENT UNDER =128 -> 1 12: -> 13 %UNLESS 65<= I <= 90 I=I+UNDER -> 14 13: UNDER =0 14:%IF I=32 %THEN ->1 ; ! '_' %IF I=34 %OR I=93 %THEN ->2; ! '"' OR EQUIVALENT AND ']' J=J+1 CC(J)=I ->1 2:CC(0)=J %END %ROUTINE RECORD(%INTEGER %ARRAY %NAME WORD,LETT,%C %INTEGER %NAME NUM,NEXT) NUM=NUM+1 WORD(NUM)=NEXT %CYCLE I=0,1,CC(0) LETT(NEXT+I)=CC(I) %REPEAT NEXT=NEXT+CC(0)+1 %END %ROUTINE LOOK UP(%INTEGER %ARRAY %NAME WORD,LETT,%INTEGER FIRST,LAST) %CYCLE I=FIRST,1,LAST J=WORD(I) %CYCLE K=0,1,LETT(J) %IF LETT(J+K)#CC(K) %THEN ->1 %REPEAT %RETURN 1:%REPEAT %PRINTTEXT' PHRASE NOT IN DICTIONARY' %CYCLE K=1,1,CC(0) PRINT SYMBOL(CC(K)) %REPEAT NIDFLAG=NIDFLAG+1 %END %END %ENDOFPROGRAM C"+" C"-" C"*" C"/" C"//" C"&" C"!" C">>" C"\" C"<<" C"**" C"(" C")" C"," C"?" C"!!" C":" C"=" C">=" C">" C"#" C"<" C"<=" C"->" C"<-" C"%IF" C"%UNLESS" C"%INTEGER" C"%REAL" C"%FN" C"%MAP" C"%NAME" C"%ROUTINE" C"%ARRAY" C"%AND" C"%OR" C"%PRINTTEXT'" C"%RESULT=" C"ADDR(" C"%RETURN" C"%STOP" C"%THEN" C"%CYCLE" C"%REPEAT" C"%SPEC" C"%BEGIN" C"%COMMENT" C"%END" C"%PROGRAM" C"%SWITCH" C"%COMPILE" C"%QUERIES" C"%DEFINE" C"%R" C"%PERM" C"%MCODE" C"%OF" C"%FAULT" C"%MONITOR" C"%BYTE" C"%SHORT" C"%LONG" C"%ON" C"%OFF" C"%OWN" C"%LIST" C"%ELSE" C"%START" C"%FINISH" C"%CHECKS" C"`" C"P" D[NAME] D[SNAME] D[CONST] D[CONSTLIST] D[N] D[S] D[TEXT] D[TEXTTEXT] D[UCITEXT] D[SETMARKER1] D[SETMARKER2] D[+'] D[OPERAND] D[APP] D[OP] D[QUERY'] D[,'] D[%IU] D[TYPE] D[RESTOFARRAYLIST] D[RESTOFFP-LIST] D[RESTOFEXPR-LIST] D[RESTOFUI] D[RESTOFNAMELIST] D[%SPEC'] D[RESTOFSWITCHLIST] D[RESTOFBP-LIST] D[RESTOFEXPR] D[RESTOFCOND] D[RESTOFAND-C] D[RESTOFOR-C] D[RESTOFSC] D[RT] D[FM] D[LENGTH'] D[LABEL] D[COMS] D[ONOFF] D[ASSOP] D[%ARRAY'] D[%NAME'] D[FPP] D[FP-DELIMITER] D[SC] D[COMP] D[RESTOFSS1] D[CONST'] D[ELSE'] D[UCI] D[+] D[='] D[P'] D[@'] D[UI] D[SS] P[+']= "+","-","\",0; P[OPERAND]= [NAME][APP],[CONST],"("[+'][OPERAND][RESTOFEXPR]")", "!"[+'][OPERAND][RESTOFEXPR]"!"; P[RESTOFEXPR]= [OP][OPERAND][RESTOFEXPR],0; P[APP]= "("[+'][OPERAND][RESTOFEXPR][RESTOFEXPR-LIST]")",0; P[RESTOFEXPR-LIST]= ","[+'][OPERAND][RESTOFEXPR][RESTOFEXPR-LIST],0; P[OP]= "**","+","-","!!","!","*","//","/","&",">>","<<"; P[QUERY']= "?",0; P[,']= ",",0; P[%IU]= "%IF","%UNLESS"; P[TYPE]= "%INTEGER"; P[RT]= "%ROUTINE",[LENGTH'][TYPE][%ARRAY'][FM]; P[FM]= "%FN","%MAP"; P[LENGTH']="%BYTE","%SHORT","%LONG",0; P[FP-DELIMITER]= [RT],[LENGTH'][TYPE][%ARRAY'][%NAME'],[%ARRAY']"%NAME"; P[LABEL]= [N],[NAME]; P[COMS]="%COMPILE","%STOP"; P[ONOFF]="%ON","%OFF"; P[%ARRAY']="%ARRAY",0; P[%NAME']="%NAME",0; P[FPP]= "("[FP-DELIMITER][NAME][RESTOFNAMELIST][RESTOFFP-LIST] ")",0; P[RESTOFFP-LIST]= [,'][FP-DELIMITER][NAME][RESTOFNAMELIST][RESTOFFP-LIST],0; P[RESTOFNAMELIST]= ","[NAME][RESTOFNAMELIST],0; P[SC]= [+'][OPERAND][RESTOFEXPR][COMP][+'][OPERAND][RESTOFEXPR] [RESTOFSC], "("[SC][RESTOFCOND]")"; P[RESTOFSC]= [COMP][+'][OPERAND][RESTOFEXPR],0; P[RESTOFCOND]= "%AND"[SC][RESTOFAND-C],"%OR"[SC][RESTOFOR-C],0; P[RESTOFAND-C]= "%AND"[SC][RESTOFAND-C],0; P[RESTOFOR-C]= "%OR"[SC][RESTOFOR-C],0; P[RESTOFUI]= [ASSOP][+'][OPERAND][RESTOFEXPR][QUERY'],0; P[ASSOP]="=","<-"; P[%SPEC']= "%SPEC",0; P[RESTOFBP-LIST]= ","[+'][OPERAND][RESTOFEXPR]":"[+'][OPERAND][RESTOFEXPR] [RESTOFBP-LIST],0; P[RESTOFARRAYLIST]= ","[NAME][RESTOFNAMELIST]"("[+'][OPERAND][RESTOFEXPR] ":" [+'][OPERAND][RESTOFEXPR][RESTOFBP-LIST]")"[RESTOFARRAYLIST],0; P[RESTOFSWITCHLIST]= ","[NAME][RESTOFNAMELIST]"("[+'][CONST]":"[+'][CONST]")" [RESTOFSWITCHLIST],0; P[COMP]= "=",">=",">","#","<=","<","\""="; P[RESTOFSS1]= [S],[%IU][SC][RESTOFCOND][S]; P[ELSE']="%ELSE"[UI],0; P[UCI]= "*"[N]","[@'][NAME][APP],"->""P"[N],[UCITEXT]; P[+]= "+","-"; P[=']= "=",0; P[P']= 0; P[@']= "@","=",0; P[CONST']= "="[+'][CONST],0; P[UI]= [NAME][APP][SETMARKER1][RESTOFUI], "->"[NAME]"("[+'][OPERAND][RESTOFEXPR]")", "->"[LABEL], "%PRINTTEXT'"[TEXTTEXT], "%RETURN", "%RESULT=""ADDR("[NAME][APP]")", "%RESULT="[+'][OPERAND][RESTOFEXPR], "%STOP", "%MONITOR""%STOP", "%MONITOR"[N], "%START"; P[SS]= [UI][SETMARKER2][RESTOFSS1], "%CYCLE"[NAME][APP]"="[+'][OPERAND][RESTOFEXPR]","[+'] [OPERAND] [RESTOFEXPR]","[+'][OPERAND][RESTOFEXPR][S], "%REPEAT"[S], [LABEL]":", [%IU][SC][RESTOFCOND]"%THEN"[SETMARKER2][UI][ELSE'][S], "!"[TEXT], [LENGTH'][TYPE][NAME][RESTOFNAMELIST][S], "%END"[S], [RT][%SPEC'][NAME][FPP][S], "%COMMENT"[TEXT], [LENGTH'][TYPE]"%ARRAY"[NAME][RESTOFNAMELIST]"("[+'][OPERAND] [RESTOFEXPR]":" [+'][OPERAND][RESTOFEXPR][RESTOFBP-LIST]")"[RESTOFARRAYLIST] [S], "%BEGIN"[S], "%END""%OF""%PROGRAM", [NAME]"("[+'][CONST]")"":", "%SWITCH"[NAME][RESTOFNAMELIST]"("[+'][CONST]":" [+'][CONST] ")"[RESTOFSWITCHLIST][S], [COMS]"%QUERIES"[S], "%QUERIES"[ONOFF][S], "%OWN"[LENGTH'][TYPE][NAME][CONST'][S], "%OWN"[LENGTH'][TYPE]"%ARRAY"[NAME] "("[+'][CONST]":"[+'][CONST]")"[='][CONSTLIST], "%MCODE"[S], "%SHORT""%ROUTINE"[S], "*"[UCI][S], "%FAULT""->"[LABEL][S], "%END""%OF""%PERM"[S], "%END""%OF""%MCODE"[S], "%DEFINE""%COMPILE""%R"[S], "%SPEC"[NAME][FPP][S], "%NAME"[SNAME], "%LIST"[S], "%END""%OF""%LIST"[S], [COMS]"%CHECKS"[S], "%FINISH"[ELSE'][S], [S]; E