-- file: TexSymbols2Impl.mesa
-- Pascal-to-Mesa translator output, translated at September 27, 1985 10:21:37 am PDT


DIRECTORY
  PascalBasic,
  PascalWizardFiles,
  TexTypes,
  TexSysdep,
  TexSysdepInline,
  TexInteraction,
  TexMemory,
  TexSymbols,
  TexScan,
  TexOps,
  TexRest;

TexSymbols2Impl: PROGRAM IMPORTS PascalBasic, PascalWizardFiles, TexTypes, TexSysdep, TexSysdepInline, TexInteraction, TexMemory, TexSymbols, TexScan, TexOps, TexRest EXPORTS TexSymbols = PUBLIC
BEGIN OPEN PascalBasic, PascalWizardFiles, TexTypes, TexSysdep, TexSysdepInline, TexInteraction, TexMemory, TexSymbols, TexScan, TexOps, TexRest;
--:165
--173:--
FontInShortDisplay: PascalInteger;
--:173----181:--
DepthThreshold: PascalInteger;


BreadthMax: PascalInteger;
--:181----213:
Nest: LONG POINTER TO ARRAY PascalInteger[0..40] OF ListStateRecord ← PascalStaticZone.NEW[ARRAY PascalInteger[0..40] OF ListStateRecord];

NestPtr: PascalInteger[0..NestSize];


MaxNestStack: PascalInteger[0..NestSize];

CurList: ListStateRecord;


ShownMode: PascalInteger[-201..201];
--:213----246:--
OldSetting: PascalInteger[0..21];
--:246----253:
Eqtb: LONG POINTER TO ARRAY PascalInteger[1..5476] OF MemoryWord ← PascalStaticZone.NEW[ARRAY PascalInteger[1..5476] OF MemoryWord];

XeqLevel: LONG POINTER TO ARRAY PascalInteger[4767..5476] OF Quarterword ← PascalStaticZone.NEW[ARRAY PascalInteger[4767..5476] OF Quarterword];
--:253----256:
Hash: LONG POINTER TO ARRAY PascalInteger[258..3024] OF TwoHalves ← PascalStaticZone.NEW[ARRAY PascalInteger[258..3024] OF TwoHalves];

HashUsed: Halfword;


NoNewControlSequence: PascalBoolean;

CsCount: PascalInteger;
--:256----271:
SaveStack: LONG POINTER TO ARRAY PascalInteger[0..600] OF MemoryWord ← PascalStaticZone.NEW[ARRAY PascalInteger[0..600] OF MemoryWord];

SavePtr: PascalInteger[0..SaveSize];


MaxSaveStack: PascalInteger[0..SaveSize];

CurLevel: Quarterword;

CurGroup: GroupCode;


CurBoundary: PascalInteger[0..SaveSize];
--:271----286:--
MagSet: PascalInteger;


UsePressFormat: PascalBoolean;
--:286----297:--
CurCmd: EightBits;


CurChr: Halfword;

CurCs: Halfword;

CurTok: Halfword;
--:297----301:
InputStack: LONG POINTER TO ARRAY PascalInteger[0..200] OF InStateRecord ← PascalStaticZone.NEW[ARRAY PascalInteger[0..200] OF InStateRecord];


InputPtr: PascalInteger[0..StackSize];

MaxInStack: PascalInteger[0..StackSize];


CurInput: InStateRecord;
--:301----304:--
InOpen: PascalInteger[0..MaxInOpen];

InputFile: LONG POINTER TO ARRAY PascalInteger[1..6] OF AlphaFile ← PascalStaticZone.NEW[ARRAY PascalInteger[1..6] OF AlphaFile];

Line: PascalInteger;

LineStack: LONG POINTER TO ARRAY PascalInteger[1..6] OF PascalInteger ← PascalStaticZone.NEW[ARRAY PascalInteger[1..6] OF PascalInteger];
--:304----305:

ScannerStatus: PascalInteger[0..5];

WarningIndex: Halfword;

