
'BEGIN''INTEGER''ARRAY' IL1,IL2,IL3,VTBD,VADR[1:140],DIG[1:20],
	FRN1,FRN2,FRN3,FRLN,FTBD,FLINE[1:100],ID[1:3];
'INTEGER' INDEV,DEV,CHAR,LINE,BS,DECL,TYPE,ID1,ID2,ID3,NLAB,FIRST,
	LDPT,SIZE,NADR,DBASE,NODEC,ADDR,HEL1,DEPTH,
	ADEPTH,PDEPTH,FIXSP,NPN,BSIZE;
'BOOLEAN' SECOND,DOLL,LETTER,DIGIT,FOUND,FRED,HOL1,
	STRING,TABLES;

'PROCEDURE' IN6;
'IF' DOLL 'THEN' 'BEGIN' WARN(27); 'GOTO' EPROG 'END'
'ELSE'
'BEGIN'
LOOP:	CHIN(INDEV,CHAR);
'IF' CHAR=137 'THEN' CHAR:=160;
'IF' 'NOT' STRING 'AND' CHAR=160 'OR' CHAR=138
	'OR' CHAR=140 'OR' CHAR=192 'THEN''GOTO' LOOP;
'IF' CHAR=141 'THEN''BEGIN' LINE:=LINE+1; 'GOTO' LOOP 'END';
CHAR:=CHAR-CHAR%64*64;
DOLL:=CHAR=36;
'END';

'PROCEURE' ABSA;
'BEGIN'
ABS1:	IN6;
'IF' CHAR#39 'THEN' BS:=CHAR
'ELSE'	'BEGIN'
	IN6; BS:=40*CHAR; IN6; BS:=BS+CHAR;
LBS1:	IN6; 'IF' CHAR#39 'THEN''GOTO' LBS1;
	'IF' BS<64 'THEN' BS:=BS+64;
	'END' LONG BASIC SYMBOL
'END' ABSA;


'PROCEDURE' ABS;
'BEGIN'
	'IF' HOL1 'THEN'
	'BEGIN' BS:=HEL1; HOL1:='FALSE'
	'END'
'ELSE''BEGIN''INTEGER' HEL3;
	ABSA; 'IF' BS=58 'OR' BS=60 'OR' BS=62 'THEN'
	'BEGIN' HEL1:=BS; ABSA;
	'IF' BS=61 'THEN' BS:=
	('IF' HEL1=58 'THEN' 33 'ELSE''IF'
	HEL1=60 'THEN' 63 'ELSE' 38)
	'ELSE''BEGIN' HEL3:=BS; BS:=HEL1; HEL1:=HEL3;
	HOL1:='TRUE' 'END'
	'END'
	'END';
LETTER:=BS<27;
DIGIT:=BS>47 'AND' BS<58;
'END' ABS;

'BOOLEAN''PROCEDURE' TERM;
TERM:=BS=214 'OR' BS=59 'OR' BS=212 'OR' BS=36;


'BOOLEAN''PROCEDURE' ATYPE;
ATYPE:=TYPE>4 'AND' TYPE<8;

'BOOLEAN''PROCEDURE' BTYPE;
BTYPE:=TYPE=3 'OR' TYPE=7 'OR' TYPE=13 'OR' TYPE=18 'OR' TYPE=23;

'INTEGER''PROCEDURE' EXPAND(X); 'VALUE' X; 'INTEGER' X;
EXPAND:=X+('IF' X<=31 'THEN' 192 'ELSE' 128);

'PROCEDURE' DEFINE(L1,L2); 'VALUE' L1,L2; 'INTEGER' L1,L2;
'BEGIN' WRITE(DEV,"L",L1,"=L",L2); SKIP(DEV) 'END';

'BOOLEAN''PROCEDURE' LOD;
'BEGIN' ABS; LOD:=LETTER 'OR' DIGIT 'END';

'INTEGER''PROCEDURE' LOWER(X); 'VALUE' X; 'INTEGER' X;
LOWER:=X-X%BSIZE*BSIZE;

'PROCEDURE' IDENT;
'BEGIN'
ID1:=BS; ID2:=0; ID3:=0;
'IF' LOD 'THEN'
	'BEGIN' ID1:=58*ID1+BS; 'IF' LOD 'THEN'
	'BEGIN' ID2:=BS; 'IF' LOD 'THEN'
	'BEGIN' ID2:=58*ID2+BS; 'IF' LOD 'THEN'
	'BEGIN' ID3:=BS; 'IF' LOD 'THEN'
	'BEGIN' ID3:=58*ID3+BS;
ID4:	'IF' LOD 'THEN''GOTO' ID4;
	'END''END''END''END''END';
FOUND:='FALSE';
'FOR' DECL:=NODEC 'STEP' -1 'UNTIL' 1 'DO'
	'IF' ID1=IL1[DECL] 'THEN'
	'BEGIN''IF' ID2=IL2[DECL] 'THEN'
	'BEGIN''IF' ID3=IL3[DECL] 'THEN'
	'BEGIN' FOUND:='TRUE';
	TYPE:=VTBD[DECL]%BSIZE; ADDR:=VADR[DECL];
	'GOTO' ESRC;
	'END''END''END';
ESRC: 'END' SEARCH DECLARATION LIST;


'PROCEDURE' PAD;
'IF' SECOND 'THEN' CODE(0);

'PROCEDURE' CODE(X); 'VALUE' X; 'INTEGER' X;
'BEGIN'
'IF' SECOND 'THEN'
	'BEGIN' WRITE(DEV,BSIZE*FIRST+X); SKIP(DEV);
	SIZE:=SIZE+1;
	'END'
'ELSE'	FIRST:=X;
SECOND:='NOT' SECOND;
'END' OUTPUT CODE;

'PROCEDURE' COD2(X,Y);
'VALUE' X,Y; 'INTEGER' X,Y;
'BEGIN' CODE(X); CODE(Y); 'END';

'PROCEDURE' SIXBIT(CONSTANT);
'VALUE' CONSTANT; 'INTEGER' CONSTANT;
COD2(42,CONSTANT);

'PROCEDURE' LDEC(LNO); 'VALUE' LNO; 'INTEGER' LNO;
'BEGIN' PAD; WRITE(DEV,"L",LNO,",")
'END';

'PROCEDURE' LABEL(LNO); 'VALUE' LNO; 'INTEGER' LNO;
'BEGIN' PAD; SIZE:=SIZE+1; WRITE(DEV,"L",LNO); SKIP(DEV);
'END';

'INTEGER''PROCEDURE' JMPNEW;
'BEGIN' JMP(NLAB);
JMPNEW:=NEWLAB 'END';