DefRef: Halfword;
--:305----308:
ParamStack: LONG POINTER TO ARRAY PascalInteger[0..60] OF Halfword ← PascalStaticZone.NEW[ARRAY PascalInteger[0..60] OF Halfword];

ParamPtr: PascalInteger[0..ParamSize];


MaxParamStack: PascalInteger;
--:308----309:--
AlignState: PascalInteger;
--:309----310:

BasePtr: PascalInteger[0..StackSize];
--:310----333:--
ParLoc: Halfword;

ParToken: Halfword;
--:361----382:
CurMark: LONG POINTER TO ARRAY PascalInteger[0..4] OF Halfword ← PascalStaticZone.NEW[ARRAY PascalInteger[0..4] OF Halfword];
--:382----387:--
LongState: PascalInteger[110..113];
--:387
--388:--Pstack: LONG POINTER TO ARRAY PascalInteger[0..8] OF Halfword ← PascalStaticZone.NEW[ARRAY PascalInteger[0..8] OF Halfword];
--:388----410:--
CurVal: PascalInteger;


CurValLevel: PascalInteger[0..5];
--:410----438:--
Radix: SmallNumber;
--:438----447:

CurOrder: GlueOrd;
--:447----480:--ReadFile: LONG POINTER TO ARRAY PascalInteger[0..15] OF AlphaFile ← PascalStaticZone.NEW[ARRAY PascalInteger[0..15] OF AlphaFile];

ReadOpen: LONG POINTER TO ARRAY PascalInteger[0..16] OF PascalInteger[0..2] ← PascalStaticZone.NEW[ARRAY PascalInteger[0..16] OF PascalInteger[0..2]];
--:480----489:--
CondPtr: Halfword;


IfLimit: PascalInteger[0..4];

CurIf: SmallNumber;
--:489----493:

SkipLine: PascalInteger;
--:493----512:--
CurName: StrNumber;

CurArea: StrNumber;


CurExt: StrNumber;
--:512----513:--
AreaDelimiter: PoolPointer;


ExtDelimiter: PoolPointer;
--306:-- Runaway: PROCEDURE = 
BEGIN P:Halfword;
 IF  INT[ScannerStatus]>1  THEN BEGIN PrintNl[431];
SELECT ScannerStatus FROM 2 =>BEGIN Print[432];P←DefRef; END;
3 =>BEGIN Print[433];P←64997; END;4 =>BEGIN Print[434];P←64996; END;
5 =>BEGIN Print[435];P←DefRef; END; ENDCASE;PrintChar[63];PrintLn[];
ShowTokenList[Mem[P]↑.Hh.Rh,0,ErrorLine-10]; END; END;--:306----:119----120:
  ShowContext: PROCEDURE = 
BEGIN  OldSetting:PascalInteger[0..21];
--315:--I:PascalInteger[0..BufSize];J:PascalInteger[0..BufSize];L:PascalInteger[0..HalfErrorLine];M:PascalInteger;
N:PascalInteger[0..ErrorLine];P:PascalInteger;Q:PascalInteger;--:315-- BasePtr←InputPtr;
InputStack↑[BasePtr]←CurInput;
{WHILE TRUE DO BEGIN CurInput←InputStack↑[BasePtr];--312:
IF(BasePtr=InputPtr)OR (CurInput.StateField#0)OR (CurInput.
IndexField#3)OR (CurInput.LocField#0) THEN BEGIN Tally←0;
OldSetting←Selector;IF CurInput.StateField#0  THEN BEGIN--313:
IF  INT[CurInput.NameField]<=17  THEN IF(CurInput.NameField=0) THEN IF
BasePtr=0  THEN PrintNl[436] ELSE PrintNl[437] ELSE BEGIN PrintNl[438];
IF CurInput.NameField=17  THEN PrintChar[42] ELSE PrintInt[ INT[CurInput.
NameField]-1];PrintChar[62]; END  ELSE BEGIN PrintNl[439];
PrintInt[Line+( INT[CurInput.LocField]-CurInput.StartField)]; END;
PrintChar[32]--:313--;--318:--BEGIN L←Tally;Tally←0;Selector←20;
TrickCount←1000000; END;
IF Buffer↑[CurInput.LimitField]=Eqtb↑[4815].Int  THEN J←CurInput.
LimitField  ELSE J←CurInput.LimitField+1;
IF  INT[J]>0  THEN FOR i:INT    IN [ INT[CurInput.StartField ].. INT[J-1 ]] DO  I ← i;  IF I=CurInput.
LocField  THEN BEGIN FirstCount←Tally;
TrickCount←Tally+1+ErrorLine-HalfErrorLine;
IF TrickCount<ErrorLine  THEN TrickCount←ErrorLine; END;
Print[Buffer↑[I]];--:318-- ENDLOOP; END  ELSE BEGIN--314:
SELECT CurInput.IndexField FROM 0 =>PrintNl[440];1,2 =>PrintNl[441];
3 =>IF CurInput.LocField=0  THEN PrintNl[442] ELSE PrintNl[443];
4 =>PrintNl[444];5 =>BEGIN PrintLn[];PrintCs[CurInput.NameField]; END;
6 =>PrintNl[445];7 =>PrintNl[446];8 =>PrintNl[447];9 =>PrintNl[448];
10 =>PrintNl[449];11 =>PrintNl[450];12 =>PrintNl[451];13 =>PrintNl[452];
14 =>PrintNl[453];15 =>PrintNl[454]; ENDCASE =>PrintNl[63]--:314--;--319:
BEGIN L←Tally;Tally←0;Selector←20;TrickCount←1000000; END;
IF  INT[CurInput.IndexField]<5  THEN ShowTokenList[CurInput.StartField,
CurInput.LocField,100000] ELSE ShowTokenList[Mem[CurInput.
StartField]↑.Hh.Rh,CurInput.LocField,100000]--:319--; END;
Selector←OldSetting;--317:
IF TrickCount=1000000  THEN BEGIN FirstCount←Tally;
TrickCount←Tally+1+ErrorLine-HalfErrorLine;
IF TrickCount<ErrorLine  THEN TrickCount←ErrorLine; END;
IF Tally<TrickCount  THEN M←Tally-FirstCount  ELSE M←
TrickCount-FirstCount;IF L+FirstCount<=HalfErrorLine  THEN BEGIN P←0;
N←L+FirstCount; END  ELSE BEGIN Print[149];
P←L+FirstCount-HalfErrorLine+3;N←HalfErrorLine; END;
FOR i:INT    IN [ INT[P ].. INT[FirstCount-1 ]] DO  Q ← i; PrintChar[TrickBuf↑[ PascalMODPower2Mask[Q ,63]]] ENDLOOP;
PrintLn[];FOR i:INT    IN [ INT[1 ].. INT[N ]] DO  Q ← i; PrintChar[32] ENDLOOP;
IF M+N<=ErrorLine  THEN P←FirstCount+M  ELSE P←FirstCount+(ErrorLine
-N-3);
FOR i:INT    IN [ INT[FirstCount ].. INT[P-1 ]] DO  Q ← i; PrintChar[TrickBuf↑[ PascalMODPower2Mask[Q ,63]]] ENDLOOP;
IF M+N>ErrorLine  THEN Print[149]--:317--; END--:312--;
IF(CurInput.StateField#0) THEN IF( INT[CurInput.NameField]>17)OR (
BasePtr=0) THEN  GOTO Label30;BasePtr←BasePtr-1; END ENDLOOP ;
EXITS Label30 => NULL};CurInput←InputStack↑[InputPtr]; END;--:311----323:
 BeginTokenList: PROCEDURE[P: Halfword,T: Quarterword]
 = 
BEGIN BEGIN IF  INT[InputPtr]>MaxInStack  THEN BEGIN MaxInStack←InputPtr
;IF InputPtr=StackSize  THEN Overflow[455,StackSize]; END;
InputStack↑[InputPtr]←CurInput;InputPtr←InputPtr+1; END;
CurInput.StateField←0;CurInput.StartField←P;
CurInput.IndexField←T;
IF  INT[T]>=5  THEN BEGIN Mem[P]↑.Hh.Lh←Mem[P]↑.Hh.Lh+1;
IF T=5  THEN CurInput.LimitField←ParamPtr  ELSE BEGIN CurInput.
LocField←Mem[P]↑.Hh.Rh;IF Eqtb↑[4797].Int>1  THEN BEGIN BeginDiagnostic[];
PrintNl[210];SELECT T FROM 14 =>PrintEsc[222];15 =>PrintEsc[456];
 ENDCASE =>PrintCmdChr[71,T+3551];Print[418];TokenShow[P];
EndDiagnostic[FALSE]; END; END; END  ELSE CurInput.LocField←P; END;--:323
--324:-- EndTokenList: PROCEDURE
 = 
BEGIN IF  INT[CurInput.IndexField]>=3  THEN BEGIN IF  INT[CurInput.IndexField]<=4
 THEN FlushList[CurInput.StartField] ELSE BEGIN DeleteTokenRef[
CurInput.StartField];
IF CurInput.IndexField=5  THEN WHILE  INT[ParamPtr]>CurInput.LimitField DO
BEGIN ParamPtr←ParamPtr-1;FlushList[ParamStack↑[ParamPtr]]; END ENDLOOP ; END;
 END  ELSE IF CurInput.IndexField=1  THEN AlignState←0;
BEGIN InputPtr←InputPtr-1;CurInput←InputStack↑[InputPtr]; END;
BEGIN IF Interrupt#0  THEN PauseForInstructions[]; END; END;--:324----325:
  BackInput: PROCEDURE = 
BEGIN P:Halfword;
 WHILE(CurInput.StateField=0)AND (CurInput.LocField=0)DO
EndTokenList[] ENDLOOP ;P←GetAvail[];Mem[P]↑.Hh.Lh←CurTok;
IF  INT[CurTok]<768  THEN IF  INT[CurTok]<512  THEN AlignState←AlignState-1  ELSE
AlignState←AlignState+1;
BEGIN IF  INT[InputPtr]>MaxInStack  THEN BEGIN MaxInStack←InputPtr;
IF InputPtr=StackSize  THEN Overflow[455,StackSize]; END;
InputStack↑[InputPtr]←CurInput;InputPtr←InputPtr+1; END;
CurInput.StateField←0;CurInput.StartField←P;
CurInput.IndexField←3;CurInput.LocField←P; END;--:325----327:
 BackError: PROCEDURE = 
BEGIN OkToInterrupt←FALSE;BackInput[];
OkToInterrupt←TRUE;Error[]; END; InsError: PROCEDURE
 = 
BEGIN OkToInterrupt←FALSE;BackInput[];CurInput.IndexField←4;
OkToInterrupt←TRUE;Error[]; END;--:327----328:
 

 BeginFileReading: PROCEDURE = 
BEGIN IF InOpen=MaxInOpen  THEN Overflow[457,MaxInOpen];
IF First=BufSize  THEN Overflow[128,BufSize];InOpen←InOpen+1;
BEGIN IF  INT[InputPtr]>MaxInStack  THEN BEGIN MaxInStack←InputPtr;
IF InputPtr=StackSize  THEN Overflow[455,StackSize]; END;
InputStack↑[InputPtr]←CurInput;InputPtr←InputPtr+1; END;
CurInput.IndexField←InOpen;LineStack↑[CurInput.IndexField]←Line;
CurInput.StartField←First;CurInput.StateField←1;
CurInput.NameField←0; END;--:328----329:-- EndFileReading: PROCEDURE
 = 
BEGIN First←CurInput.StartField;
Line←LineStack↑[CurInput.IndexField];
IF  INT[CurInput.NameField]>17  THEN AClose[@InputFile↑[CurInput.IndexField
]];BEGIN InputPtr←InputPtr-1;CurInput←InputStack↑[InputPtr]; END;
InOpen←InOpen-1; END;--:329----330:-- 

 ClearForErrorPrompt: PROCEDURE = 
BEGIN  WHILE(CurInput.StateField#0)AND (CurInput.NameField=0)AND (
 INT[InputPtr]>0)AND ( INT[CurInput.LocField]>CurInput.LimitField)DO
EndFileReading[] ENDLOOP ;PrintLn[]; END;--:330----336:
 CheckOuterValidity: PROCEDURE = 
BEGIN P:Halfword;Q:Halfword;
 IF ScannerStatus#0  THEN BEGIN DeletionsAllowed←FALSE;--337:
IF CurCs#0  THEN BEGIN IF(CurInput.StateField=0)OR ( INT[CurInput.
NameField]<1)OR ( INT[CurInput.NameField]>17) THEN BEGIN P←GetAvail[];
Mem[P]↑.Hh.Lh← INT[4096]+CurCs;BeginTokenList[P,3]; END;CurCmd←10;
CurChr←32; END--:337--;IF  INT[ScannerStatus]>1  THEN--338:--BEGIN Runaway[];
IF CurCs=0  THEN BEGIN IF Interaction=3  THEN NULL;PrintNl[134];Print[465];
 END  ELSE BEGIN CurCs←0;BEGIN IF Interaction=3  THEN NULL;PrintNl[134];