'PROCEDURE' JMP(LNO); 'INTEGER' LNO; 'VALUE' LNO;
'BEGIN' CODE(9); LABEL(LNO) 'END';

'INTEGER ''PROCEDURE' NEWLAB;
'BEGIN' NEWLAB:=NLAB; NLAB:=NLAB+1 'END';

'PROCEDURE' VINFO(DECL); 'VALUE' DECL; 'INTEGER' DECL;
COD2(LOWER(VTBD[DECL]),LOWER(VADR[DECL]));


'PROCEDURE' NEWADR;
'BEGIN' ADDR:=NADR; NADR:=NADR+1 'END';

'PROCEDURE' FSCHK;
'IF' ADDR>FIXSP 'THEN'
	'BEGIN' FIXSP:=ADDR; 'IF' ADDR>=BSIZE 'THEN' WARN(5)
	'END';

'PROCEDURE' SID;
'BEGIN'
'IF' NODEC=140 'THEN' WARN(15) 'ELSE' NODEC:=NODEC+1;
'IF' FOUND 'AND' DECL>DBASE 'THEN' WARN(1);
'IF' TYPE<10 'THEN' FSCHK;
IL1[NODEC]:=ID1; IL2[NODEC]:=ID2;
IL3[NODEC]:=ID3; VADR[NODEC]:=ADDR;
VTBD[NODEC]:=BSIZE*TYPE+PDEPTH;
'IF' TABLES 'THEN'
	'BEGIN' SKIP(1); IDOUT;
	WRITE(1," ",ADDR," ",PDEPTH," ",TYPE);
	'END';
'END' STORE IDENT IN LIST;