Print[466]; END; END;Print[467];--339:--P←GetAvail[];
SELECT ScannerStatus FROM 2 =>BEGIN Print[432];Mem[P]↑.Hh.Lh←637; END;
3 =>BEGIN Print[473];Mem[P]↑.Hh.Lh←ParToken;LongState←112; END;
4 =>BEGIN Print[434];Mem[P]↑.Hh.Lh←637;Q←P;P←GetAvail[];Mem[P]↑.Hh.Rh←Q;
Mem[P]↑.Hh.Lh←6855;AlignState←-1000000; END;5 =>BEGIN Print[435];
Mem[P]↑.Hh.Lh←637; END; ENDCASE;BeginTokenList[P,4]--:339--;Print[468];
SprintCs[WarningIndex];BEGIN HelpPtr←4;HelpLine↑[3]←469;
HelpLine↑[2]←470;HelpLine↑[1]←471;HelpLine↑[0]←472; END;Error[];
 END--:338-- ELSE BEGIN BEGIN IF Interaction=3  THEN NULL;PrintNl[134];
Print[459]; END;PrintCmdChr[104,CurIf];Print[460];
PrintInt[SkipLine];BEGIN HelpPtr←3;HelpLine↑[2]←461;
HelpLine↑[1]←462;HelpLine↑[0]←463; END;
IF CurCs#0  THEN CurCs←0  ELSE HelpLine↑[2]←464;CurTok←6858;
InsError[]; END;DeletionsAllowed←TRUE; END; END;--:336----340:
--:340----341:-- GetNext: PROCEDURE
 = 
BEGIN  K:PascalInteger[0..BufSize];T:Halfword;Cat:PascalInteger[0..15];
 DO {--Label20:--CurCs←0;{IF CurInput.StateField#0  THEN--343:
BEGIN DO {--Label25:--IF  INT[CurInput.LocField]<=CurInput.LimitField  THEN BEGIN
CurChr←Buffer↑[CurInput.LocField];
CurInput.LocField←CurInput.LocField+1;
DO {--Label21:--CurCmd←Eqtb↑[ INT[4127]+CurChr].Hh.Rh;--344:
SELECT CurInput.StateField+CurCmd FROM--345:--10,26,42,27,43--:345-- => GOTO Label25;
1,17,33 =>--354:
BEGIN {IF  INT[CurInput.LocField]>CurInput.LimitField  THEN CurCs←257  ELSE
BEGIN DO {--Label26:--K←CurInput.LocField;CurChr←Buffer↑[K];
Cat←Eqtb↑[ INT[4127]+CurChr].Hh.Rh;K←K+1;
IF Cat=11  THEN CurInput.StateField←17  ELSE IF Cat=10  THEN CurInput.
StateField←17  ELSE CurInput.StateField←1;
IF(Cat=11)AND ( INT[K]<=CurInput.LimitField) THEN--356:
BEGIN DO CurChr←Buffer↑[K];Cat←Eqtb↑[ INT[4127]+CurChr].Hh.Rh;K←K+1;
 IF(Cat#11)OR ( INT[K]>CurInput.LimitField) THEN EXIT; ENDLOOP;--355:
BEGIN IF Buffer↑[K]=CurChr  THEN IF Cat=7  THEN IF  INT[K]<CurInput.LimitField
 THEN BEGIN CurChr←Buffer↑[K+1];
IF  INT[CurChr]<64  THEN Buffer↑[K-1]← INT[CurChr]+64  ELSE Buffer↑[K-1]← INT[CurChr]-64;
CurInput.LimitField← INT[CurInput.LimitField]-2;First←First-2;
WHILE  INT[K]<=CurInput.LimitField DO BEGIN Buffer↑[K]←Buffer↑[K+2];K←K+1;
 END ENDLOOP ; GOTO Label26; END; END--:355--;IF Cat#11  THEN K←K-1;
IF  INT[K]>CurInput.LocField+1  THEN BEGIN CurCs←IdLookup[CurInput.
LocField, INT[K]-CurInput.LocField];CurInput.LocField←K; GOTO Label40; END;
 END--:356-- ELSE--355:
BEGIN IF Buffer↑[K]=CurChr  THEN IF Cat=7  THEN IF  INT[K]<CurInput.LimitField
 THEN BEGIN CurChr←Buffer↑[K+1];
IF  INT[CurChr]<64  THEN Buffer↑[K-1]← INT[CurChr]+64  ELSE Buffer↑[K-1]← INT[CurChr]-64;
CurInput.LimitField← INT[CurInput.LimitField]-2;First←First-2;
WHILE  INT[K]<=CurInput.LimitField DO BEGIN Buffer↑[K]←Buffer↑[K+2];K←K+1;
 END ENDLOOP ; GOTO Label26; END; END--:355--;CurCs←129+Buffer↑[CurInput.LocField];
CurInput.LocField←CurInput.LocField+1;EXIT; EXITS Label26 => NULL} ENDLOOP; END;
EXITS Label40 => NULL};CurCmd←Eqtb↑[CurCs].Hh.B0;CurChr←Eqtb↑[CurCs].Hh.Rh;
IF  INT[CurCmd]>=112  THEN CheckOuterValidity[]; END--:354--;14,30,46 =>--353:
BEGIN CurCs←CurChr+1;CurCmd←Eqtb↑[CurCs].Hh.B0;
CurChr←Eqtb↑[CurCs].Hh.Rh;CurInput.StateField←1;
IF  INT[CurCmd]>=112  THEN CheckOuterValidity[]; END--:353--;8,24,40 =>--352:
BEGIN IF(CurChr=Buffer↑[CurInput.LocField])AND (
 INT[CurInput.LocField]<CurInput.LimitField) THEN BEGIN IF  INT[Buffer↑[CurInput.LocField+1]]<64
 THEN CurChr←Buffer↑[CurInput.LocField+1]+64  ELSE CurChr←Buffer↑
[CurInput.LocField+1]-64;CurInput.LocField←CurInput.LocField+2;
 GOTO Label21; END;CurInput.StateField←1; END--:352--;16,32,48 =>--346:
BEGIN BEGIN IF Interaction=3  THEN NULL;PrintNl[134];Print[474]; END;
BEGIN HelpPtr←2;HelpLine↑[1]←475;HelpLine↑[0]←476; END;
DeletionsAllowed←FALSE;Error[];DeletionsAllowed←TRUE; GOTO Label20; END--:346
;--347:--11 =>--349:--BEGIN CurInput.StateField←17;CurChr←32; END--:349--;
6 =>--348:--BEGIN CurInput.LocField←CurInput.LimitField+1;CurCmd←10;
CurChr←32; END--:348--;22,15,31,47 =>--350:
BEGIN CurInput.LocField←CurInput.LimitField+1; GOTO Label25; END--:350--;
38 =>--351:--BEGIN CurInput.LocField←CurInput.LimitField+1;
CurCs←ParLoc;CurCmd←Eqtb↑[CurCs].Hh.B0;CurChr←Eqtb↑[CurCs].Hh.Rh;
IF  INT[CurCmd]>=112  THEN CheckOuterValidity[]; END--:351--;
2 =>AlignState←AlignState+1;18,34 =>BEGIN CurInput.StateField←1;
AlignState←AlignState+1; END;3 =>AlignState←AlignState-1;
19,35 =>BEGIN CurInput.StateField←1;AlignState←AlignState-1; END;
20,21,23,25,28,29,36,37,39,41,44,45 =>CurInput.StateField←1;--:347
 ENDCASE => NULL--:344--;EXIT; EXITS Label21 => NULL} ENDLOOP; END  ELSE BEGIN CurInput.StateField←33;--360:
IF  INT[CurInput.NameField]>17  THEN--362:
BEGIN Line←FileGetPos[@InputFile↑[CurInput.IndexField]];
First←CurInput.StartField;
IF  NOT ForceEof  THEN BEGIN IF InputLn[@InputFile↑[CurInput.IndexField
],TRUE] THEN FirmUpTheLine [] ELSE ForceEof←TRUE; END;
IF ForceEof  THEN BEGIN PrintChar[41];ForceEof←FALSE;PascalTextBREAK[file: @TermOut];
EndFileReading[];CheckOuterValidity[]; GOTO Label20; END;
IF(Eqtb↑[4815].Int<0)OR (Eqtb↑[4815].Int>127) THEN CurInput.LimitField←
 INT[CurInput.LimitField]-1  ELSE Buffer↑[CurInput.LimitField]←Eqtb↑[4815].
Int;First←CurInput.LimitField+1;
CurInput.LocField←CurInput.StartField; END--:362
 ELSE BEGIN IF NOT (CurInput.NameField=0) THEN BEGIN CurCmd←0;
CurChr←0; GOTO Label10; END;IF  INT[InputPtr]>0  THEN BEGIN EndFileReading[];
 GOTO Label20; END;IF  INT[Selector]<18  THEN OpenLogFile[];
IF  INT[Interaction]>1  THEN BEGIN IF CurInput.LimitField=CurInput.
StartField  THEN PrintNl[477];PrintLn[];First←CurInput.StartField;
BEGIN Print[42];TermInput[]; END;CurInput.LimitField←Last;
IF(Eqtb↑[4815].Int<0)OR (Eqtb↑[4815].Int>127) THEN CurInput.LimitField←
 INT[CurInput.LimitField]-1  ELSE Buffer↑[CurInput.LimitField]←Eqtb↑[4815].
Int;First←CurInput.LimitField+1;
CurInput.LocField←CurInput.StartField; END  ELSE FatalError[478];
 END--:360--;BEGIN IF Interrupt#0  THEN PauseForInstructions[]; END; GOTO Label25;
 END;EXIT; EXITS Label25 => NULL} ENDLOOP; END--:343-- ELSE--357:
IF CurInput.LocField#0  THEN BEGIN T←Mem[CurInput.LocField]↑.Hh.Lh;
CurInput.LocField←Mem[CurInput.LocField]↑.Hh.Rh;
IF  INT[T]>=4096  THEN BEGIN CurCs← INT[T]-4096;CurCmd←Eqtb↑[CurCs].Hh.B0;
CurChr←Eqtb↑[CurCs].Hh.Rh;
IF  INT[CurCmd]>=112  THEN IF CurCmd=115  THEN--358:
BEGIN CurCs← INT[Mem[CurInput.LocField]↑.Hh.Lh]-4096;
CurInput.LocField←0;CurCmd←Eqtb↑[CurCs].Hh.B0;
CurChr←Eqtb↑[CurCs].Hh.Rh;IF  INT[CurCmd]>99  THEN BEGIN CurCmd←0;
CurChr←257; END; END--:358-- ELSE CheckOuterValidity[];
 END  ELSE BEGIN CurCmd← PascalDIVPower2[T ,8];CurChr← PascalMODPower2Mask[T ,255];
SELECT CurCmd FROM 1 =>AlignState←AlignState+1;
2 =>AlignState←AlignState-1;5 =>--359:
BEGIN BeginTokenList[ParamStack↑[ INT[CurInput.LimitField]+CurChr-1],0];
 GOTO Label20; END--:359--; ENDCASE => NULL; END; END  ELSE BEGIN EndTokenList[]; GOTO Label20;
 END--:357--;--342:
IF  INT[CurCmd]<=5  THEN IF  INT[CurCmd]>=4  THEN IF AlignState=0  THEN--789:
BEGIN IF ScannerStatus=4  THEN FatalError[767];
CurCmd←Mem[CurAlign+5]↑.Hh.Lh;Mem[CurAlign+5]↑.Hh.Lh←CurChr;
IF CurCmd=63  THEN BeginTokenList[64990,2] ELSE BeginTokenList[Mem[
CurAlign+2]↑.Int,2];AlignState←1000000; GOTO Label20; END--:789----:342--;EXITS Label10 => NULL};EXIT; EXITS Label20 => NULL} ENDLOOP; END;
--:341----363:--  FirmUpTheLine: PROCEDURE = 
BEGIN K:PascalInteger[0..BufSize];
 CurInput.LimitField←Last;
IF Eqtb↑[4795].Int>0  THEN IF  INT[Interaction]>1  THEN BEGIN PrintLn[];
IF  INT[CurInput.StartField]<CurInput.LimitField  THEN FOR i:INT    IN [ INT[CurInput.
StartField ].. INT[ INT[CurInput.LimitField]-1 ]] DO  K ← i; Print[Buffer↑[K]] ENDLOOP;
First←CurInput.LimitField;BEGIN Print[479];TermInput[]; END;
IF  INT[Last]>First  THEN BEGIN FOR i:INT    IN [ INT[First ].. INT[Last-1 ]] DO  K ← i; Buffer↑[ INT[K]+CurInput.
StartField-First]←Buffer↑[K] ENDLOOP;
CurInput.LimitField← INT[CurInput.StartField]+Last-First; END; END; END;
 InsertRelax: PROCEDURE = 
BEGIN CurTok← INT[4096]+CurCs;BackInput[];
CurTok←6861;BackInput[];CurInput.IndexField←4; END;--:379
  GetXToken: PROCEDURE = 
BEGIN  DO {--Label20:--GetNext[];
{IF  INT[CurCmd]<=99  THEN  GOTO Label30;
IF  INT[CurCmd]>=110  THEN IF  INT[CurCmd]<114  THEN MacroCall [] ELSE BEGIN CurCs←
2764;CurCmd←9; GOTO Label30; END  ELSE Expand[]; GOTO Label20;
EXITS Label30 => NULL};IF CurCs=0  THEN CurTok← INT[(CurCmd*256)]+CurChr  ELSE CurTok←
 INT[4096]+CurCs;EXIT; EXITS Label20 => NULL} ENDLOOP; END;--:380----381:-- XToken: PROCEDURE
 = 
BEGIN WHILE  INT[CurCmd]>99 DO BEGIN Expand[];GetNext[]; END ENDLOOP ;
IF CurCs=0  THEN CurTok← INT[(CurCmd*256)]+CurChr  ELSE CurTok←
 INT[4096]+CurCs; END;--:381----403:--
END.