'PROCEDURE' DARR;
'BEGIN''INTEGER' FIRST,DFIRST,COUNT,STYP,SUBS;
STYP:=TYPE;
DAR1: FIRST:=NADR; DFIRST:=NODEC+1; SUBS:=1; COUNT:=1;
DAR2: IDENT; TYPE:=STYP; NEWADR; SID;
	'IF' BS=44 'THEN''BEGIN' COUNT:=COUNT+1;
		ABS; 'GOTO' DAR2 'END';
	CHFAIL(27,18); 'COMMENT' CHECK [;
NSUB:	GET INTEGER; CHFAIL(58,18); GET INTEGER;
	'IF' BS=29 'THEN' ABS 'ELSE'
	'BEGIN' CHFAIL(44,18); SUBS:=SUBS+1; 'GOTO' NSUB
	'END';
COD2(1,ADEPTH); COD2(COUNT,FIRST);
COD2('IF' STYP#5 'THEN' 1 'ELSE' 3,SUBS);
'IF' BS=44 'THEN''BEGIN' ABS; 'GOTO' DAR1 'END';
SEMI(44); 'END' DECLARE ARRAY;

'PROCEDURE' DTV;
'BEGIN''INTEGER' STYP;
STYP:=TYPE;
DTV1: IDENT; TYPE:=STYP; NEWADR;
SID; 'IF' BS=44 'THEN''BEGIN' ABS; 'GOTO' DTV1 'END'
'ELSE''IF' BS=59 'THEN' SEMI(0);
'END' DECLARE VARIABLE LIST;


'INTEGER''PROCEDURE' DTYPE;
'BEGIN''INTEGER' I;
I:='IF' BS=725 'THEN' 1
'ELSE''IF' BS=374 'THEN' 2
'ELSE''IF' BS=95 'THEN' 3
'ELSE''IF' BS=780 'THEN' 4
'ELSE''IF' BS=122 'THEN' 5
'ELSE''IF' BS=783 'THEN' 8
'ELSE''IF' BS=881 'THEN' 9
'ELSE''IF' BS=658 'THEN' 10
'ELSE''IF' BS=481 'THEN' 14 'ELSE' 0;

'IF' I>0 'THEN'
	'BEGIN' ABS;
	'IF' BS=122 'THEN''BEGIN' I:=I+4; ABS 'END'
	'ELSE''IF' BS=658 'THEN''BEGIN' I:=I+10; ABS 'END';
	'END';
DTYPE:=I
'END' READ TYPE OF DECLARATION;

'PROCEDURE' INSERT(FORWARD);
'VALUE' FORWARD; 'INTEGER' FORWARD;
'BEGIN' 'IF' LDPT=100 'THEN' WARN(30) 'ELSE' LDPT:=LDPT+1;
FRN1[LDPT]:=ID1; FRN2[LDPT]:=ID2; FRN3[LDPT]:=ID3;
FTBD[LDPT]:=BSIZE*DEPTH+TYPE+FORWARD; FLINE[LDPT]:=LINE;
ADDR:=NEWLAB; FRLN[LDPT]:=ADDR
'END' INSERT ENTRY IN LABEL/PROCEDURE LIST;

'BOOLEAN''PROCEDURE' CHKFR(INDEX);
'VALUE' INDEX; 'INTEGER' INDEX;
CHKFR:=FRN1[INDEX]=ID1 'AND' FRN2[INDEX]=ID2
'AND' FRN3[INDEX]=ID3 'AND' DEPTH=FTBD[INDEX]%BSIZE;

'PROCEDURE' GET INTEGER;
'IF' AE 'THEN' CODE(43);

'PROCEDURE' SFR;
'BEGIN''INTEGER' I;
'IF' LDPT#0 'THEN'
	'FOR' I:=1 'STEP' 1 'UNTIL' LDPT 'DO'
	'IF' CHKFR(I) 'THEN'
	'BEGIN' 'IF' LOWER(FTBD[I])<15 'THEN'
	'BEGIN' ADDR:=FRLN[I]; TYPE:=LOWER(FTBD[I]); 'GOTO' ESFR
	'END' CHECK IF REFERENCE ALREADY DECLARED
	'ELSE''IF' LOWER(FTBD[I])=TYPE+10 'THEN'
	'BEGIN' ADDR:=FRLN[I]; 'GOTO' ESFR
	'END' CHECK FOR PRE-EXISTING SAME FORWARD REFERENCE;
	'END' CHECKS WHEN NAME AND DEPTH CORRESPOND;
INSERT(10);
ESFR: 'END' RETURN PROCEDURE LABEL IF DECLARED, ELSE SET FORWARD REF;

'PROCEDURE' DLAB;
'BEGIN''INTEGER' I;
LDEC(NLAB); INSERT(0);
	'FOR' I:=1 'STEP' 1 'UNTIL' LDPT 'DO'
	'IF' CHKFR(I) 'AND' LOWER(FTBD[I])=TYPE+10 'THEN'
		'BEGIN' DEFINE(FRLN[I],ADDR);
		DELETE(I); I:=I-1
		'END' DELETE SATISFIED FORWARD REFS;
SID; VADR[NODEC]:=3;
'END' PUT LABEL OR PROCEDURE DECLARATION IN LIST;

'PROCEDURE' DELETE(ITEM); 'INTEGER' ITEM; 'VALUE' ITEM;
'BEGIN'
FRN1[ITEM]:=FRN1[LDPT]; FRN2[ITEM]:=FRN2[LDPT];
FRN3[ITEM]:=FRN3[LDPT];
FRLN[ITEM]:=FRLN[LDPT]; FTBD[ITEM]:=FTBD[LDPT];
FLINE[ITEM]:=FLINE[LDPT]; LDPT:=LDPT-1;
'END' DELETE ITEM FROM LABEL/PROCEDURE LISTS;

'PROCEDURE' CSTR;
'BEGIN' STRING:='TRUE'; IN6;
LOOP:	'IF' CHAR#34 'THEN'
	'BEGIN' CODE(CHAR);
	IN6; 'GOTO' LOOP
	'END';
STRING:='FALSE'; ABS; CODE(0)
'END' COMPILE STRING;


'PROCEDURE' PCALL;
'BEGIN''INTEGER' STYP;
'IF' FOUND 'AND' DECL<20 'THEN'
'BEGIN''INTEGER' SDEC; SDEC:=DECL;
	CHFAIL(40,32);
	'IF' DECL<10 'THEN'
	'BEGIN' GET INTEGER;
	'IF' SDEC>=7 'THEN''BEGIN' CHFAIL(44,42);
		'IF' SDEC#7 'THEN' 
		'BEGIN' GETINTEGER; CODE(VADR[SDEC])
		'END' WRITE/CHOUT
		'ELSE'
		'BEGIN' 'IF''NOT' AE 'THEN' CODE(44);
		'IF' BS=41'THEN' COD2(29,29) 'ELSE'
			'BEGIN' CHFAIL(44,42); GETINTEGER;
			CHFAIL(44,42); GET INTEGER;
			'END' FORMATTED PRINT;
		CODE(2);
		'END' REAL WRITE
		'END' NUMBER/CHAR OUTPUT
	'ELSE''IF' SDEC=6 'THEN'
		'BEGIN' CHFAIL(44,42);
		'IF' BS=34 'THEN' 
		'BEGIN' CODE(5); CSTR
		'END' NORMAL CALL
		'ELSE'
		'BEGIN' IDENT;
		'IF''NOT' FOUND 'OR' TYPE#4 'THEN' WARN(42);
		GETOUT; CODE(60)
		'END' PRINT FORMAL STRING
		'END' TEXT
	'ELSE' CODE(VADR[SDEC]);
	'END' INPUT/OUTPUT CALLS
'ELSE'	'BEGIN' 'IF''NOT' AE 'THEN' CODE(44);
	COD2(27,SDEC-9);
	'END' STANDARD FUNCTION CALL;
	STYP:=VTBD[SDEC]%BSIZE;
'END' CALL OF BUILT IN ROUTINES
'ELSE'
'BEGIN' 'INTEGER' COUNT,PRAD,PTYPE;
'BOOLEAN' FORMAL;
FORMAL:=FOUND 'AND' TYPE>14;
'IF' FORMAL 'THEN'
	'BEGIN' PRAD:=DECL; STYP:=TYPE-5
	'END' 'ELSE'
	'BEGIN' SFR; STYP:=TYPE; PRAD:=ADDR
	'END' SET TYPE OF NORMAL PROCEDURE CALL;
'IF' BS#40 'THEN'
	'BEGIN' 'IF' FORMAL 'THEN'
		'BEGIN' GETOUT; CODE(58); PAD
		'END' PARAMETERLESS FORMAL 
	'ELSE'	'BEGIN' CODE(11); LABEL(ADDR)
		'END';
	'GOTO' ECL2
	'END' CALL OF PARAMETERLESS PROCEDURE;
	COUNT:=0; ABS;
NPAR:	PTYPE:=DTYPE;
'IF' PTYPE#0 'THEN'
	'BEGIN' 'IF' PTYPE<10 'THEN' WARN(19);
	DBE(PTYPE);
	'END' LABEL/PROCEDURE PARAMETER
'ELSE'	'BEGIN' 'IF' 'NOT' LETTER 'THEN'
		'BEGIN''IF' BS=34 'THEN'
			'BEGIN''INTEGER' L1;
			CODE(47); LABEL(NEWLAB); L1:=JMPNEW;
			LDEC(L1-1); CSTR;
			LDEC(L1); TYPE:=4
			'END' STRING PARAMETER
		'ELSE' 'BEGIN'
		TYPE:=
		'IF' BS=575 'OR' BS=818 'OR' BS=241 'THEN' 3 'ELSE' 1;
		EXPRESSION
		'END' NON-STRING NON-LETTER PARAMETER
		'END' NON-LETTER PARAMETER
	'ELSE'	'BEGIN' IDENT;
		'IF''NOT' FOUND 'THEN' WARN(34);
		'IF' BS=44 'OR' BS=41 'THEN'
		'BEGIN''IF' TYPE>20 'OR' TYPE=4 'OR' ATYP
			'OR' TYPE=8 'THEN' GETOUT
		'ELSE''IF' TYPE<4 'THEN'
		'BEGIN' TYPE:=TYPE+20; CODE(39); VINFO(DECL);
		'END' 'ELSE' 'GOTO' VPAR;
		'END' PARAMETER BY NAME
		'ELSE'VPAR:'BEGIN' FRED:='TRUE'; EXPRESSION
			'END' NUMERICAL/BOOLEAN
		'END' VARIABLE/ARRAY PARAMETER
	'END' PARAMS NOT STARTING WITH DECLARATION;
SIXBIT(TYPE);
COUNT:=COUNT+1; 'IF' BS=44 'THEN'
	'BEGIN' ABS; 'GOTO' NPAR
	'END';
'IF' FORMAL 'THEN'
	'BEGIN' DECL:=PRAD; GETOUT; COD2(59,COUNT); PAD
	'END'
'ELSE'	'BEGIN' COD2(36,COUNT); LABEL(PRAD)
	'END';
'END' USER DECLARED PROCEDURE CALL;
CHFAIL(41,21);
ECL2: TYPE:=STYP;
'END' PROCEDURE CALL;

'PROCEDURE' COMMENT;
COM:	'IF' BS=135 'THEN'
	'BEGIN'
CL:	IN6; 'IF' CHAR#59 'THEN''GOTO' CL 'ELSE'
	'BEGIN' ABS; 'GOTO' COM
	'END'
	'END' CHECK FOR COMMENT;

'PROCEDURE' SEMI(FNO); 'VALUE' FNO; 'INTEGER' FNO;
'BEGIN' CHFAIL(59,FNO); COMMENT 'END';


'PROCEDURE' STATEMENT;
'BEGIN'
ST:
'IF' LETTER 'THEN'
'BEGIN' IDENT;
'IF' BS=58 'THEN'
	'BEGIN' TYPE:=14; DLAB; COD2(61,PDEPTH);
	CODE(ADEPTH); ABS; 'GOTO' ST 'END'
'ELSE''IF' BS=27 'THEN' ASSIGNMENT
'ELSE''IF' BS=33 'THEN''BEGIN' ABS; ASSIGNMENT 'END'
'ELSE'	'BEGIN'
	'IF' 'NOT' FOUND 'THEN' TYPE:=10
	'ELSE''IF' TYPE#10 'AND' TYPE#15 'THEN' WARN(35);
	PCALL
	'END'
'END' UNCONDITIONAL NON-GOTO

'ELSE''IF' BS=366 'THEN'
'BEGIN''INTEGER' L1,L2;
L1:=IFCLAUSE; 'IF' BS=366 'THEN' WARN(33); STATEMENT;
'IF' BS#212 'THEN' LDEC(L1)
'ELSE''BEGIN' ABS; L2:=JMPNEW; LDEC(L1);
	STATEMENT; LDEC(L2) 'END'
'END' CONDITIONAL

'ELSE' 'IF' BS=295 'THEN'
'BEGIN' ABS; DBE(14); CODE(57);
'END' GOTO STATEMENT

'ELSE' 'IF' BS=255 'THEN'
'BEGIN''INTEGER' SDECL,STYP,LVAR,STLAB,L1,L2,L3;
ABS; IDENT;
'IF''NOT'(FOUND'AND'(TYPE<3'OR' TYPE>20'AND'TYPE<23)) 'THEN' WARN(13);
STYP:=TYPE; SDECL:=DECL; CHFAIL(33,24);
NEWADR; LVAR:=ADDR; FSCHK;
STLAB:=NEWLAB; L3:=NEWLAB;

ELEMENT: L1:=L3; L2:=NEWLAB; L3:=NEWLAB;
	LDEC(L1);
	FOUND:='TRUE'; TYPE:=STYP; DECL:=SDECL; ASSIGNMENT;
	CODE(47);
LABEL('IF' BS=928 'THEN' L1 'ELSE''IF' BS=780 'THEN' L2 'ELSE' L3);
	COD2(4,LVAR); 'COMMENT' SET ADDRESS FOR RETURN;
	'IF' BS=928 'THEN'
	'BEGIN' ABS; DBE(3); 'GOTO' FOR1
	'END' WHILE ELEMENT
	'ELSE''IF' BS#780 'THEN''GOTO' FOR2;
	'BEGIN''INTEGER' L4; L4:=NEWLAB;
	ABS; CODE(29); JMP(L4); 'COMMENT' SET ZERO FOR NO INCREMENT;
	LDEC(L2); COD2(29,30); LDEC(L4); 'COMMENT' -1 TO INCREMENT;
	SIXBIT(STYP); RHS; CHFAIL(854,31);
	RHS; 'IF' STYP>20 'THEN''BEGIN' DECL:=SDECL; GETOUT 'END'
		'ELSE''BEGIN' CODE(39); VINFO(SDECL) 'END';
	CODE(34);
	'COMMENT' PARAMETERS FOR STEP TESTER;
	'END' STEP ELEMENT;
FOR1:	CODE(28); LABEL(L3);
FOR2:	'IF' BS=44 'THEN'
		'BEGIN' ABS; JMP(STLAB); 'GOTO' ELEMENT
		'END';
	CHFAIL(175,22); LDEC(STLAB);
	STATEMENT;
	COD2(12,LVAR); CODE(57); LDEC(L3);
	NADR:=NADR-1;
'END' FOR STATEMENT

'ELSE' 'IF' BS=85 'THEN'
'BEGIN''INTEGER' SDBASE,SNADR,JPPL;
'BOOLEAN' PLS,ABM,BLOCK;
ABS; COMMENT;
PLS:='FALSE'; ABM:='FALSE'; BLOCK:='FALSE';

NDEC:	TYPE:=DTYPE;
'IF' TYPE#0 'THEN'
	'BEGIN'
	'IF''NOT' BLOCK 'THEN'
		'BEGIN' BLOCK:='TRUE'; DEPTH:=DEPTH+1;
		SDBASE:=DBASE; DBASE:=NODEC; SNADR:=NADR;
		'END';
	'IF' TYPE<4 'THEN' DTV
	'ELSE''IF' TYPE<10 'THEN'
		'BEGIN''IF' PLS 'THEN'
		'BEGIN' LDEC(JPPL); PLS:='FALSE''END';
	'IF' TYPE=8 'THEN'
	'BEGIN' DTV; CHFAIL(33,45); CODE(47); LABEL(NLAB);
	DECL:=NODEC; PUTOUT;
	CODE(9); LDEC(NEWLAB); JPPL:=NLAB; LABEL(NEWLAB);
	PLS:='TRUE';
SEL:	IDENT; TYPE:=14; SFR; LABEL(ADDR);
	'IF' BS=44 'THEN'
		'BEGIN' ABS; 'GOTO' SEL 'END';
	SEMI(46);
	'END' DECLARE SWITCH
	'ELSE''BEGIN'
		'IF''NOT' ABM 'THEN'
		'BEGIN' ABM:='TRUE'; ADEPTH:=ADEPTH+1 'END';
		DARR;
	'END' DECLARE ARRAY
	'END' DECLARE ARRAY OR SWITCH
	'ELSE''BEGIN''IF''NOT' PLS 'THEN'
		'BEGIN' JPPL:=JMPNEW; PLS:='TRUE''END';
		DPROC;
		'END';
	'GOTO' NDEC;
	'END' DECLARATIONS;

'IF' PLS 'THEN' LDEC(JPPL);
TAIL:	STATEMENT;
	'IF' BS=59 'THEN''BEGIN' ABS; COMMENT; 'GOTO' TAIL
	'END'
	'ELSE''IF' BS#214 'THEN'
		'BEGIN' FAIL(16); 'GOTO' TAIL 'END';
ECOM:	ABS; 'IF''NOT' TERM 'THEN''GOTO' ECOM;

'IF' BLOCK 'THEN'
'BEGIN'
'IF' ABM 'THEN''BEGIN' CODE(61); ADEPTH:=ADEPTH-1;
	COD2(PDEPTH,ADEPTH) 'END';
NODEC:=DBASE; DBASE:=SDBASE; NADR:=SNADR;
EBLOCK;
'END' BLOCK
'END' BLOCK OR COMPOUND

'END' STATEMENT;


'PROCEDURE' EBLOCK;
'BEGIN''INTEGER' I,J;
DEPTH:=DEPTH-1;
'IF' LDPT#0 'THEN'
'FOR' I:=1 'STEP' 1 'UNTIL' LDPT 'DO'
'IF' FTBD[I]%BSIZE>DEPTH 'THEN'
	'BEGIN''INTEGER' FTYP; FTYP:=LOWER(FTBD[I]);
	'IF' FTYP<20 'THEN'
	'BEGIN' DELETE(I); I:=I-1
	'END' DELETE LABEL/PROCEDURE OUT OF SCOPE
	'ELSE''BEGIN' FTBD[I]:=BSIZE*DEPTH+FTYP;
	'FOR' J:=1 'STEP' 1 'UNTIL' LDPT 'DO'
	'IF' FRN1[I]=FRN1[J] 
	'AND' FRN2[I]=FRN2[J]
	'AND' FRN3[I]=FRN3[J]
	'AND' LOWER(FTBD[J])=FTYP-10
	'AND' FTBD[J]%BSIZE=DEPTH 'THEN'
	'BEGIN' DEFINE(FRLN[I],FRLN[J]);
	DELETE(I); I:=I-1; 'GOTO' EXLOOP;
	'END' SEARCH FOR LABEL DECLARATION;
EXLOOP:	'END' FORWARD LABEL SATISFACTION DEPTH CHANGE
	'END' SCOPE CHECK AND LABEL FORWARD REFERENCE CHECK
'END' DEAL WITH LABEL LIST AT BLOCK END;

'PROCEDURE' DPROC;
	'BEGIN'
	'INTEGER' SNADR,SDBASE,SNODEC,SFIXSP,PINL,SLTYP,SADEP,SPDEP;
	SPDEP:=PDEPTH; PDEPTH:=NPN; NPN:=NPN+1;
	'IF' PDEPTH>=BSIZE 'THEN' WARN(23);
	SLTYP:=TYPE; IDENT; TYPE:=SLTYP; DLAB;
	SADEP:=ADEPTH; SDBASE:=DBASE; ADEPTH:=0; DEPTH:=DEPTH+1;
	SNODEC:=NODEC; DBASE:=NODEC; SFIXSP:=FIXSP; SNADR:=NADR;
	'COMMENT' MAKE BODY BEHAVE LIKE A BLOCK;
	FIXSP:=3; NADR:=4; PINL:=NEWLAB; LABEL(PINL);
	CODE(PDEPTH);
	'IF' BS=40 'THEN'
	'BEGIN''INTEGER' SPTYP;
	TYPE:=0; ABS; DTV; CHFAIL(41,21); SEMI(28);
	'FOR' DECL:=1 'STEP' 1 'UNTIL' 20 'DO' DIG[DECL]:=0;
VALUE:	SPTYP:=DTYPE;
'IF' SPTYP=9 'THEN'
	'BEGIN'
	LOOP:	IDENT;
		'IF''NOT' FOUND 'OR' DECL<=SNODEC 'THEN' WARN(39)
		'ELSE' DIG[DECL-SNODEC]:=1;
		'IF' BS=44 'THEN''BEGIN' ABS; 'GOTO' LOOP 'END'
		'ELSE''BEGIN' SEMI(29); 'GOTO' VALUE
			'END'
	'END' VALUE SPECIFICATION;
'GOTO' TSP1;
TSPEC:	SPTYP:=DTYPE;
TSP1:	'IF' SPTYP#0 'THEN'
	'BEGIN''IF' SPTYP=9 'THEN' WARN(26);
	LOP:	IDENT; 'IF''NOT' FOUND 'OR' TYPE#0 'THEN' WARN(29)
		'ELSE' VTBD[DECL]:=BSIZE*SPTYP+PDEPTH;
		'IF' BS=44 'THEN''BEGIN' ABS; 'GOTO' LOP 'END'
	'ELSE'	'BEGIN' SEMI(29); 'GOTO' TSPEC 'END'
	'END' TYPE SPECIFICATION;

	CODE(FIXSP-3); 'COMMENT' NUMBER OF PARAMETERS;
	'FOR' DECL:=NODEC 'STEP' -1 'UNTIL' NODEC-FIXSP+4 'DO'
	'BEGIN' TYPE:=VTBD[DECL]%BSIZE;
	'IF' TYPE>9 'THEN' VTBD[DECL]:=VTBD[DECL]+5*BSIZE
	'ELSE''IF' ATYP 'THEN'
		'BEGIN''IF' DIG[DECL-SNODEC]#0 'THEN' WARN(41);
		'END' FORMAL ARRAY
	'ELSE''IF' TYPE<4 'AND' TYPE>0 'THEN'
	'BEGIN''IF' DIG[DECL-SNODEC]=0 'THEN'
		'BEGIN' TYPE:=TYPE+20;
		VTBD[DECL]:=VTBD[DECL]+20*BSIZE;
		'END' NAME PARAMETER
	'END' UNSUBSCRIPTED VARIABLE;
	CODE(TYPE);
	'END' CHECK TYPES OF PARAMETERS;

	'END' PARAMETER SPECIFICATION
	'ELSE'
	'BEGIN' SEMI(29); CODE(0)
	'END' NO PARAMETER CASE;

	STATEMENT; SEMI(23);

	'IF' SLTYP>10 'THEN' COD2(12,3);
	CODE(10);
	WRITE(DEV,"L",PINL,"=",FIXSP*3,";");
	NADR:=SNADR; DBASE:=SDBASE; NODEC:=SNODEC; FIXSP:=SFIXSP;
	ADEPTH:=SADEP; PDEPTH:=SPDEP; EBLOCK;
'END' DECLARE PROCEDURE;


'INTEGER''PROCEDURE' SUBSCRIPT;
'BEGIN''INTEGER' STYPE,NOS,SDEC;
STYP:=TYPE-4; SDEC:=DECL; CHFAIL(27,3); NOS:=1;
NSUB:	GET INTEGER;
	'IF' BS=29 'THEN' ABS 'ELSE'
	'BEGIN' CHFAIL(44,4); NOS:=NOS+1; 'GOTO' NSUB
	'END';
SUBSCRIPT:=NOS; DECL:=SDEC;
TYPE:=STYPE 'END';

'PROCEDURE' FETCH;
'BEGIN'
'IF' FRED 'THEN' FRED:='FALSE' 'ELSE' IDENT;
'IF''NOT' FOUND 'THEN' TYPE:=TYPE+10;
'COMMENT' ASSUME UNDECLARED FUNCTION OF CURRENT TYPE;
'IF' TYPE>20 'THEN'
	'BEGIN' TYPE:=TYPE-20; GETOUT; CODE(62);
	'END' NAME PARAMETER
'ELSE''IF' TYPE>10 'THEN'
	'BEGIN' PCALL; TYPE:=TYPE-10
	'END'
'ELSE' 'IF' TYPE>4 'THEN'
	'BEGIN''INTEGER' N; N:=SUBSCRIPT; CODE(14);
	VINFO(DECL); CODE(N);
	'END'
'ELSE' GETOUT;
'END' FETCH VARIABLE;

'PROCEDURE' EXPRESSION;
'IF' BTYP 'THEN' DBE(3)
'ELSE' TYPE:='IF' AE 'THEN' 1 'ELSE' 2;

'PROCEDURE' RHS;
'BEGIN''INTEGER' STYP; STYP:=TYPE; EXPRESSION;
'IF' STYP=1 'AND' TYPE=2 'THEN' CODE(44)
'ELSE''IF' STYP=2 'AND' TYPE=1 'THEN' CODE(43);
TYPE:=STYP
'END' ASSIGNMENT RIGHT HAND SIDE;

'PROCEDURE' ASSIGNMENT;
'BEGIN''INTEGER' SDECL,N;
'IF''NOT' FOUND 'THEN' WARN(17)
'ELSE'	'BEGIN' SDECL:=DECL;
	'IF' TYPE>=11 'AND' TYPE<=13 'THEN' TYPE:=TYPE-10;
	'IF' TYPE>20 'THEN'
	'BEGIN' TYPE:=TYPE-20; GETOUT; RHS; CODE(55);
	'END' ASSIGN TO NAME PARAMETER
	'ELSE''IF' ATYP 'THEN'
		'BEGIN' N:=SUBSCRIPT; CHFAIL(33,24); RHS;
		 CODE(15); VINFO(SDECL); CODE(N)
		'END'
	'ELSE''IF' TYPE<4 'THEN'
		'BEGIN' RHS; DECL:=SDECL; PUTOUT;
		'END'
	'ELSE' WARN(17);
	'END'
'END' ASSIGNMENT;

'PROCEDURE' IDOUT;
'BEGIN' PR2(ID1); PR2(ID2); PR2(ID3) 'END';

'PROCEDURE' PR1(X); 'INTEGER' X; 'VALUE' X;
'IF' X#0 'THEN'
CHOUT(1,EXPAND(X));

'PROCEDURE' PR2(X); 'INTEGER' X; 'VALUE' X;
'BEGIN' PR1(X%58); PR1(X-X%58*58);
'END' PRINT 2 CHARS OF IDENT;

'PROCEDURE' WARN(X); 'INTEGER' X; 'VALUE' X;
'BEGIN'	SKIP(1); DEV:=0; CHOUT(0,0);
WRITE(1,"FAIL ",X," LINE ",LINE," IDENT ");
IDOUT; WRITE(1," SYMBOL ",BS);
'END' FAILURE WARNING;

'PROCEDURE' FAIL(X); 'INTEGER' X; 'VALUE' X;
'BEGIN' WARN(X);
'IF' TERM 'THEN' ABS;
NEXT: 'IF''NOT' TERM 'THEN''BEGIN' ABS; 'GOTO' NEXT 'END';
'END' FAILURE OUTPUT;

'PROCEDURE' CHFAIL(SYM,FNO); 'INTEGER' SYM,FNO; 'VALUE' SYM, FNO;
'BEGIN''IF' BS#SYM 'THEN' WARN(FNO); ABS 'END';

'PROCEDURE' SAVE;
'BEGIN' DECL:=DECL+1; DIG[DECL]:=EXPAND(BS); ABS 'END';

'PROCEDURE' RDIG;
L: 'IF' DIGIT 'THEN'
	'BEGIN' SAVE; 'GOTO' L 'END';

'PROCEDURE' MAKREAL(R1,R2);
'VALUE' R1,R2; 'BOOLEAN' R1,R2;
'BEGIN' 'IF''NOT' R2 'THEN' CODE(44);
'IF''NOT' R1 'THEN' CODE(51);
'END' MAKE BOTH OPERANDS REAL;

'BOOLEAN''PROCEDURE' APRIME;
'BEGIN''BOOLEAN' NEG,PREAL;
'IF' FRED 'THEN''BEGIN' FETCH; APRIME:=TYPE=1; 'GOTO' EAPR
		'END';

NEG:=BS=45; 'IF' BS=43 'OR' BS=45 'THEN' ABS;

'IF' BS=40 'THEN'
	'BEGIN' ABS; PREAL:=AE; CHFAIL(41,12)
	'END'
'ELSE''IF' LETTER 'THEN'
	'BEGIN' 'IF' TYPE>2 'THEN' TYPE:=2;
	FETCH; 'IF''NOT' (TYPE=1 'OR' TYPE=2) 'THEN' WARN(38);
	PREAL:=TYPE=1
	'END'
'ELSE'	'BEGIN''INTEGER' I,J,K,L;
	PREAL:='FALSE'; DECL:=0;
	'IF' BS=38 'THEN'
	'BEGIN' CHIN(INDEV,I); ABS;
	K:=LOWER(I); L:=I%BSIZE; 'GOTO' INTOUT;
	'END' CHARACTER LITERAL
	'ELSE''BEGIN'
	'IF' BS=46 'THEN''GOTO' RFRAC
	'ELSE''IF''NOT' DIGIT 'THEN' FAIL(10)
	'ELSE''BEGIN' RDIG;
	'IF' BS=5 'THEN''GOTO' REXP
	'ELSE''IF' BS#46 'THEN''GOTO' LITOUT;
RFRAC:	SAVE; PREAL:='TRUE'; RDIG;
	'IF' BS#5 'THEN''GOTO' LITOUT;
REXP:	SAVE; PREAL:='TRUE';
	'IF' BS=43 'OR' BS=45 'THEN' SAVE;
	RDIG;
	'END' NUMERIC NOT STARTING WITH SIGN OR POINT
	'END' NUMERIC LITERAL;
LITOUT:	'IF' PREAL 'THEN'
		'BEGIN' CODE(45); PAD; WRITE(DEV,"FLTG;");
		'FOR' J:=1 'STEP' 1 'UNTIL' DECL 'DO'
		CHOUT(DEV,DIG[J]);
		WRITE(DEV,";DECIMAL;"); SIZE:=SIZE+3;
		'END' FLOATING POINT LITERAL
	'ELSE''BEGIN' K:=0; L:=0;
		'FOR' J:=1 'STEP' 1 'UNTIL' DECL 'DO'
		'BEGIN' K:=10*K+DIG[J]-176; L:=L*10;
		'IF' K>=BSIZE 'THEN'
			'BEGIN' L:=L+K%BSIZE; K:=LOWER(K);
			'END';
		'IF' L>=BSIZE%2 'THEN' WARN(44);
		'END' NUMERIC LITERAL CONVERSION;
	INTOUT:	'IF' K=0 'AND' L=0 'THEN' CODE(29)
		'ELSE' 'IF' L=0 'THEN' SIXBIT(K)
		'ELSE''BEGIN' CODE(16); COD2(L,K) 'END'
		'END';
	'END';

'IF' NEG 'THEN' CODE('IF' PREAL 'THEN' 46 'ELSE' 17);
APRIME:=PREAL;
EAPR: 'END' ARITHMETIC PRIMARY;

'BOOLEAN''PROCEDURE' AFAC;
'BEGIN''BOOLEAN' FREAL,SREAL;
FREAL:=APRIME;
AFA1:	'IF' BS=30 'THEN'
	'BEGIN''IF' 'NOT' FREAL 'THEN'
		'BEGIN' CODE(44); FREAL:='TRUE'
		'END';
	ABS; CODE('IF' APRIME 'THEN' 49 'ELSE' 18);
	'GOTO' AFA1
	'END';
AFAC:=FREAL
'END' ARITHMETIC FACTOR;


'BOOLEAN''PROCEDURE' ATERM;
'BEGIN''BOOLEAN' FREAL,SREAL;
FREAL:=AFAC;
ATE1:	'IF' BS=42 'THEN'
	'BEGIN' ABS; SREAL:=AFAC;
	'IF' 'NOT' FREAL 'AND''NOT' SREAL 'THEN' CODE(19)
	'ELSE''BEGIN'
		MAKREAL(FREAL,SREAL); CODE(50); FREAL:='TRUE'
		'END' REAL MULTIPLY;
	'GOTO' ATE1
	'END' MULTIPLY CASE
'ELSE''IF' BS=47 'THEN'
	'BEGIN' ABS; SREAL:=AFAC;
	MAKREAL(FREAL,SREAL);
	CODE(52); FREAL:='TRUE'; 'GOTO' ATE1
	'END' REAL DIVISION CASE
'ELSE''IF' BS=37 'THEN'
	'BEGIN' ABS; SREAL:=AFAC;
	'IF' FREAL 'OR' SREAL 'THEN' WARN(11);
	CODE(20); 'GOTO' ATE1
	'END' INTEGER DIVISION CASE;
ATERM:=FREAL
'END' ARITHMETIC TERM;

'BOOLEAN''PROCEDURE' SAE;
'BEGIN''BOOLEAN' FREAL,SREAL;
FREAL:=ATERM;
SAE1: 	'IF' BS=43 'OR' BS=45 'THEN'
	'BEGIN''INTEGER' ADDOP;
	ADDOP:=BS; ABS; SREAL:=ATERM;
	'IF' 'NOT' FREAL 'AND''NOT' SREAL 'THEN'
		CODE('IF' ADDOP=43 'THEN' 13 'ELSE' 21)
	'ELSE''BEGIN'
		MAKREAL(FREAL,SREAL);
		CODE('IF' ADDOP=43 'THEN' 53 'ELSE' 54);
		FREAL:='TRUE';
		'END' REAL ADDITION/SUBTRACTION;
	'GOTO' SAE1
	'END';
SAE:=FREAL;
'END' SIMPLE ARITHMETIC EXPRESSION;

'BOOLEAN''PROCEDURE' AE;
'IF' BS=366 'THEN'
'BEGIN''BOOLEAN' FREAL,SREAL; 'INTEGER' L1,L2;
L1:=IFCLAUSE; FREAL:=SAE; CHFAIL(212,7);
L2:=JMPNEW; LDEC(L1);
SREAL:=AE;
'IF' FREAL 'AND' SREAL 'OR''NOT' FREAL 'AND''NOT' SREAL 'THEN' LDEC(L2)
'ELSE''IF' FREAL 'THEN'
	'BEGIN' CODE(44); LDEC(L2)
	'END'
'ELSE'	'BEGIN' L1:=JMPNEW; LDEC(L2); CODE(44);
	FREAL:='TRUE'; LDEC(L1)
	'END';
AE:=FREAL
'END'
'ELSE' AE:=SAE;


'PROCEDURE' RE;
'BEGIN''INTEGER' SBS; 'BOOLEAN' FREAL,SREAL;
FREAL:=AE; SBS:=BS; ABS; SREAL:=AE;
'IF''NOT' FREAL 'AND''NOT' SREAL 'THEN' CODE(41)
'ELSE''BEGIN' MAKREAL(FREAL,SREAL); CODE(56);
	'END';
'IF' SBS=61 'THEN' CODE(22)
'ELSE''IF' SBS=35 'THEN' COD2(22,30)
'ELSE''IF' SBS=60 'THEN' CODE(24)
'ELSE''IF' SBS=62 'THEN' CODE(23)
'ELSE''IF' SBS=63 'THEN' COD2(23,30)
'ELSE''IF' SBS=38 'THEN' COD2(24,30)
'ELSE' FAIL(9);
'END' RELATIONAL BOOLEAN;

'PROCEDURE' VARIABLE(LOCAL,GLOBAL,DIRECTION);
'VALUE' LOCAL,GLOBAL,DIRECTION;
'INTEGER' LOCAL,GLOBAL,DIRECTION;
'BEGIN''INTEGER' LEVEL; LEVEL:=LOWER(VTBD[DECL]);
'IF' LEVEL=PDEPTH 'THEN' CODE(LOCAL)
'ELSE''IF' LEVEL=0 'THEN' CODE(GLOBAL)
'ELSE' COD2(DIRECTION,LEVEL);
CODE(LOWER(VADR[DECL]))
'END' STORE OR FETCH VARIABLE;

'PROCEDURE' PUTOUT; VARIABLE(4,37,26);
'PROCEDURE' GETOUT; VARIABLE(12,38,25);

'INTEGER''PROCEDURE' IFCLAUSE;
'BEGIN' ABS; DBE(3); CHFAIL(808,25);
CODE(28); LABEL(NLAB); IFCLAUSE:=NEWLAB 'END' IFCLAUSE;

'PROCEDURE' BPRIM;
'BEGIN' 'BOOLEAN' NOT;
'IF' FRED 'THEN''BEGIN' FETCH; 'GOTO' EBPRIM 'END';
'IF' BS=575 'THEN''BEGIN' NOT:='TRUE'; ABS 'END''ELSE' NOT:='FALSE';
'IF' BS=818 'THEN'
	'BEGIN' ABS; COD2(29,30) 'END'
'ELSE''IF' BS=241 'THEN'
	'BEGIN' ABS; CODE(29) 'END'
'ELSE''IF' LETTER 'THEN'
	'BEGIN' TYPE:=3; IDENT; FRED:='TRUE';
	'IF' BTYPE 'THEN' FETCH 'ELSE' RE
	'END'
'ELSE''IF' BS=40 'THEN'
	'BEGIN' ABS; DBE(3); CHFAIL(41,14) 'END'
'ELSE' RE;
'IF' NOT 'THEN' CODE(30);
EBPRIM: 'END' BPRIME;

'PROCEDURE' BTERM;
'BEGIN' BPRIM;
BTM1: 'IF' BS=118 'THEN'
	'BEGIN' ABS; BPRIM; CODE(31); 'GOTO' BTM1 'END';
'END' BOOL TERM;

'PROCEDURE' SBE2;
'BEGIN' BTERM;
SBE1: 'IF' BS=618 'THEN'
	'BEGIN' ABS; BTERM; CODE(32); 'GOTO' SBE1 'END';
'END' SBE WITHOUT EQUIV;

'PROCEDURE' SBE;
'BEGIN' SBE2;
SBE3:	'IF' BS=217 'THEN'
	'BEGIN' ABS; SBE2; CODE(33); 'GOTO' SBE3 'END';
'END' SIMPLE BOOLEAN EXPRESSION;

'PROCEDURE' SDBE(DBTYP); 'VALUE' DBTYP; 'INTEGER' DBTYP;
'BEGIN'
'IF' DBTYP=3 'THEN' SBE
'ELSE''IF' BS=40 'THEN'
	'BEGIN' ABS; DBE(DBTYP); CHFAIL(41,14)
	'END'
'ELSE'	'BEGIN' IDENT;
	'IF' FOUND 'THEN'
	'BEGIN' 'IF' TYPE=DBTYP+5 'THEN' GETOUT
	'ELSE''IF' TYPE=8 'THEN'
		'BEGIN''IF' SUBSCRIPT#1 'THEN' WARN(47);
		GETOUT; CODE(48);
		'END' EVALUATE SWITCH
	'ELSE''GOTO' SANF
	'END' ACTION WHEN DECLARED
	'ELSE' SANF: 'BEGIN' TYPE:=DBTYP; SFR;
		CODE(47); LABEL(ADDR);
		'END' SET ADDRESS OF NON-FORMAL
	'END' SET ADDRESS OF LABEL OR PROCEDURE
'END' SIMPLE DESIGNATIONAL OR BOOLEAN EXPRESSION;

'PROCEDURE' DBE(DBTYP); 'VALUE' DBTYP; 'INTEGER' DBTYP;
'BEGIN'
'IF' BS#366 'THEN' SDBE(DBTYP)
'ELSE'	'BEGIN''INTEGER' L1,L2;
	L1:=IFCLAUSE; SDBE(DBTYP); CHFAIL(212,8);
	L2:=JMPNEW; LDEC(L1);
	DBE(DBTYP); LDEC(L2);
	'END' CONDITIONAL;
TYPE:=DBTYP;
'END' DESIGNATIONAL OR BOOLEAN EXPRESSION;

'PROCEDURE' STID(SID1,SID2,SADR);
'VALUE' SID1,SID2,SADR;
'INTEGER' SID1,SID2,SADR;
'BEGIN' DECL:=DECL+1; IL1[DECL]:=SID1; IL2[DECL]:=SID2;
	VADR[DECL]:=SADR;
'END' STORE STANDARD IDENTIFIER;


BSIZE:=64;
'COMMENT' FIND OUT WORD SIZE OF MACHINE;
HOL1:='FALSE'; STRING:='FALSE';
PDEPTH:=0; NPN:=1; LDPT:=0; FIXSP:=0; DEPTH:=0;
ADEPTH:=0; SIZE:=0; DOLL:='FALSE'; LINE:=1;
NLAB:=20; NODEC:=19;
NADR:=2; FRED:='FALSE'; SECOND:='FALSE';
SKIP(1); WRITE(1,"ROGALGOL MK40");
CHIN(0,INDEV);
'IF' INDEV=0 'THEN'
'BEGIN' SKIP(1); WRITE(1,"OUTPUT DEV? "); READ(1,DEV);
TABLES:=DEV>9; DEV:=DEV-DEV%10*10;
SKIP(1); WRITE(1,"INPUT DEV? "); READ(1,INDEV);
'END''ELSE'
'BEGIN' DISK(1); CHIN(0,INDEV); TABLES:=INDEV<0; INDEV:=3; DEV:=3;
'END' SPECIAL SYSTEM OVERLAY;
SKIP(DEV); WRITE(DEV,"*1"); SKIP(DEV);

'FOR' DECL:=1 'STEP' 1 'UNTIL' 19 'DO'
	'BEGIN' VTBD[DECL]:='IF' DECL>9 'THEN' BSIZE*11
		'ELSE' BSIZE*10;
	IL3[DECL]:=0
	'END';
VTBD[2]:=BSIZE*12; VTBD[4]:=BSIZE*11;
VTBD[17]:=BSIZE*12; VTBD[18]:=BSIZE*12;

DECL:=0;
STID(1113,538,40);
STID(182,536,7);
STID(241,1113,35);
STID(1049,62,3);
STID(537,3,35);
STID(1165,1412,5);
STID(1067,1053,48); IL3[7]:=1165;
STID(1352,542,6); IL3[8]:=5;
STID(182,891,8); IL3[9]:=20;
STID(0,0,0);
STID(1119,1064,0);
STID(1111,14,0);
STID(189,19,0);
STID(76,194,0); IL3[14]:=72;
STID(314,16,0);
STID(710,0,0);
STID(1111,420,0);
STID(304,1169,0); IL3[18]:=308;
STID(60,19,0);

ABS; STATEMENT;
'IF' BS#36 'THEN' WARN(6); CODE(63); PAD;
'IF' LDPT#0 'THEN'
'FOR' DECL:=1 'STEP' 1 'UNTIL' LDPT 'DO'
	'BEGIN'	ID1:=FRN1[DECL]; ID2:=FRN2[DECL]; ID3:=FRN3[DECL];
	LINE:=FLINE[DECL]; WARN(2)
	'END';
WRITE(DEV,"L0,",FIXSP*3,";*0;L0;"); CHOUT(DEV,164);
SKIP(DEV);
EPROG: CHOUT(DEV,154); SKIP(1); WRITE(1,"SIZE ",SIZE);
'END' OF ROGALGOL COMPILER
$

