Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/util/simed.lst
There is 1 other file named simed.lst in the archive. Click here to see a list.
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE    1
SIMED.SIM	  18-AUG-1978  13:05	

		    2	OPTIONS(/C/-Q/-A/-I/-D);   OPTIONS(/-W);
		    3	
		    4	!   --- SIMULA Editor and Indentation program Version 2(6) ---
		    5	
		    6	
		    7	The SIMED program edits SIMULA source program files into  a  readable
		    8	form.
		    9	
		   10	SIMED can be used to indent a SIMULA program (for better readability)
		   11	according to the BEGIN-END structure.  This is especially useful when
		   12	the program contains BEGIN-END nesting  errors,  which  usually  will
		   13	produce unhelpful compiler messages.
		   14	
		   15	SIMED  may  also be used to convert reserved words, standard and user
		   16	identifiers to -
		   17	1) UPPER CASE 2) lower case 3) Edit Case (1st char.  upper case).
		   18	
		   19	Lines  which  become  too  long  when indented will be split up at an
		   20	appropriate position.
		   21	
		   22	If one of the following conditions holds, comments are not indented -
		   23	a) The start of the line is part of a comment or
		   24	b) The end of the line is part of an (unfinished) comment.
		   25	
		   26	
		   27	Command format for SIMED (example):
		   28	
		   29	outfile=infile/i:4/r:80/e:13200
		   30	
		   31	Default switches:
		   32	/I:4		Indent  step  4. A non-positive argument implies that
		   33	                leading  tabs  and  blanks  will  be  preserved   and
		   34	                indented according to Abs(arg).
		   35	
		   36	/E:13200	Edit  Reserved words, standard ids, own ids, Comments
		   37	/E:UEL00	and Options, Text and Character constants resp. 1 (U)
		   38	                =  Upper CASE, 2 (L) = Lower Case, 3 (E) = Edit case,
		   39	                0 = no  change.                    Thus  /E:000  will
		   40	                suppress all editing.
		   41	
		   42	/R:80		Outfile record length 80.
		   43	
		   44	/TABS           Use tabs in indentation (default)
		   45	
		   46	/C		Check for non-unique  identifiers  with  length  >=12
		   47	                (producing warnings).
		   48	
		   49	Other switches:
		   50	/SIMSET		Recognize SIMSET identifiers (default for SIMSET  and
		   51	                SIMULATION blocks)
		   52	/-SIMSET        Do not recognize SIMSET ids
		   53	/SIMULATION	Recognize   SIMULATION   identifiers   (default   for
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-1
SIMED.SIM	  18-AUG-1978  13:05	

		   54	                SIMULATION blocks)
		   55	/-SIMULATION    Do not recognize SIMULATION ids
		   56	/-TABS          Do not use tabs
		   57	/NUMBERED:xx	Produce line numbers, incr. xx (def. 100) (default if
		   58	                input file has numbers).
		   59	/-NUMBERED	Suppress       line      numbers      on      output.
		   60			(default if input file has no line numbers).
		   61	/-C             Do not check long id:s (5-20% cheaper).
		   62	/Z:n		Suppress indentation for n block levels. May be <  0,
		   63	                >=      -10,     assuming     surrounding     levels.
		   64	                Default /Z:0.
		   65	/G		Perform  last  COMPIL  command after processing, i.e.
		   66	                last COMPILE,  LOAD  or  EXECUTE  command.
		   67	!xxx		Run program xxx after processing. Thus  ABC!SOS  will
		   68	                return  to  SOS editing last file edited. The command
		   69	                NUL:!SOS is also legal.
		   70	
		   71	Your own default switches can also be given in a file  SWITCH.INI  on
		   72	your area.   You need only have one or more lines of the form:
		   73	
		   74	SIMED /switch/switch...
		   75	
		   76	Example:  If you want files to be edited with reserved words in lower
		   77	case,  your  own  identifiers  in upper case, and standard identifiers
		   78	with  upper  case  initial  letter,  standard  indentation=2,   record
		   79	length=100, put the following line in SWITCH.INI:
		   80	
		   81	SIMED /E:LEU/I:2/R:100
		   82	
		   83	Trailing zeros in the E switch may be omitted -  the  system  default
		   84	will  be used in those positions.  You can always override the default
		   85	values in the command to SIMED.
		   86	
		   87	Default extension is SIM.  Default outfile name is infile name. (NUL:
		   88	and TTY:  are accepted.)
		   89	
		   90	If you want only default values, the command string to edit the  file
		   91	X.SIM with the same output file name is simply X.
		   92	
		   93	The shortest possible command to apply SIMED to a file X.SIM is -
		   94	
		   95	.R SIMED-X      (@SIMED -X in TOPS-20)
		   96	
		   97	SIMED will take what follows after a minus sign as the first  command
		   98	and  exit  after  editing.   CONTINUE  will put SIMED in command mode,
		   99	expecting further commands.  START or START-<command-string> may  also
		  100	be used.
		  101	
		  102	Just typing -
		  103	.R SIMED;					!
		  104	
		  105	will  start  SIMED  editing the last TECO/SOS edited file (by reading
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-2
SIMED.SIM	  18-AUG-1978  13:05	

		  106	TMP:EDS) using default switches (possibly redefined in SWITCH.INI).
		  107	
		  108	Exit from SIMED by entering ^Z or ^C.
		  109	
		  110	Restrictions:
		  111	
		  112	Split up lines will not be indented properly if they contain BEGIN or
		  113	END.
		  114	
		  115	Also,  numerical  constants  containing  blanks  may  occasionally be
		  116	improperly split.  The programmer is recommended to start source  code
		  117	lines with BEGIN and END resp.
		  118	
		  119	Additional feature:
		  120	
		  121	If  a  text  constant  includes  <CR><LF> SIMED will ask the user for
		  122	permission to continue, in order to prevent a possible messing  up  of
		  123	the  file.   Otherwise  if one of the quotes is missing all subsequent
		  124	(correct) text  constants  might  be  destroyed  by  Upper/lower  case
		  125	editing.   "Proper" text constants containing <CR><LF> will be changed
		  126	to new concatenated text contants now allowed in SIMULA.
		  127	
		  128	Author:
		  129	Mats Ohlin, Swedish Research Institute of National Defence
		  130	FOA 1, Fack, S-104 50 STOCKHOLM 80, SWEDEN
		  131	;
		  132	
B1		  133	BEGIN
		  134	EXTERNAL TEXT PROCEDURE rest,skip,upcase,from,checkextension,
		  135	tmpin,tsub,storbokstav,conc,scanto,inline,compress,tagord;
		  136	EXTERNAL PROCEDURE exit,run,depchar;
		  137	EXTERNAL CHARACTER PROCEDURE findtrigger,fetchar;
		  138	EXTERNAL REF (Outfile) PROCEDURE findoutfile;
		  139	EXTERNAL REF (Infile) PROCEDURE findinfile;
		  140	EXTERNAL BOOLEAN PROCEDURE numbered,rescan,iashift,bokstav;
		  141	EXTERNAL INTEGER PROCEDURE scanint,search,scan;
		  142	EXTERNAL REAL PROCEDURE cptime;
		  143	
		  144	TEXT initcommand,t;
		  145	INTEGER nkeys,lines,linesout;   REAL cputime,newtime;
		  146	nkeys:= 22;
		  147	
		  148	IF rescan THEN
B2		  149	BEGIN
		  150	    Inimage; t:-Sysin.Image.Strip;
		  151	    scanto(t,'-');
		  152	    initcommand:- Copy(rest(t));
		  153	    IF initcommand = ";" OR
		  154	    (initcommand == NOTEXT AND fetchar(t,t.Length) = ';') THEN
B3		  155	    BEGIN   initcommand:- tmpin("EDS",FALSE);
		  156		scanto(initcommand,' ');   initcommand:- scanto(initcommand,'/');
		  157		initcommand:- scanto(initcommand,'%');
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-3
SIMED.SIM	  18-AUG-1978  13:05	

		  158		WHILE initcommand.More DO
		  159		IF initcommand.Getchar <= ' ' THEN
B4		  160		BEGIN  initcommand:- initcommand.Sub(1,initcommand.Pos-2);
		  161			initcommand.Setpos(0);
E4		  162		END;
		  163		initcommand:- initcommand.Strip;
E3		  164	    END tmp;
E2		  165	END;
		  166	
		  167	Linesperpage(-1);
		  168	Outtext("SIMED - Version 2(6)");   Outimage;
B5		  169	BEGIN
		  170	
		  171	    TEXT ARRAY key,arg,argdef[1:nkeys];   TEXT command,numfield,tbuf;
		  172	    INTEGER defkey,i,j,lineno,oldline,incr;
		  173	    REF (tree) reswdtree,standid,simsettree,simulationtree;
		  174	    REF (tree) ARRAY treearr[0:2];
		  175	    CHARACTER ctab,c;
		  176	    REF (Infile) prog;	REF (Outfile) outf;
		  177	    TEXT progname,outname,runprog;   BOOLEAN leftskip,num,longcheck;
		  178	    INTEGER proglength,indent,ma,margin,
		  179	    ind,inde,outlength,maxindent,
		  180	    begincount,endcount,zuppress;
		  181	    INTEGER ARRAY convert[2:8];
		  182	    BOOLEAN debug,tabs;
		  183	    CHARACTER ARRAY uppercase,lowercase[0:127];
		  184	
		  185	    PROCEDURE inituppercase(ca);   CHARACTER ARRAY ca;
B6		  186	    BEGIN   INTEGER i;
		  187		FOR i:= 1 STEP 1 UNTIL 95 DO ca[i]:= Char(i);
		  188		FOR i:= 96 STEP 1 UNTIL 122 DO ca[i]:= ca[i-32];
		  189	
		  190		ca[123]:= ca[35];   ca[124]:= Char(124);   ca[125]:= ca[36]
		  191	
E6		  192	    END OF INIT UPPERCASE;
		  193	
		  194	    PROCEDURE initlowercase(ca);   CHARACTER ARRAY ca;
B7		  195	    BEGIN   INTEGER i;
		  196		FOR i:= 1 STEP 1 UNTIL 63 DO ca[i]:= Char(i);
		  197		FOR i:= 96 STEP 1 UNTIL 122 DO ca[i]:= ca[i-32]:= Char(i);
		  198		FOR i:= 91 STEP 1 UNTIL 95 DO ca[i]:= Char(i);
		  199	
		  200		ca[123]:= ca[35]:= Char(123);
		  201		ca[124]:= Char(124);
		  202		ca[125]:= ca[36]:= Char(125)
		  203	
E7		  204	    END OF INIT LOWERCASE;
		  205	
		  206	    PROCEDURE warning(message,t);
		  207	    VALUE message,t;   TEXT message,t;
B8		  208	    BEGIN
		  209		IF Pos > 1 THEN Outimage;
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-4
SIMED.SIM	  18-AUG-1978  13:05	

		  210		Outtext("%SIMED - ");
		  211		IF message.Length > Length THEN
B9		  212		BEGIN   WHILE message.More DO Outchar(message.Getchar);
E9		  213		END ELSE Outtext(message);
		  214		t:- t.Strip;
		  215		IF t.Length > Length THEN
B10		  216		BEGIN
		  217		    WHILE t.More DO Outchar(t.Getchar);
		  218		    Outtext(" -")
E10		  219		END ELSE Outtext(t);
		  220		Outimage
E8		  221	    END OF WARNING;
		  222	
		  223	    CLASS tree(case);   INTEGER case;
B11		  224	    BEGIN  TEXT tmain;   INTEGER h;
		  225		! With current set of reserved words
		  226		! and stand.id:s there will be max. 3 hits in
		  227		! the same cell;
		  228		TEXT ARRAY word[0:94, 1:IF case = 0 OR case = 4 THEN 1 ELSE
		  229		!;				IF case = 3 THEN 2 ELSE 3];
		  230		INTEGER maxhits;
		  231	
		  232		BOOLEAN PROCEDURE found(t);   TEXT t;
B12		  233		BEGIN
		  234		    h:= Rank(fetchar(t,1));
		  235		    IF t.Length > 3 THEN
		  236		    h:= h  +   8*Rank(fetchar(t,2)) +  64*Rank(fetchar(t,3));
		  237		    h:= h  + 512*Rank(fetchar(t,t.Length)) + t.Length;
		  238		    h:= Mod(h,95);
		  239		    IF word[h,1] =/= NOTEXT THEN
B13		  240		    BEGIN
		  241			found:=
		  242			IF maxhits = 1 THEN word[h,1] = t ELSE
		  243			IF maxhits = 2 THEN
		  244			(IF word[h,1] = t THEN TRUE ELSE word[h,2] = t) ELSE
		  245			! Maxhits = 3;
		  246			(IF word[h,1] = t THEN TRUE ELSE
		  247			IF  word[h,2] = t THEN TRUE ELSE word[h,3] = t);
E13		  248		    END not empty cell;
E12		  249		END OF FOUND;
		  250	
		  251		IF case = 0 THEN
B14		  252		BEGIN
		  253		    tmain:- Copy(
		  254		    "COMMENT"
		  255		    "END"
		  256		    "OTHERWISE"
		  257		    "OPTIONS"
		  258		    "BEGIN"
		  259		    "WHEN"
		  260		    "ELSE");
		  261		    word[2,1]:- tmain.Sub(1,7);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-5
SIMED.SIM	  18-AUG-1978  13:05	

		  262		    word[23,1]:- tmain.Sub(8,3);
		  263		    word[36,1]:- tmain.Sub(11,9);
		  264		    word[53,1]:- tmain.Sub(20,7);
		  265		    word[73,1]:- tmain.Sub(27,5);
		  266		    word[84,1]:- tmain.Sub(32,4);
		  267		    word[91,1]:- tmain.Sub(36,4);
E14		  268		END ELSE
		  269		IF case = 1 THEN
B15		  270		BEGIN
		  271		    tmain:- Copy(
		  272		    "COMMENT"
		  273		    "INSPECT"
		  274		    "IF"
		  275		    "NAME"
		  276		    "REAL"
		  277		    "IS"
		  278		    "REF"
		  279		    "IN"
		  280		    "AND"
		  281		    "END"
		  282		    "EQV"
		  283		    "CLASS"
		  284		    "EQ"
		  285		    "FALSE"
		  286		    "OTHERWISE"
		  287		    "LABEL"
		  288		    "EXTERNAL"
		  289		    "AT"
		  290		    "DELAY"
		  291		    "GT"
		  292		    "THIS"
		  293		    "DO"
		  294		    "GO"
		  295		    "ARRAY"
		  296		    "OPTIONS"
		  297		    "NOT"
		  298		    "CHARACTER"
		  299		    "BEFORE"
		  300		    "STEP"
		  301		    "GE"
		  302		    "TO"
		  303		    "LE"
		  304		    "FOR"
		  305		    "NE"
		  306		    "NEW"
		  307		    "BEGIN"
		  308		    "OR"
		  309		    "GOTO"
		  310		    "NOTEXT"
		  311		    "THEN"
		  312		    "ACTIVATE"
		  313		    "WHEN"
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-6
SIMED.SIM	  18-AUG-1978  13:05	

		  314		    "PRIOR"
		  315		    "SHORT"
		  316		    "INTEGER"
		  317		    "ELSE"
		  318		    "TRUE"
		  319		    "BOOLEAN"
		  320		    "WHILE"
		  321		    "AFTER"
		  322		    "QUA"
		  323		    "REACTIVATE"
		  324		    "SWITCH"
		  325		    "VALUE"
		  326		    "LT"
		  327		    "PROTECTED"
		  328		    "LONG"
		  329		    "UNTIL"
		  330		    "TEXT"
		  331		    "INNER"
		  332		    "NONE"
		  333		    "IMP"
		  334		    "VIRTUAL"
		  335		    "HIDDEN"
		  336		    "PROCEDURE");
		  337		    word[2,1]:- tmain.Sub(1,7);
		  338		    word[4,1]:- tmain.Sub(8,7);
		  339		    word[5,1]:- tmain.Sub(15,2);
		  340		    word[8,1]:- tmain.Sub(17,4);
		  341		    word[10,1]:- tmain.Sub(21,4);
		  342		    word[11,1]:- tmain.Sub(25,2);
		  343		    word[15,1]:- tmain.Sub(27,3);
		  344		    word[16,1]:- tmain.Sub(30,2);
		  345		    word[19,1]:- tmain.Sub(32,3);
		  346		    word[23,1]:- tmain.Sub(35,3);
		  347		    word[24,1]:- tmain.Sub(38,3);
		  348		    word[26,1]:- tmain.Sub(41,5);
		  349		    word[28,1]:- tmain.Sub(46,2);
		  350		    word[32,1]:- tmain.Sub(48,5);
		  351		    word[36,1]:- tmain.Sub(53,9);
		  352		    word[37,1]:- tmain.Sub(62,5);
		  353		    word[39,1]:- tmain.Sub(67,8);
		  354		    word[40,1]:- tmain.Sub(75,2);
		  355		    word[42,1]:- tmain.Sub(77,5);
		  356		    word[46,1]:- tmain.Sub(82,2);
		  357		    word[47,1]:- tmain.Sub(84,4);
		  358		    word[48,1]:- tmain.Sub(88,2);
		  359		    word[51,1]:- tmain.Sub(90,2);
		  360		    word[52,1]:- tmain.Sub(92,5);
		  361		    word[53,1]:- tmain.Sub(97,7);
		  362		    word[54,1]:- tmain.Sub(104,3);
		  363		    word[56,1]:- tmain.Sub(107,9);
		  364		    word[57,1]:- tmain.Sub(116,6);
		  365		    word[60,1]:- tmain.Sub(122,4);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-7
SIMED.SIM	  18-AUG-1978  13:05	

		  366		    word[61,1]:- tmain.Sub(126,2);
		  367		    word[64,1]:- tmain.Sub(128,2);
		  368		    word[66,1]:- tmain.Sub(130,2);
		  369		    word[67,1]:- tmain.Sub(132,3);
		  370		    word[68,1]:- tmain.Sub(135,2);
		  371		    word[70,1]:- tmain.Sub(137,3);
		  372		    word[73,1]:- tmain.Sub(140,5);
		  373		    word[75,1]:- tmain.Sub(145,2);
		  374		    word[76,1]:- tmain.Sub(147,4);
		  375		    word[80,1]:- tmain.Sub(151,6);
		  376		    word[81,1]:- tmain.Sub(157,4);
		  377		    word[83,1]:- tmain.Sub(161,8);
		  378		    word[84,1]:- tmain.Sub(169,4);
		  379		    word[87,1]:- tmain.Sub(173,5);
		  380		    word[88,1]:- tmain.Sub(178,5);
		  381		    word[89,1]:- tmain.Sub(183,7);
		  382		    word[91,1]:- tmain.Sub(190,4);
		  383		    word[92,1]:- tmain.Sub(194,4);
		  384		    word[2,2]:- tmain.Sub(198,7);
		  385		    word[8,2]:- tmain.Sub(205,5);
		  386		    word[15,2]:- tmain.Sub(210,5);
		  387		    word[19,2]:- tmain.Sub(215,3);
		  388		    word[42,2]:- tmain.Sub(218,10);
		  389		    word[46,2]:- tmain.Sub(228,6);
		  390		    word[48,2]:- tmain.Sub(234,5);
		  391		    word[51,2]:- tmain.Sub(239,2);
		  392		    word[52,2]:- tmain.Sub(241,9);
		  393		    word[66,2]:- tmain.Sub(250,4);
		  394		    word[67,2]:- tmain.Sub(254,5);
		  395		    word[70,2]:- tmain.Sub(259,4);
		  396		    word[83,2]:- tmain.Sub(263,5);
		  397		    word[89,2]:- tmain.Sub(268,4);
		  398		    word[91,2]:- tmain.Sub(272,3);
		  399		    word[92,2]:- tmain.Sub(275,7);
		  400		    word[15,3]:- tmain.Sub(282,6);
		  401		    word[89,3]:- tmain.Sub(288,9);
E15		  402		END ELSE
		  403		IF case = 2 THEN
B16		  404		BEGIN
		  405		    tmain:- Copy(
		  406		    "CALL"
		  407		    "ABS"
		  408		    "ENDFILE"
		  409		    "SYSOUT"
		  410		    "DIRECTFILE"
		  411		    "BREAKOUTIMAGE"
		  412		    "ARCCOS"
		  413		    "POISSON"
		  414		    "RANK"
		  415		    "GETCHAR"
		  416		    "ARCSIN"
		  417		    "POS"
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-8
SIMED.SIM	  18-AUG-1978  13:05	

		  418		    "EJECT"
		  419		    "DETACH"
		  420		    "INREAL"
		  421		    "OUTREAL"
		  422		    "LENGTH"
		  423		    "BLANKS"
		  424		    "ININT"
		  425		    "TAN"
		  426		    "GETFRAC"
		  427		    "MOD"
		  428		    "DRAW"
		  429		    "OUTINT"
		  430		    "OUTTEXT"
		  431		    "NORMAL"
		  432		    "STRIP"
		  433		    "LINE"
		  434		    "INFILE"
		  435		    "INIMAGE"
		  436		    "INCHAR"
		  437		    "LINESPERPAGE"
		  438		    "LOWTEN"
		  439		    "OUTFILE"
		  440		    "OUTIMAGE"
		  441		    "ERLANG"
		  442		    "OUTCHAR"
		  443		    "PUTCHAR"
		  444		    "SUB"
		  445		    "MORE"
		  446		    "HISTO"
		  447		    "INFRAC"
		  448		    "SETPOS"
		  449		    "RANDINT"
		  450		    "NEGEXP"
		  451		    "SQRT"
		  452		    "INTEXT"
		  453		    "SYSIN"
		  454		    "DISCRETE"
		  455		    "OUTFRAC"
		  456		    "PUTFRAC"
		  457		    "GETREAL"
		  458		    "MAIN"
		  459		    "PRINTFILE"
		  460		    "OUTFIX"
		  461		    "GETINT"
		  462		    "COPY"
		  463		    "IMAGE"
		  464		    "TANH"
		  465		    "LOCATION"
		  466		    "COS"
		  467		    "SPACING"
		  468		    "ARCTAN"
		  469		    "LETTER"
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-9
SIMED.SIM	  18-AUG-1978  13:05	

		  470		    "CLOSE"
		  471		    "LASTITEM"
		  472		    "SIGN"
		  473		    "SIN"
		  474		    "COSH"
		  475		    "PUTINT"
		  476		    "SIMULATION"
		  477		    "DIGIT"
		  478		    "OPEN"
		  479		    "LINEAR"
		  480		    "LOCATE"
		  481		    "CHAR"
		  482		    "SINH"
		  483		    "SIMSET"
		  484		    "UNIFORM"
		  485		    "ENTIER"
		  486		    "EXP"
		  487		    "PUTFIX"
		  488		    "PUTREAL"
		  489		    "HISTD"
		  490		    "RESUME");
		  491		    word[2,1]:- tmain.Sub(1,4);
		  492		    word[4,1]:- tmain.Sub(5,3);
		  493		    word[5,1]:- tmain.Sub(8,7);
		  494		    word[6,1]:- tmain.Sub(15,6);
		  495		    word[8,1]:- tmain.Sub(21,10);
		  496		    word[9,1]:- tmain.Sub(31,13);
		  497		    word[11,1]:- tmain.Sub(44,6);
		  498		    word[12,1]:- tmain.Sub(50,7);
		  499		    word[13,1]:- tmain.Sub(57,4);
		  500		    word[15,1]:- tmain.Sub(61,7);
		  501		    word[16,1]:- tmain.Sub(68,6);
		  502		    word[19,1]:- tmain.Sub(74,3);
		  503		    word[20,1]:- tmain.Sub(77,5);
		  504		    word[21,1]:- tmain.Sub(82,6);
		  505		    word[23,1]:- tmain.Sub(88,6);
		  506		    word[24,1]:- tmain.Sub(94,7);
		  507		    word[25,1]:- tmain.Sub(101,6);
		  508		    word[26,1]:- tmain.Sub(107,6);
		  509		    word[27,1]:- tmain.Sub(113,5);
		  510		    word[28,1]:- tmain.Sub(118,3);
		  511		    word[30,1]:- tmain.Sub(121,7);
		  512		    word[31,1]:- tmain.Sub(128,3);
		  513		    word[32,1]:- tmain.Sub(131,4);
		  514		    word[34,1]:- tmain.Sub(135,6);
		  515		    word[35,1]:- tmain.Sub(141,7);
		  516		    word[36,1]:- tmain.Sub(148,6);
		  517		    word[38,1]:- tmain.Sub(154,5);
		  518		    word[39,1]:- tmain.Sub(159,4);
		  519		    word[41,1]:- tmain.Sub(163,6);
		  520		    word[44,1]:- tmain.Sub(169,7);
		  521		    word[45,1]:- tmain.Sub(176,6);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-10
SIMED.SIM	  18-AUG-1978  13:05	

		  522		    word[47,1]:- tmain.Sub(182,12);
		  523		    word[48,1]:- tmain.Sub(194,6);
		  524		    word[50,1]:- tmain.Sub(200,7);
		  525		    word[51,1]:- tmain.Sub(207,8);
		  526		    word[52,1]:- tmain.Sub(215,6);
		  527		    word[56,1]:- tmain.Sub(221,7);
		  528		    word[57,1]:- tmain.Sub(228,7);
		  529		    word[58,1]:- tmain.Sub(235,3);
		  530		    word[59,1]:- tmain.Sub(238,4);
		  531		    word[61,1]:- tmain.Sub(242,5);
		  532		    word[62,1]:- tmain.Sub(247,6);
		  533		    word[63,1]:- tmain.Sub(253,6);
		  534		    word[64,1]:- tmain.Sub(259,7);
		  535		    word[65,1]:- tmain.Sub(266,6);
		  536		    word[66,1]:- tmain.Sub(272,4);
		  537		    word[67,1]:- tmain.Sub(276,6);
		  538		    word[68,1]:- tmain.Sub(282,5);
		  539		    word[70,1]:- tmain.Sub(287,8);
		  540		    word[71,1]:- tmain.Sub(295,7);
		  541		    word[72,1]:- tmain.Sub(302,7);
		  542		    word[78,1]:- tmain.Sub(309,7);
		  543		    word[84,1]:- tmain.Sub(316,4);
		  544		    word[85,1]:- tmain.Sub(320,9);
		  545		    word[87,1]:- tmain.Sub(329,6);
		  546		    word[88,1]:- tmain.Sub(335,6);
		  547		    word[91,1]:- tmain.Sub(341,4);
		  548		    word[92,1]:- tmain.Sub(345,5);
		  549		    word[94,1]:- tmain.Sub(350,4);
		  550		    word[5,2]:- tmain.Sub(354,8);
		  551		    word[6,2]:- tmain.Sub(362,3);
		  552		    word[12,2]:- tmain.Sub(365,7);
		  553		    word[16,2]:- tmain.Sub(372,6);
		  554		    word[19,2]:- tmain.Sub(378,6);
		  555		    word[24,2]:- tmain.Sub(384,5);
		  556		    word[25,2]:- tmain.Sub(389,8);
		  557		    word[26,2]:- tmain.Sub(397,4);
		  558		    word[27,2]:- tmain.Sub(401,3);
		  559		    word[34,2]:- tmain.Sub(404,4);
		  560		    word[35,2]:- tmain.Sub(408,6);
		  561		    word[36,2]:- tmain.Sub(414,10);
		  562		    word[44,2]:- tmain.Sub(424,5);
		  563		    word[45,2]:- tmain.Sub(429,4);
		  564		    word[47,2]:- tmain.Sub(433,6);
		  565		    word[50,2]:- tmain.Sub(439,6);
		  566		    word[51,2]:- tmain.Sub(445,4);
		  567		    word[62,2]:- tmain.Sub(449,4);
		  568		    word[64,2]:- tmain.Sub(453,6);
		  569		    word[67,2]:- tmain.Sub(459,7);
		  570		    word[84,2]:- tmain.Sub(466,6);
		  571		    word[87,2]:- tmain.Sub(472,3);
		  572		    word[88,2]:- tmain.Sub(475,6);
		  573		    word[25,3]:- tmain.Sub(481,7);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-11
SIMED.SIM	  18-AUG-1978  13:05	

		  574		    word[34,3]:- tmain.Sub(488,5);
		  575		    word[50,3]:- tmain.Sub(493,6);
E16		  576		END ELSE
		  577		IF case = 3 THEN
B17		  578		BEGIN
		  579		    tmain:- Copy(
		  580		    "SUC"
		  581		    "CARDINAL"
		  582		    "PRECEDE"
		  583		    "FOLLOW"
		  584		    "OUT"
		  585		    "INTO"
		  586		    "LINK"
		  587		    "PRED"
		  588		    "PREV"
		  589		    "EMPTY"
		  590		    "HEAD"
		  591		    "FIRST"
		  592		    "LAST"
		  593		    "CLEAR");
		  594		    word[0,1]:- tmain.Sub(1,3);
		  595		    word[10,1]:- tmain.Sub(4,8);
		  596		    word[17,1]:- tmain.Sub(12,7);
		  597		    word[51,1]:- tmain.Sub(19,6);
		  598		    word[55,1]:- tmain.Sub(25,3);
		  599		    word[70,1]:- tmain.Sub(28,4);
		  600		    word[71,1]:- tmain.Sub(32,4);
		  601		    word[72,1]:- tmain.Sub(36,4);
		  602		    word[73,1]:- tmain.Sub(40,4);
		  603		    word[78,1]:- tmain.Sub(44,5);
		  604		    word[84,1]:- tmain.Sub(49,4);
		  605		    word[85,1]:- tmain.Sub(53,5);
		  606		    word[90,1]:- tmain.Sub(58,4);
		  607		    word[55,2]:- tmain.Sub(62,5);
E17		  608		END ELSE
B18		  609		BEGIN
		  610		    ! Case 4;
		  611		    tmain:- Copy(
		  612		    "HOLD"
		  613		    "PASSIVATE"
		  614		    "WAIT"
		  615		    "PROCESS"
		  616		    "CANCEL"
		  617		    "NEXTEV"
		  618		    "EVTIME"
		  619		    "ACCUM"
		  620		    "TERMINATED"
		  621		    "IDLE"
		  622		    "TIME"
		  623		    "CURRENT");
		  624		    word[13,1]:- tmain.Sub(1,4);
		  625		    word[19,1]:- tmain.Sub(5,9);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-12
SIMED.SIM	  18-AUG-1978  13:05	

		  626		    word[31,1]:- tmain.Sub(14,4);
		  627		    word[35,1]:- tmain.Sub(18,7);
		  628		    word[37,1]:- tmain.Sub(25,6);
		  629		    word[45,1]:- tmain.Sub(31,6);
		  630		    word[47,1]:- tmain.Sub(37,6);
		  631		    word[48,1]:- tmain.Sub(43,5);
		  632		    word[50,1]:- tmain.Sub(48,10);
		  633		    word[58,1]:- tmain.Sub(58,4);
		  634		    word[78,1]:- tmain.Sub(62,4);
		  635		    word[85,1]:- tmain.Sub(66,7);
E18		  636		END case 4;
		  637	
		  638		maxhits:=
		  639		IF case = 0 OR case = 4 THEN 1 ELSE
		  640		IF case = 3 THEN 2 ELSE 3;
		  641	
E11		  642	    END OF TREE;
		  643	    REF (Infile) helpfile;
		  644	
		  645	    TEXT PROCEDURE inl(t);   NAME t;   TEXT t;
B19		  646	    BEGIN   inl:- inline(t,Sysin);
		  647		IF Sysin.Endfile THEN
B20		  648		BEGIN   TEXT s;   s:- Sysin.Image;
		  649		    Sysin.Close;   Sysin.Open(s);
		  650		    s:- Sysout.Image;
		  651		    Sysout.Close;   Sysout.Open(s);   inl:- NOTEXT;
		  652		    Sysout.Linesperpage(-1);
		  653		    IF t = "*" THEN
B21	E21	  654		    BEGIN   Outtext("Thank you!");   Outimage;   exit(0)   END;
E20		  655		END
E19		  656	    END of inl;
		  657	
		  658	    !***** Initial setup, continued ******;
		  659	
		  660	    tbuf:- Blanks(60);
		  661	    FOR i:= 0,1,2 DO treearr[i]:- NEW tree(i);
		  662	
		  663	    key[1]:- Copy("/SIMS");
		  664	    key[2]:- Copy("/SIMU");
		  665	    key[3]:- Copy("/E:");
		  666	    key[4]:- Copy("/E");
		  667	    key[5]:- Copy("=");
		  668	    key[6]:- Copy("/R:");
		  669	    key[7]:- Copy("/N:");
		  670	    key[8]:- Copy("/-T");
		  671	    key[9]:- Copy("/N");
		  672	    ! Avoiding explicit use of outfile definition switch[10]:;
		  673	    key[10]:- Blanks(1);   key[10].Putchar(Char(26));
		  674	    key[11]:- Copy("/I:");
		  675	    key[12]:- Copy("/I");
		  676	    key[13]:- Copy("/H");
		  677	    key[14]:- Copy("/T");
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-13
SIMED.SIM	  18-AUG-1978  13:05	

		  678	    key[15]:- Copy("/G");
		  679	    key[16]:- Copy("!");
		  680	    key[17]:- Copy("/-SIMS");
		  681	    key[18]:- Copy("/-SIMU");
		  682	    key[19]:- Copy("/Z:");
		  683	    key[20]:- Copy("/-N");
		  684	    key[21]:- Copy("/C");
		  685	    key[22]:- Copy("/-C");
		  686	    defkey:= 10;
		  687	    t:- Copy("13200 80 4");
		  688	    argdef[4]:- t.Sub(1,5);
		  689	    argdef[6]:- t.Sub(7,2);
		  690	    argdef[12]:- t.Sub(10,1);
		  691	    INSPECT findinfile("SWITCH.INI") DO
B22		  692	    BEGIN   Open(Blanks(132));
		  693		Inimage;
		  694		WHILE NOT Endfile DO
B23		  695		BEGIN   t:- upcase(Image.Sub(IF numbered THEN 7 ELSE 1,5));
		  696		    IF t = "SIMED" THEN
B24		  697		    BEGIN
		  698			t:- from(Image,6);
		  699			scanto(t,'/');
		  700			IF t.More THEN
B25		  701			BEGIN   t.Setpos(t.Pos-1);
		  702			    t:- rest(t);
		  703			    IF scan(t,nkeys,arg,key,defkey) = 0 THEN
B26		  704			    BEGIN   !Change defaults (not all switches possible);
		  705				arg[5]:-arg[10]:-arg[13]:-NOTEXT;
		  706				FOR i:= 1 STEP 1 UNTIL nkeys DO
B27		  707				BEGIN   IF arg[i]=/=NOTEXT THEN
B28		  708				    BEGIN
		  709					argdef[i]:- arg[i];
		  710					arg[i]:- NOTEXT;
E24		  711		    END END END END END;
		  712		    Inimage
E23		  713		END WHILE NOT ENDFILE;
		  714		Close
E22		  715	    END SWITCH.INI;
		  716	    IF argdef[3] =/= NOTEXT THEN
B29	E29	  717	    BEGIN argdef[4]:- argdef[3]; argdef[3]:- NOTEXT END;
		  718	    IF argdef[4].Length<5 THEN
B30		  719	    BEGIN t:-Blanks(5); t:=argdef[4];
		  720		argdef[4]:-t;
E30		  721	    END;
		  722	    IF argdef[11] =/= NOTEXT THEN
B31	E31	  723	    BEGIN argdef[12]:- argdef[11]; argdef[11]:- NOTEXT END;
		  724	    IF initcommand =/= NOTEXT THEN
		  725	    command:- initcommand ELSE
		  726	    start:  command:- NOTEXT;
		  727	    FOR i:= 1 STEP 1 UNTIL nkeys DO
		  728	    arg[i]:- argdef[i];
		  729	    begincount:= endcount:= i:= lineno:= oldline:= linesout:=
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-14
SIMED.SIM	  18-AUG-1978  13:05	

		  730	    lines:= indent:= ma:= margin:= ind:= inde:= 0;
		  731	    ctab:= Char(9);   proglength:= 150;
		  732	    IF uppercase[Rank('a')] NE 'A' THEN
B32		  733	    BEGIN
		  734		inituppercase(uppercase);   initlowercase(lowercase);
E32		  735	    END;
		  736	
		  737	    margin:= 0;
		  738	    WHILE command == NOTEXT DO command:- inl("*");
		  739	    IF command = "?" THEN
B33		  740	    BEGIN
		  741		help:	    Outtext("Command format: [outfile=]infile[/switches]");
		  742		Outimage;
		  743		command:- inl("For more help type ?:");
		  744		IF command == NOTEXT THEN GOTO start;
		  745		IF command.Getchar NE '?' THEN GOTO start;
		  746		IF Sysout.Length < 80 THEN Sysout.Image:- Blanks(80);
		  747		FOR helpfile:- findinfile("HLP:SIMED.HLP"),
		  748		findinfile("SYS:SIMED.HLP"),findinfile("DSK:SIMED.HLP") DO
		  749		INSPECT helpfile DO
B34		  750		BEGIN
		  751		    Open(Sysout.Image);
		  752		    Inimage;
		  753		    WHILE NOT Endfile DO
B35	E35	  754		    BEGIN   Outimage;   Inimage   END;
		  755		    Image:= NOTEXT;   Close;   GO TO start;
E34		  756		END;
		  757		Outtext("? Cannot find HLP:/SYS:/DSK: SIMED.HLP");    Outimage;
		  758		GO TO start;
E33		  759	    END ? OR /HELP ;
		  760	    i:= scan(command,nkeys,arg,key,defkey);
		  761	    IF i NE 0 THEN
B36		  762	    BEGIN   Outtext("? Multiple switch:");
		  763		Outtext(key[i]);
		  764		Outtext(" Please try again.");
		  765		Outimage;   GO TO start;
E36		  766	    END loop;
		  767	    FOR i:= 1 STEP 1 UNTIL nkeys DO
		  768	    IF arg[i] == NOTEXT THEN arg[i]:- argdef[i];
		  769	    IF arg[13] =/= NOTEXT THEN
B37		  770	    BEGIN !/HELP switch;
		  771		GOTO help
E37		  772	    END;
		  773	    arg[10]:- arg[10].Strip;
		  774	    IF arg[10] == NOTEXT THEN
B38		  775	    BEGIN   Outtext("? No file name entered. Please try again.");
		  776		Outimage;   GO TO start
E38		  777	    END error;
		  778	    arg[10]:- checkextension(arg[10],".SIM");
		  779	    arg[5]:- arg[5].Strip;
		  780	    progname:-
		  781	    IF arg[5] == NOTEXT THEN arg[10] ELSE
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-15
SIMED.SIM	  18-AUG-1978  13:05	

		  782	    checkextension(arg[5],".SIM");
		  783	    outname:- arg[10];
		  784	    simsettree:-
		  785	    IF arg[1] == NOTEXT AND arg[2] == NOTEXT THEN NONE
		  786	    ELSE NEW tree(3);
		  787	    simulationtree:-
		  788	    IF arg[2] =/= NOTEXT THEN NEW tree(4) ELSE NONE;
		  789	    IF arg[3] == NOTEXT THEN
		  790	    arg[3]:- arg[4];
		  791	    IF arg[3] =/= NOTEXT THEN
B39		  792	    BEGIN
		  793		t:- arg[3];
		  794		IF t.Length < 5 THEN t:- conc(t,from(argdef[4],t.Length+1));
		  795		upcase(t);
		  796		i:= 0;   j:= 1;
		  797		FOR j:= j + 1 WHILE t.Pos NE i AND j <= 6 DO
B40		  798		BEGIN
		  799		    i:= t.Pos;
		  800		    c:=t.Getchar;
		  801		    convert[j]:= IF Digit(c) THEN Rank(c)-Rank('0') ELSE
		  802		    IF c='U' THEN 1 ELSE IF c='L' THEN 2 ELSE IF c='E' THEN 3
		  803		    ELSE 0;
E40		  804		END loop;
		  805		FOR j:= 2,3,4,5,6 DO
		  806		! Check that convert[2:4] are in [0:3] and [5:6] in [0:2];
		  807		IF convert[j] < 0 OR convert[j] > (13-j)//3 THEN
B41		  808		BEGIN   convert[j]:= 0;
		  809		    Outtext("%SIMED - Edit code pos:");
		  810		    Outint(j-1,1);   Outtext(" not correct. 0 assumed.");
		  811		    Outimage;
E41		  812		END illegal;
E39		  813	    END arg 3 = edit modes;
		  814	    IF arg[6] == NOTEXT THEN outlength:= 80 ELSE
		  815	    outlength:= scanint(arg[6]);
		  816	    IF outlength < 13 OR outlength > 135 THEN
B42		  817	    BEGIN   Outtext("%SIMED - Illegal Record length:");
		  818		Outtext(arg[6]);   Outtext(" - 80 assumed.");
		  819		Outimage;
		  820		outlength:= 80;
E42		  821	    END;
		  822	    IF arg[11] == NOTEXT THEN arg[11]:- arg[12];
		  823	    IF arg[11] == NOTEXT THEN
		  824	    indent:= 4 ELSE
B43		  825	    BEGIN
		  826		indent:= scanint(arg[11]);
		  827		IF indent < -10000000000 THEN indent:= - 10000000000;
		  828		IF Sign(indent)*indent > outlength//2 THEN
B44		  829		BEGIN   Outtext("%SIMED - Illegal Indent value:");
		  830		    Outtext(arg[11]);   Outtext("  - 4 assumed.");   Outimage;
		  831		    indent:= 4;
E44		  832		END error;
E43		  833	    END indent;
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-16
SIMED.SIM	  18-AUG-1978  13:05	

		  834	    leftskip:= indent > 0;   indent:= Sign(indent)*indent;
		  835	    maxindent:= outlength - 20;
		  836	    IF maxindent < indent THEN maxindent:= indent;
		  837	
		  838	    tabs:= IF arg[14] == argdef[14] THEN arg[8] == NOTEXT ELSE
		  839	    IF arg[8] == argdef[8] THEN arg[14] =/= NOTEXT ELSE
		  840	    arg[8] == NOTEXT;
		  841	
		  842	    longcheck:= IF arg[21] == argdef[21] THEN arg[22] == NOTEXT ELSE
		  843	    IF arg[22] == argdef[22] THEN arg[21] =/= NOTEXT ELSE
		  844	    arg[22] == NOTEXT;
		  845	
		  846	    runprog:- arg[16];
		  847	    IF runprog =/= NOTEXT AND arg[15] =/= NOTEXT THEN
B45		  848	    BEGIN   Outtext("%SIMED - /G superseded by /RUN");
		  849		Outimage
E45		  850	    END;
		  851	    IF arg[17] =/= NOTEXT THEN simsettree:- NONE;
		  852	    IF arg[18] =/= NOTEXT THEN simulationtree:- NONE;
		  853	    IF arg[19] =/= NOTEXT THEN
B46		  854	    BEGIN
		  855		zuppress:= scanint(arg[19]);
		  856		IF zuppress < -10 THEN
B47		  857		BEGIN   Outtext("%SIMED - Illegal /Z value:");
		  858		    Outtext(arg[19]);   Outtext(". 0 assumed.");
		  859		    Outimage;   zuppress:= 0
E47		  860		END ELSE
		  861		ma:= margin:= - indent*Sign(indent)*zuppress;
E46		  862	    END 19;
B48		  863	    IF progname NE "TTY:" THEN BEGIN
		  864		FOR prog:- findinfile(progname) WHILE prog == NONE DO
B49		  865		BEGIN   Outtext("%SIMED - Cannot find Infile:");
		  866		    Outtext(progname);   Outimage;
		  867		    progname:- inl("Enter name of infile:");
		  868		    progname:- checkextension(progname,".SIM");
		  869		    IF arg[5] == NOTEXT THEN outname:- progname;
E49		  870		END loop;
		  871		prog.Open(Blanks(proglength));   prog.Inimage;
		  872		num:= numbered;
E48		  873	    END not TTY ELSE
B50	E50	  874	    BEGIN   prog:- Sysin;   Sysin.Image:- Blanks(proglength);   END;
		  875	
		  876	    IF arg[9] =/= NOTEXT AND arg[7] == NOTEXT THEN
B51		  877	    BEGIN   t:- arg[9];   scanto(t,':');
		  878		arg[7]:- IF t.More THEN rest(t) ELSE  Copy("100");
E51		  879	    END;
		  880	    IF arg[20] =/= NOTEXT THEN arg[7]:- NOTEXT;
		  881	    IF arg[7] =/= NOTEXT THEN
B52		  882	    BEGIN   incr:= scanint(arg[7]);
		  883		IF incr <= 0 THEN
B53		  884		BEGIN   Outtext("%SIMED - Illegal /N Increment:");
		  885		    Outtext(arg[7]);   Outtext("  - 100 assumed.");
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-17
SIMED.SIM	  18-AUG-1978  13:05	

		  886		    Outimage;   incr:= 100;
E53		  887		END;
E52		  888	    END incr;
		  889	    IF outname NE "TTY:" THEN
B54		  890	    BEGIN
		  891		IF num OR arg[7] =/= NOTEXT THEN
		  892		outname:- conc(outname,"/NUMBERED");
		  893		FOR outf:-
		  894		findoutfile(outname)  WHILE outf == NONE DO
B55		  895		BEGIN   Outtext("%SIMED - Cannot create Outfile:");
		  896		    Outtext(outname);   Outimage;
		  897		    outname:- inl("Enter name of outfile:");
		  898		    outname:- checkextension(outname,".SIM");
		  899		    IF num OR arg[7] =/= NOTEXT THEN
		  900		    outname:- conc(outname,"/NUMBERED");
E55		  901		END loop
E54		  902	    END ELSE outf:- Sysout;
		  903	
		  904	    Outchar('[');
		  905	    outname.Setpos(1);   outname:- scanto(outname,'/');
		  906	    Outtext(outname);
		  907	    IF outname NE progname THEN
B56	E56	  908	    BEGIN   Outtext(" <-- ");   Outtext(progname);   END;
		  909	    Outchar(':');   Breakoutimage;   Sysout.Setpos(2);
		  910	
		  911	    INSPECT outf DO
B57		  912	    BEGIN	    	
		  913		INSPECT prog DO
B58		  914		BEGIN
		  915		    	
		  916		    PROCEDURE outim;
		  917		    IF (IF arg[20] == NOTEXT THEN
		  918		    num OR arg[7] =/= NOTEXT ELSE FALSE) THEN
B59		  919		    BEGIN
		  920			IF fetchar(outf.Image,
		  921			(IF tabs THEN ind//8+Mod(ind,8) ELSE ind)+1) = Char(12) THEN
B60		  922			BEGIN
		  923			    outf.Image:=
		  924			    from(outf.Image,(IF tabs THEN ind//8+Mod(ind,8) ELSE ind)+1);
		  925			    outf.Image:- outf.Image.Main;
		  926			    outf.Setpos(6);   outf.Image.Putchar(Char(13));
		  927			    Breakoutimage;
		  928			    depchar(outf.Image,6,Char(9));
		  929			    outf.Image:- from(outf.Image,7);
E60		  930			END ELSE
B61		  931			BEGIN
		  932			    linesout:= linesout + 1;
		  933			    IF lineno < oldline OR contflag OR cutflag THEN
		  934			    lineno:= oldline +
		  935			    (IF arg[7] =/= NOTEXT THEN incr ELSE 1) ELSE
		  936			    IF lineno = oldline THEN
		  937			    lineno:= lineno +
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-18
SIMED.SIM	  18-AUG-1978  13:05	

		  938			    (IF lineno < 50000 THEN incr ELSE
		  939			    IF lineno < 60000 THEN 10 ELSE 2);
		  940			    numfield.Putint(lineno);
		  941			    numfield.Setpos(1);
		  942			    WHILE numfield.Getchar = ' ' DO
		  943			    depchar(numfield,numfield.Pos-1,'0');
		  944			    outf.Image:- outf.Image.Main;
		  945			    IF lineno > 65534 AND NOT warned THEN
B62		  946			    BEGIN   warned:= TRUE;
		  947				warning("Line number overflow at:",outf.Image);
E62		  948			    END warning;
		  949			    oldline:= lineno;
		  950			    Outimage;
		  951			    depchar(outf.Image,6,Char(9));
		  952			    outf.Image:- from(outf.Image,7);
E61		  953			END
E59		  954		    END ELSE
B63		  955		    BEGIN
		  956			IF fetchar(outf.Image,1) = Char(12) THEN
B64	E64	  957			BEGIN   lines:= lines - 1;    Breakoutimage   END ELSE
B65	E65	  958			BEGIN   linesout:= linesout + 1;   Outimage   END;
E63		  959		    END outim;
		  960	
		  961		    PROCEDURE printline(t);	 TEXT t;
B66		  962		    BEGIN	 INTEGER i,j,k,olddisplay,displayi,tl;   CHARACTER c;
		  963				
		  964			tl:= IF oldtext THEN 0 ELSE 1;
		  965			IF (cutflag AND textflag) OR cut_text THEN tl:= tl - 1;
		  966			IF t.Length > outlength - outf.Pos  + tl THEN
B67		  967			BEGIN   !NECESSARY TO CUT LINE;
		  968			    FOR c:= csemicolon,cblank,ctab,ccomma DO
B68		  969			    BEGIN
		  970				j:= outlength - outf.Pos + cutpos;
		  971				FOR i:= outlength-outf.Pos+tl STEP -1 UNTIL 2 DO
B69		  972				BEGIN
		  973				    IF (IF display[j] = 0 OR display[j] = 5
		  974				    THEN
		  975				    fetchar(t,i) = c ELSE FALSE) THEN GO TO cut;
		  976				    j:= j - 1
E69		  977				END  I LOOP
E68		  978			    END C LOOP;
		  979			    	
		  980			    !FAILED:;  j:= outlength - outf.Pos + cutpos;
		  981			    olddisplay:= display[j];
		  982			    	
		  983			    FOR i:= outlength-outf.Pos+tl STEP -1 UNTIL 2 DO
B70		  984			    BEGIN
		  985				IF display[j] = 5 THEN GO TO cut ELSE
		  986				IF display[j] NE   olddisplay THEN GO TO cut;
		  987				olddisplay:= display[j];   j:= j - 1
E70		  988			    END;
		  989			    	
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-19
SIMED.SIM	  18-AUG-1978  13:05	

		  990			    !FAILED AGAIN:;
		  991			    i:= outlength - outf.Pos + 1;
		  992			    k:= cutpos+i-1;
		  993			    cut_text:= display[k] = 6;
		  994			    IF outf.Pos > 1 AND NOT cut_text THEN
B71	E71	  995			    BEGIN   outf.Setpos(1);   printline(t);   GO TO done   END;
		  996			    	
		  997			    IF NOT cut_text THEN
		  998			    warning("Forced Cut at Line:",t);
		  999			    	
		 1000			    cut:
		 1001			    IF oldtext THEN i:= i - 1;
		 1002			    IF (textflag AND cutflag) OR cut_text THEN i:= i - 1;
		 1003			    printline(t.Sub(1,i));   cutpos:= Pos;
		 1004			    inde:= ind;
		 1005			    IF NOT commentflag AND NOT oldcommentflag THEN
B72		 1006			    BEGIN
		 1007				IF tabs THEN
		 1008				WHILE inde >= 8 DO
B73	E73	 1009				BEGIN Outchar(ctab);   inde:= inde - 8  END;
		 1010				outf.Setpos(outf.Pos+inde);
E72		 1011			    END indenting;
		 1012			    contflag:= TRUE;
		 1013			    oldtext:= oldtext OR cut_text;
		 1014			    printline(t.Sub(i+1,t.Length-i));
		 1015			    cut_text:= FALSE;
E67		 1016			END ELSE
B74		 1017			BEGIN
		 1018			    IF debug THEN
B75		 1019			    BEGIN   j:= cutpos;  Setpos(cutpos);
		 1020				FOR i:= 1 STEP 1 UNTIL t.Length DO
B76	E76	 1021				BEGIN  Outint(display[j],1);  j:= j + 1   END;
		 1022				outim;
		 1023				inde:= ind;
		 1024				IF tabs THEN WHILE inde >= 8 DO
B77	E77	 1025				BEGIN   Outchar(ctab);   inde:= inde - 8 END;
		 1026				outf.Setpos(outf.Pos+inde);
E75		 1027			    END Debug Output;
		 1028			    	
		 1029			    j:= cutpos + t.Length - 1;
		 1030			    IF \ cutflag AND contflag AND NOT oldtext THEN
B78		 1031			    BEGIN   WHILE More DO
B79		 1032				BEGIN   c:= Inchar;
		 1033				    IF c NE ' ' AND c NE ctab THEN GO TO skipped;
		 1034				    cutpos:= cutpos + 1
E79		 1035				END LOOP;
		 1036				outim;   GO TO done; !EMPTY LINE;
		 1037				skipped:
E78		 1038			    END ELIMINATING BLANKS AND TABS AT CUT;
		 1039			    Setpos(cutpos);
		 1040			    IF oldtext THEN  Outchar('"');
		 1041			    FOR i:= cutpos STEP 1 UNTIL j DO
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-20
SIMED.SIM	  18-AUG-1978  13:05	

B80		 1042			    BEGIN   displayi:= display[i];
		 1043				IF displayi <= 1 THEN Outchar(Inchar) ELSE
B81		 1044				BEGIN
		 1045				    IF convert[displayi] = 0 THEN Outchar(Inchar) ELSE
		 1046				    IF convert[displayi] = 1 THEN
		 1047				    Outchar(uppercase[Rank(Inchar)]) ELSE
		 1048				    IF convert[displayi] = 2 THEN
		 1049				    Outchar(lowercase[Rank(Inchar)]) ELSE
		 1050				    COMMENT CONVERT[DISPLAYI] = 3;
		 1051				    Outchar(IF displayi = olddisplay THEN
		 1052				    lowercase[Rank(Inchar)] ELSE
		 1053				    uppercase[Rank(Inchar)]);
E81		 1054				END CONVERSION;
		 1055				olddisplay:= displayi
E80		 1056			    END I LOOP;
		 1057			    IF (textflag AND cutflag) OR
		 1058			    (cut_text AND display[j] = 6) THEN
B82		 1059			    BEGIN
		 1060				IF fetchar(Image,j) = '"' THEN
B83		 1061				BEGIN
		 1062				    IF fetchar(Image,j+1) = '"' THEN
B84		 1063				    BEGIN
		 1064					warning("Lost "" at end of line:",outf.Image);
		 1065					Outchar('"');
E84		 1066				    END ELSE oldtext:= cut_text:= FALSE;
E83		 1067				END ELSE  Outchar('"');
E82		 1068			    END extra " ;
		 1069			    IF fetchar(outf.Image,outf.Pos-1) = Char(12) THEN
B85		 1070			    BEGIN
		 1071				IF arg[20] == NOTEXT AND
		 1072				(num OR arg[7] =/= NOTEXT) THEN outim ELSE
B86		 1073				BEGIN    outf.Image:- outf.Image.Sub(1,outf.Pos-1);
		 1074				    FOR c:= outf.Image.Getchar WHILE
		 1075				    c = ' ' OR c = Char(9) DO;
		 1076				    outf.Image:- outf.Image.Sub
		 1077				    (outf.Pos-1,outf.Length-outf.Pos+2);
		 1078				    Breakoutimage;   lines:= lines - 1;
		 1079				    outf.Image:- outf.Image.Main;
E86		 1080				END FF no line number in output;
E85		 1081			    END ELSE outim;
E74		 1082			END SHORT TEXT;
		 1083			done:
E66		 1084		    END OF PRINTLINE;
		 1085		    	
		 1086		    CHARACTER window,cblank,csemicolon,ccomma;   TEXT t,mainimage;
		 1087		    BOOLEAN endcommentflag,commentflag,cut_text,contflag,
		 1088		    oldcommentflag,textflag,cutflag,numericflag,
		 1089		    hit,warned,endwarn,oldtext;
		 1090		    INTEGER ARRAY display[0:proglength];
		 1091		    INTEGER i,p,markreswd,markstandid,markchar,marktext,markcomment,
		 1092		    marknumeric,markuserid,marksingle,cutpos,levelcount,level,block;
		 1093		    CLASS checker;
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-21
SIMED.SIM	  18-AUG-1978  13:05	

B87		 1094		    BEGIN   TEXT longid,u,s;  INTEGER p,l;
		 1095			INTEGER ARRAY blockpos[1:64];
		 1096			PROCEDURE newlevel;
		 1097			IF block > 0 AND block <= 64 THEN
B88	E88	 1098			BEGIN   blockpos[block]:= p  END new *egin;
		 1099	
		 1100			PROCEDURE newend;
		 1101			IF block > 0 AND block <= 64 THEN
B89		 1102			BEGIN  longid.Sub(blockpos[block],
		 1103			    p-blockpos[block]+1):= NOTEXT;
		 1104			    p:= blockpos[block];
		 1105			    longid.Setpos(p);
E89		 1106			END new *nd;
		 1107	
		 1108			longid:- Blanks(80);
		 1109			next:  p:= longid.Pos;
		 1110			Detach;
		 1111			u:- storbokstav(conc(" ",t)).Sub(1,13);
		 1112			longid.Setpos(1);
		 1113			l:= search(longid.Sub(1,p),u);
		 1114			IF l <= p THEN
B90		 1115			BEGIN   u:- u.Main;
		 1116			    longid.Setpos(l+13);   s:- scanto(longid,' ');
		 1117			    u.Setpos(14);
		 1118			    IF s NE rest(u) THEN
		 1119			    warn:
		 1120			    warning("Identifier is not unique:",
		 1121			    conc(t.Sub(1,12),"[",t.Sub(13,t.length-12),"/",
		 1122			    s,"]"));
		 1123			    longid.Setpos(p);   GO TO next;
E90		 1124			END;
		 1125			u:- u.Main;
		 1126			! No "+1" because of the extra blank:;
		 1127			IF p + u.Length > longid.Length  THEN
		 1128			longid:- conc(longid,Blanks(80));
		 1129			longid.Sub(p,u.Length):= u;   longid.Setpos(p+u.Length);
		 1130			GO TO next;
E87		 1131		    END checker;
		 1132	
		 1133		    REF (checker) check;
		 1134		    	
		 1135		    IF longcheck THEN check:- NEW checker;
		 1136		    marknumeric:= 1;	markreswd:= 2;
		 1137		    markstandid:= 3;	markuserid:= 4;
		 1138		    markcomment:= 5;	marktext:= 6;
		 1139		    markchar:= 7;		marksingle:= 8;
		 1140		    	
		 1141		    IF outf =/= Sysout THEN outf.Open(Blanks(outlength)) ELSE
		 1142		    Sysout.Image:- Blanks(outlength);
		 1143		    numfield:- outf.Image.Sub(1,5);
		 1144		    reswdtree:- NONE;
		 1145		    IF convert[2] = convert[4] THEN
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-22
SIMED.SIM	  18-AUG-1978  13:05	

		 1146		    reswdtree:- treearr[0] ELSE
		 1147		    reswdtree:- treearr[1];
		 1148		    IF convert[3] NE convert[4] THEN
B91		 1149		    BEGIN   IF standid == NONE THEN standid:- treearr[2];
E91		 1150		    END ELSE standid:- NONE;
		 1151		    	
		 1152		    cblank:= ' ';   csemicolon:= ';';   ccomma:= ',';
		 1153		    level:= -1000;
		 1154		    IF incr <= 0 THEN incr:= 100;
		 1155		    mainimage:- Image;
		 1156		    Lastitem;   Image:- Image.Strip;
		 1157		    IF num THEN
B92		 1158		    BEGIN   lineno:= scanint(Image);
		 1159			IF lineno < 0 OR arg[7] =/= NOTEXT THEN
		 1160			lineno:= incr;
		 1161			Image:- from(Image,7);
E92		 1162		    END;
		 1163		    IF num OR arg[7] =/= NOTEXT THEN
B93		 1164		    BEGIN
		 1165			IF lineno = 0 THEN lineno:= incr;
		 1166			outlength:= outlength - 6;
		 1167			depchar(outf.Image,6,Char(9));
		 1168			outf.Image:- from(outf.Image.Main,7);
E93		 1169		    END;
		 1170	
		 1171		    WHILE \ Endfile DO
B94		 1172		    BEGIN   next:
		 1173				
		 1174			IF \ More THEN
B95		 1175			BEGIN
		 1176	
		 1177			    IF NOT oldtext AND leftskip AND Length > 1
		 1178			    AND NOT commentflag AND NOT oldcommentflag THEN
B96		 1179			    BEGIN   Setpos(1);   skip(Image,' ');
		 1180	
		 1181				WHILE More DO
B97		 1182				BEGIN   window:= Inchar;
		 1183				    IF window NE ' ' AND window NE ctab THEN GO TO
		 1184				    leftskipped
E97		 1185				END LOOP;
		 1186				leftskipped:   p:= Pos - 2;
		 1187				Image:- Image.Sub(Pos-1,Length-p);
		 1188				iashift(display,1,p+1,Length,TRUE);
E96		 1189			    END SKIPPING LEADING BLANKS AND TABS;
		 1190			    	
		 1191			    ind:= IF ind > 0 THEN ma ELSE margin;
		 1192			    ind:= inde:= Mod(ind,maxindent);
		 1193			    IF NOT commentflag AND NOT oldcommentflag THEN
B98		 1194			    BEGIN
		 1195				IF tabs THEN WHILE inde >= 8 DO
B99	E99	 1196				BEGIN   Outchar(ctab);   inde:= inde - 8	 END;
		 1197				outf.Setpos(outf.Pos+inde);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-23
SIMED.SIM	  18-AUG-1978  13:05	

E98		 1198			    END not comment;
		 1199			    cutflag:= textflag;   contflag:= FALSE;
		 1200			    cutpos:= 1;
		 1201			    printline(Image);
		 1202			    oldcommentflag:= commentflag;
		 1203			    ma:= margin;   ind:= 0;   oldtext:= textflag;
		 1204			    restore:  Image:- mainimage;   Inimage;
		 1205			    lines:= lines + 1;
		 1206			    IF Endfile THEN GO TO stop;
		 1207			    num:= numbered;
		 1208			    IF num THEN
B100		 1209			    BEGIN
		 1210				IF arg[7] =/= NOTEXT THEN
		 1211				lineno:= oldline + incr ELSE
		 1212				lineno:= scanint(Image);
		 1213				IF lineno < 0 THEN lineno:= oldline +
		 1214				(IF arg[7] =/= NOTEXT THEN incr ELSE 1);
		 1215				Image:- from(Image,7);
E100		 1216			    END;
		 1217			    Image:- Image.Strip;
		 1218			    IF Image == NOTEXT THEN
B101		 1219			    BEGIN
		 1220				IF (IF num THEN  fetchar(mainimage,6)
		 1221				= Char(12) ELSE FALSE) THEN
B102	E102	 1222				BEGIN   lines:= lines - 1;   Outchar(Char(12))  END;
		 1223				outim;   GO TO restore
E101		 1224			    END;
		 1225			    IF levelcount = 0 AND begincount > 0 THEN
B103		 1226			    BEGIN   TEXT t;   levelcount:= -1000;
		 1227				t:- Blanks(5);   t.Putint(IF num THEN lineno ELSE lines+1);
		 1228				t.Setpos(1);
		 1229				WHILE t.Getchar = ' ' DO depchar(t,t.Pos-1,'0');
		 1230				t:- conc(t," ",Image);
		 1231				warning("Line(s) after last END:",t);
E103		 1232			    END;
		 1233			    iashift(display,1,1,0,TRUE);
E95		 1234			END NO MORE;
		 1235				
		 1236			IF endcommentflag THEN GO TO scanendcomment;
		 1237			IF textflag THEN GO TO scantext;
		 1238			IF commentflag THEN GO TO scancomment;
		 1239				
		 1240				
		 1241			skip(Image,' ');
		 1242			window:= Inchar;
		 1243	
		 1244			IF FALSE THEN
		 1245			scan:
B104		 1246			BEGIN   IF window = ' ' THEN
B105		 1247			    BEGIN   skip(Image,' ');
		 1248				IF More THEN window:= Inchar ELSE GO TO next
E105		 1249			    END
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-24
SIMED.SIM	  18-AUG-1978  13:05	

E104		 1250			END;
		 1251			IF window = ctab THEN !SKIP; ELSE
		 1252			IF window = csemicolon THEN !SKIP; ELSE
		 1253			IF bokstav(window) THEN
B106		 1254			BEGIN   Setpos(Pos-1);   p:= Pos;
		 1255			    t:- tagord(Image);
		 1256			    IF (IF longcheck THEN t.Length >= 12 ELSE FALSE)
		 1257			    THEN Resume(check);
		 1258			    window:= ' ';
		 1259			    IF t.Length > 1 AND t.Length < 11 THEN
B107		 1260			    BEGIN
		 1261				INSPECT reswdtree DO
B108		 1262				BEGIN   tbuf:- tbuf.Main.Sub(1,t.Length);   tbuf:= t;
		 1263				    upcase(tbuf);
		 1264				    window:= tbuf.Getchar;
		 1265				    hit:= found(tbuf)
E108		 1266				END
E107		 1267			    END ELSE
		 1268			    hit:= FALSE;
		 1269			    IF hit THEN
B109		 1270			    BEGIN
		 1271				FOR i:= Pos-1 STEP -1 UNTIL p DO display[i]:= 2;
		 1272				IF tbuf = "COMMENT" THEN GO TO scancomment;
		 1273				IF tbuf = "OPTIONS" THEN GO TO scancomment2;
		 1274				IF tbuf = "END" THEN
B110		 1275				BEGIN
		 1276				    moreends:
		 1277				    INSPECT check DO newend;
		 1278				    block:= block - 1;
		 1279				    endcount:= endcount + 1;
		 1280				    levelcount:= levelcount - 1;
		 1281				    IF levelcount = level THEN
B111		 1282				    BEGIN   level:= - 1000;
		 1283					simulationtree:- simsettree:- NONE
E111		 1284				    END;
		 1285				    IF endcount > begincount AND NOT endwarn THEN
B112		 1286				    BEGIN   TEXT t;
		 1287					t:- Blanks(5);
		 1288					t.Putint(IF num THEN lineno ELSE lines+1);
		 1289					t.Setpos(1);
		 1290					WHILE t.Getchar = ' ' DO depchar(t,t.Pos-1,'0');
		 1291					t:- conc(t," ",Image);
		 1292					warning("More ENDs than BEGINs at line:",t);
		 1293					endwarn:= TRUE
E112		 1294				    END ELSE
B113		 1295				    BEGIN   endwarn:= FALSE;
		 1296					margin:= margin - indent;   ind:= ind - 1;
E113		 1297				    END;
		 1298				    scanendcomment:
		 1299				    WHILE More DO
B114		 1300				    BEGIN   display[Pos]:= 5;
		 1301					window:= uppercase[Rank(Inchar)];
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-25
SIMED.SIM	  18-AUG-1978  13:05	

		 1302					IF window = ';' THEN
B115		 1303					BEGIN   endcommentflag:= FALSE;
E115		 1304					GO TO next END ELSE
		 1305					IF window = 'E' THEN
B116		 1306					BEGIN   p:= Pos - 1;    t:- tagord(Image);
		 1307					    tbuf:- tbuf.Main.Sub(1,t.Length);
		 1308					    tbuf:= t;
		 1309					    upcase(tbuf);
		 1310					    IF tbuf = "ND" THEN
B117		 1311					    BEGIN
		 1312						display[Pos-3]:= display[Pos-2]:=
		 1313						display[Pos-1]:= 2;
		 1314						GO TO moreends
E117		 1315					    END;
		 1316					    IF tbuf = "LSE" THEN
B118		 1317					    BEGIN   l4:
		 1318						display[Pos-4]:= display[Pos-3]:= 2;
		 1319						display[Pos-2]:= display[Pos-1]:= 2;
		 1320						endcommentflag:= FALSE;    GO TO next
E118		 1321					    END;
		 1322					    FOR i:= Pos-1 STEP -1 UNTIL p DO
		 1323					    display[i]:= 5;
E116		 1324					END ELSE
		 1325					IF window = 'O' THEN
B119		 1326					BEGIN   p:= Pos - 1;   t:- tagord(Image);
		 1327					    tbuf:- tbuf.Main.Sub(1,t.Length);
		 1328					    tbuf:= t;
		 1329					    upcase(tbuf);
		 1330					    IF tbuf = "THERWISE" THEN
B120		 1331					    BEGIN
		 1332						FOR i:= -9 STEP 1 UNTIL -1 DO
		 1333						display[Pos+i]:= 2;
		 1334						endcommentflag:= FALSE;   GO TO next
E120		 1335					    END;
		 1336					    FOR i:= Pos-1 STEP -1 UNTIL p DO
		 1337					    display[i]:= 5;
E119		 1338					END ELSE
		 1339					IF window = 'W' THEN
B121		 1340					BEGIN   p:= Pos - 1;   t:- tagord(Image);
		 1341					    tbuf:- tbuf.Main.Sub(1,t.Length);
		 1342					    tbuf:= t;
		 1343					    upcase(tbuf);
		 1344					    IF tbuf = "HEN" THEN GO TO l4;
		 1345					    FOR i:= Pos-1 STEP -1 UNTIL p DO
		 1346					    display[i]:= 5;
E121		 1347					END ELSE
		 1348					IF Letter(window) THEN
B122		 1349					BEGIN   p:= Pos - 1;   Setpos(p);   tagord(Image);
		 1350					    FOR i:= Pos-1 STEP -1 UNTIL p DO
		 1351					    display[i]:= 5;
E122		 1352					END OTHER WORD IN *ND-COMMENT
E114		 1353				    END  MORE LOOP;
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-26
SIMED.SIM	  18-AUG-1978  13:05	

		 1354				    endcommentflag:= TRUE;
E110		 1355				END *ND=T ELSE
		 1356				IF (IF window = 'B' THEN tbuf = "BEGIN" ELSE FALSE) THEN
B123		 1357				BEGIN   margin:= margin + indent;
		 1358				    begincount:= begincount + 1;
		 1359				    levelcount:= levelcount + 1;
		 1360				    block:= block + 1;
B124		 1361				    IF block <= 64 THEN BEGIN
E124		 1362				    INSPECT check DO newlevel END ELSE
		 1363				    warning("> 64 nested BEGINs:",Image);
		 1364				    IF ind < 0 THEN
B125		 1365				    BEGIN   ind:= 10000;
E125		 1366				    ma:= ma - indent   END ELSE ind:= ind+1;
E123		 1367				END
		 1368					
E109		 1369			    END RESWD ELSE
B126		 1370			    BEGIN
		 1371				IF t.Length > 2 AND t.Length < 14 THEN
B127		 1372				BEGIN
		 1373				    INSPECT standid DO
B128		 1374				    BEGIN
		 1375					IF window = ' ' THEN
B129		 1376					BEGIN
		 1377					    tbuf:- tbuf.Main.Sub(1,t.Length);   tbuf:= t;
		 1378					    upcase(tbuf);
		 1379					    window:= tbuf.Getchar;
E129		 1380					END;
		 1381					hit:= found(tbuf);
E128		 1382				    END inspect;
		 1383				    IF hit THEN
B130		 1384				    BEGIN
		 1385					IF window = 'S' AND convert[3] NE
		 1386					convert[4] THEN
B131		 1387					BEGIN
		 1388					    IF tbuf = "SIMSET" AND arg[17] == NOTEXT THEN
B132		 1389					    BEGIN   IF level = -1000 THEN level:=
		 1390						levelcount;
		 1391						simsettree:- NEW tree(3);
E132		 1392					    END tbuf = SIMSET ELSE
		 1393					    IF tbuf = "SIMULATION" AND arg[18] == NOTEXT THEN
B133		 1394					    BEGIN   IF level = -1000 THEN level:=
		 1395						levelcount;
		 1396						simulationtree:- NEW tree(4);
		 1397						IF simsettree == NONE THEN
		 1398						simsettree:- NEW tree(3)
E133		 1399					    END tbuf = SIMULATION
E131		 1400					END W = 'S'
E130		 1401				    END STANDID ELSE
B134		 1402				    BEGIN
		 1403					INSPECT simsettree DO hit:= found(tbuf);
		 1404					IF \ hit THEN
		 1405					INSPECT simulationtree DO hit:= found(tbuf);
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-27
SIMED.SIM	  18-AUG-1978  13:05	

E134		 1406				    END TESTING SYSTEM CLASS ID
E127		 1407				END REASONABLE TBUF.LENGTH ELSE
B135		 1408				BEGIN
		 1409				    IF window = ' ' THEN
B136		 1410				    BEGIN
		 1411					tbuf:- tbuf.Main.Sub(1,t.Length);
		 1412					tbuf:= t;   upcase(tbuf);
E136		 1413				    END;
		 1414				    hit:= tbuf = "LN";
E135		 1415				END;
		 1416					
B137		 1417				IF hit THEN BEGIN
		 1418				    FOR i:= Pos-1 STEP -1 UNTIL p DO display[i]:=
E137		 1419				markstandid END ELSE
B138		 1420				BEGIN
		 1421				    FOR i:= Pos-1 STEP -1 UNTIL p DO display[i]:=
		 1422				    markuserid
E138		 1423				END
E126		 1424			    END NOT RESWD
E106		 1425			END SOME LETTER(S) ELSE
		 1426			IF Digit(window) OR window = '&' THEN
B139		 1427			BEGIN   morenum:   display[Pos-1]:= 1;
		 1428			    numericflag:= window = '&';
		 1429			    IF More THEN
B140		 1430			    BEGIN   window:= Inchar;
		 1431				IF window = 'R' OR window = 'r' THEN window:= '0';
		 1432				WHILE (IF More THEN Digit(window) ELSE FALSE) DO
B141		 1433				BEGIN   display[Pos-1]:= 1;
		 1434				    numericflag:= FALSE;   window:= Inchar
E141		 1435				END;
		 1436				IF window = '.' THEN GO TO morenum;
B142		 1437				IF window = '&' THEN BEGIN  numericflag:= TRUE;
E142		 1438				GO TO morenum   END;
		 1439				GO TO
		 1440				IF (window = '+' OR window = '-') AND numericflag THEN
		 1441				morenum ELSE scan;
E140		 1442			    END MORE LOOP
E139		 1443			END DIGIT(S) ELSE
		 1444			IF window = ':' THEN
B143		 1445			BEGIN    display[Pos-1]:= 8;
		 1446			    IF More THEN
B144		 1447			    BEGIN   window:= Inchar;
		 1448				IF (IF window = '-' THEN TRUE ELSE window = '=') THEN
B145	E145	 1449				BEGIN    display[Pos-1]:= 8;   GO TO next   END ELSE
		 1450				GO TO scan;
E144		 1451			    END more;
E143		 1452			END ELSE
		 1453			IF window = '*' THEN display[Pos-1]:= 8 ELSE
		 1454			IF window = '/' THEN display[Pos-1]:= 8 ELSE
		 1455			IF window = '=' THEN display[Pos-1]:= 8 ELSE
		 1456			IF window = '<' THEN display[Pos-1]:= 8 ELSE
		 1457			IF window = '>' THEN display[Pos-1]:= 8 ELSE
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-28
SIMED.SIM	  18-AUG-1978  13:05	

		 1458			IF window = '"' THEN
B146		 1459			BEGIN	 scantext:
		 1460			    window:= ' ';   display[Pos-1]:= 6;
		 1461			    WHILE (IF More THEN window NE '"' ELSE FALSE) DO
B147	E147	 1462			    BEGIN     display[Pos]:= 6;	window:= Inchar   END;
		 1463			    	
		 1464			    IF window NE '"' THEN
B148		 1465			    BEGIN
		 1466				warning("<CR><LF> in text constant:",Image);
		 1467				warning("Type CONTINUE if OK,"
		 1468				" else correct before SIMED processing.",NOTEXT);
		 1469				exit(0);
		 1470				cutflag:= textflag:= TRUE
E148		 1471			    END
		 1472			    ELSE textflag:= FALSE;
		 1473			    	
E146		 1474			END ELSE
		 1475			IF window = ''' THEN
B149		 1476			BEGIN	 display[Pos-1]:= display[Pos]:= 7;
		 1477			    IF \ More THEN
		 1478			    w0: warning("Illegal character constant:",Image) ELSE
B150		 1479			    BEGIN   Setpos(Pos+1);
		 1480				IF \ More THEN GO TO w0;
		 1481				display[Pos]:= 7;
		 1482				window:= Inchar;
		 1483				IF window NE ''' THEN GO TO w0
E150		 1484			    END
E149		 1485			END ELSE
		 1486			IF window = '!' THEN
B151		 1487			BEGIN   scancomment:   p:= Pos;
		 1488			    Setpos(p);   scanto(Image,';');
		 1489			    FOR i:= Pos - 1 STEP -1 UNTIL p DO
		 1490			    display[i]:= 5;
		 1491			    commentflag:= fetchar(Image,Pos-1) NE ';';
		 1492			    IF FALSE THEN
		 1493			    scancomment2:
B152		 1494			    BEGIN
		 1495				textflag:= FALSE;  Setpos(Pos+1);
		 1496				WHILE (IF More THEN window NE ';' OR
		 1497				textflag   ELSE FALSE) DO
B153		 1498				BEGIN   IF window = '"' THEN
B154		 1499				    BEGIN   textflag:= NOT textflag;
		 1500					display[Pos-1]:= 6
E154		 1501				    END ELSE display[Pos-1]:=  IF textflag THEN 6 ELSE 5;
		 1502				    window:= Inchar
E153		 1503				END;
		 1504				commentflag:= window NE ';';
		 1505				display[Pos-1]:=  IF textflag THEN 6 ELSE 5;
E152		 1506			    END scancomment2
E151		 1507			END ELSE
		 1508			IF window = '\' THEN display[Pos-1]:= 8;
		 1509				
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   1-29
SIMED.SIM	  18-AUG-1978  13:05	

E94		 1510		    END BIG LOOP;
		 1511		    	
		 1512		    stop:
		 1513		    t:- prog.Image.Main;
		 1514		    Close;
		 1515		    IF prog == Sysin THEN
B155		 1516		    BEGIN    prog.Open(t);
		 1517			t:- Sysout.Image;   Sysout.Close;   Sysout.Open(t);
		 1518			Sysout.Linesperpage(-1);
E155		 1519		    END;
E58		 1520		END INSPECTING INPUT;
		 1521		IF outf =/= Sysout THEN Close
E57		 1522	    END INSPECTING OUTPUT;
		 1523	
B156		 1524	    IF Pos = 1 THEN BEGIN
		 1525	    Outchar('[');
		 1526	    outname.Setpos(1);   outname:- scanto(outname,'/');
		 1527	    Outtext(outname);
		 1528	    IF outname NE progname THEN
B157	E157	 1529	    BEGIN   Outtext(" <-- ");   Outtext(progname);   END;
		 1530	    Outtext(": ");
E156		 1531	    END;
		 1532	    Outint(begincount,IF begincount < 100 THEN 2 ELSE 4);   Outtext(" BEGIN ");
		 1533	    IF begincount NE endcount THEN
B158	E158	 1534	    BEGIN   Outtext(" ?");   Outint(endcount,4);   Outtext(" END!");   END;
		 1535	    newtime:= cptime;
		 1536	    Outfix(newtime-cputime,2,6);   Outtext(" Sec.");
		 1537	    Outint(lines,5);
		 1538	    IF lines NE linesout THEN
B159		 1539	    BEGIN   Outtext(" In");   Outint(linesout,5);
		 1540		Outtext(" Out]");
E159		 1541	    END ELSE Outtext(" Lines]");
		 1542	    Outimage;
		 1543	    cputime:= newtime;
		 1544	    IF runprog =/= NOTEXT THEN
		 1545	    run(runprog,1);
		 1546	    IF arg[15] =/= NOTEXT THEN run("SYS:COMPIL",2);
		 1547	    IF initcommand =/= NOTEXT THEN
B160	E160	 1548	    BEGIN   exit(0);   initcommand:- NOTEXT   END;
		 1549	    GO TO start;
E5		 1550	END
E1		 1551	END OF PROGRAM


SWITCHES CHANGED FROM DEFAULT:

  -A NO CHECK OF ARRAY INDEX
  -D NO SYMBOL TABLE GENERATED FOR DEBUG
  -I NO LINENUMBER TABLE GENERATED
  -Q NO CHECK OF QUALIFICATION
  -W NO WARNINGS GENERATED

ERRORS DETECTED:
    3 TYPE W MESSAGES
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE    2
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


ARG         	   171D     703      705M     707      709      710      728      760      768M     769   
		   773M     774      778M     779M     781M     782      783      785M     788      789   
		   790M     791      793      814      815      818      822M     823      826      830   
		   838M     839M     840      842M     843M     844      846      847      851      852   
		   853      855      858      869      876M     877      878      880M     881      882   
		   885      891      899      917      918      935     1071     1072     1159     1163   
		  1210     1214     1388     1393     1546   
ARGDEF      	   171D     688      689      690      709      716      717M     718      719      720   
		   722      723M     728      768      794      838      839      842      843   
BEGINCOUNT  	   180D     729     1225     1285     1358M    1532M    1533   
BLANKS      	   660      673      692      719      746      871      874     1108     1128     1141   
		  1142     1227     1287   
BLOCK       	  1092D    1097M    1098     1101M    1102     1103     1104     1278M    1360M    1361   
BLOCKPOS    	  1095D    1098     1102     1103     1104   
BOKSTAV     	   140DE   1253   
BREAKOUTIMAG	   909      927      957     1078   
C           	   175D     800      801M     802M     962D     968      975     1032     1033M    1074   
		  1075M  
CA          	   185D     187      188M     190M     194D     196      197M     198      200M     201   
		   202M  
CASE        	   223D     228M     229      251      269      403      577      639M     640   
CBLANK      	   968     1086D    1152   
CCOMMA      	   968     1086D    1152   
CHAR        	   187      190      196      197      198      200      201      202      673      731   
		   921      926      928      951      956     1069     1075     1167     1221     1222   
CHECK       	  1133D    1135     1257     1277     1362   
CHECKER     	  1093D    1133     1135   
CHECKEXTENSI	   134DE    778      782      868      898   
CLOSE       	   649      651      714      755     1514     1517     1521   
COMMAND     	   171D     725      726      738M     739      743      744      745      760   
COMMENTFLAG 	  1005     1087D    1178     1193     1202     1238     1491     1504   
COMPRESS    	   135DE 
CONC        	   135DE    794      892      900     1111     1121     1128     1230     1291   
CONTFLAG    	   933     1012     1030     1087D    1199   
CONVERT     	   181D     801      807M     808     1045     1046     1048     1145M    1148M    1385   
		  1386   
COPY        	   152      253      271      405      579      611      663      664      665      666   
		   667      668      669      670      671      674      675      676      677      678   
		   679      680      681      682      683      684      685      687      878   
CPTIME      	   142DE   1535   
CPUTIME     	   145D    1536     1543   
CSEMICOLON  	   968     1086D    1152     1252   
CTAB        	   175D     731      968     1009     1025     1033     1183     1196     1251   
CUT         	   975      985      986     1000D  
CUTFLAG     	   933      965     1002     1030     1057     1088D    1199     1470   
CUTPOS      	   970      980      992     1003     1019M    1029     1034M    1039     1041     1092D  
		  1200   
CUT_TEXT    	   965      993      994      997     1002     1013     1015     1058     1066     1087D  
DEBUG       	   182D    1018   
DEFKEY      	   172D     686      703      760   
DEPCHAR     	   136DE    928      943      951     1167     1229     1290   
DETACH      	  1110   
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-1
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


DIGIT       	   801     1426     1432   
DISPLAY     	   973M     981      985      986      987      993     1021     1042     1058     1090D  
		  1188     1233     1271     1300     1312M    1313     1318M    1319M    1323     1333   
		  1337     1346     1351     1418     1421     1427     1433     1445     1449     1453   
		  1454     1455     1456     1457     1460     1462     1476M    1481     1490     1500   
		  1501     1505     1508   
DISPLAYI    	   962D    1042     1043     1045     1046     1048     1051     1055   
DONE        	   995     1036     1083D  
ENDCOMMENTFL	  1087D    1236     1303     1320     1334     1354   
ENDCOUNT    	   180D     729     1279M    1285     1533     1534   
ENDFILE     	   647      694      753     1171     1206   
ENDWARN     	  1089D    1285     1293     1295   
EXIT        	   136DE    654     1469     1548   
FETCHAR     	   137DE    154      234      236M     237      920      956      975     1060     1062   
		  1069     1220     1491   
FINDINFILE  	   139DE    691      747      748M     864   
FINDOUTFILE 	   138DE    894   
FINDTRIGGER 	   137DE 
FOUND       	   232D     241     1265     1381     1403     1405   
FROM        	   134DE    698      794      924      929      952     1161     1168     1215   
GETCHAR     	   159      212      217      745      800      942     1074     1229     1264     1290   
		  1379   
H           	   224D     234      236M     237M     238M     239      242      244M     246      247M  
HELP        	   741D     771   
HELPFILE    	   643D     747      749   
HIT         	  1089D    1265     1268     1269     1381     1383     1403     1404     1405     1414   
		  1417   
I           	   172D     186D     187M     188M     195D     196M     197M     198M     661M     706   
		   707      709M     710      727      728M     729      760      761      763      767   
		   768M     796      797      799      962D     971      975      983      991      992   
		  1001M    1002M    1003     1014M    1020     1041     1042     1091D    1271M    1322   
		  1323     1332     1333     1336     1337     1345     1346     1350     1351     1418M  
		  1421M    1489     1490   
IASHIFT     	   140DE   1188     1233   
IMAGE       	   150      648      650      695      698      746      751      755      874      920   
		   923      924      925M     926      928      929M     944M     947      951      952M  
		   956     1060     1062     1064     1069     1073M    1074     1076M    1079M    1142   
		  1143     1155     1156M    1158     1161M    1167     1168M    1179     1187M    1201   
		  1204     1212     1215M    1217M    1218     1230     1241     1247     1255     1291   
		  1306     1326     1340     1349     1363     1466     1478     1488     1491     1513   
		  1517   
INCHAR      	  1032     1043     1045     1047     1049     1052     1053     1182     1242     1248   
		  1301     1430     1434     1447     1462     1482     1502   
INCR        	   172D     882      883      886      935      938     1154M    1160     1165     1211   
		  1214   
IND         	   179D     730      921M     924M    1004     1023     1191M    1192M    1203     1296M  
		  1364     1365     1366M  
INDE        	   179D     730     1004     1008     1009M    1010     1023     1024     1025M    1026   
		  1192     1195     1196M    1197   
INDENT      	   178D     730      824      826      827M     828M     831      834M     836M     861M  
		  1296     1357     1366   
INFILE      	   139      176      643   
INIMAGE     	   150      693      712      752      754      871     1204   
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-2
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


INITCOMMAND 	   144D     152      153      154      155      156M     157M     158      159      160M  
		   161      163M     724      725     1547     1548   
INITLOWERCAS	   194D     734   
INITUPPERCAS	   185D     734   
INL         	   645D     646      651      738      743      867      897   
INLINE      	   135DE    646   
J           	   172D     796      797M     801      805      807M     808      810      962D     970   
		   973M     976M     980      981      985      986      987M    1019     1021M    1029   
		  1041     1058     1060     1062   
K           	   962D     992      993   
KEY         	   171D     663      664      665      666      667      668      669      670      671   
		   673M     674      675      676      677      678      679      680      681      682   
		   683      684      685      703      760      763   
L           	  1094D    1113     1114     1116   
L4          	  1317D    1344   
LASTITEM    	  1156   
LEFTSKIP    	   177D     834     1177   
LEFTSKIPPED 	  1184     1186D  
LENGTH      	   154      211M     215M     235      237M     718      746      794M     966     1014   
		  1020     1029     1077     1121     1127M    1129M    1177     1187     1188     1256   
		  1259M    1262     1307     1327     1341     1371M    1377     1411   
LETTER      	  1348   
LEVEL       	  1092D    1153     1281     1282     1389M    1394M  
LEVELCOUNT  	  1092D    1225     1226     1280M    1281     1359M    1390     1395   
LINENO      	   172D     729      933      934      936      937M     938      939      940      945   
		   949     1158     1159     1160     1165M    1211     1212     1213M    1227     1288   
LINES       	   145D     730      957M    1078M    1205M    1222M    1227     1288     1537     1538   
LINESOUT    	   145D     729      932M     958M    1538     1539   
LINESPERPAGE	   167      652     1518   
LONGCHECK   	   177D     842     1135     1256   
LONGID      	  1094D    1102     1105     1108     1109     1112     1113     1116M    1123     1127   
		  1128M    1129M  
LOWERCASE   	   183D     734     1049     1052   
MA          	   178D     730      861     1191     1203     1366M  
MAIN        	   925      944     1079     1115     1125     1168     1262     1307     1327     1341   
		  1377     1411     1513   
MAINIMAGE   	  1086D    1155     1204     1220   
MARGIN      	   178D     730      737      861     1191     1203     1296M    1357M  
MARKCHAR    	  1091D    1139   
MARKCOMMENT 	  1091D    1138   
MARKNUMERIC 	  1092D    1136   
MARKRESWD   	  1091D    1136   
MARKSINGLE  	  1092D    1139   
MARKSTANDID 	  1091D    1137     1419   
MARKTEXT    	  1091D    1138   
MARKUSERID  	  1092D    1137     1422   
MAXHITS     	   230D     242      243      638   
MAXINDENT   	   179D     835      836M    1192   
MESSAGE     	   206D     211      212M     213   
MOD         	   238      921      924     1192   
MORE        	   158      212      217      700      878     1031     1174     1181     1248     1299   
		  1429     1432     1446     1461     1477     1480     1496   
MOREENDS    	  1276D    1314   
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-3
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


MORENUM     	  1427D    1436     1438     1441   
NEWEND      	  1100D    1277   
NEWLEVEL    	  1096D    1362   
NEWTIME     	   145D    1535     1536     1543   
NEXT        	  1109D    1123     1130     1172D    1248     1304     1320     1334     1449   
NKEYS       	   145D     146      171      703      706      727      760      767   
NUM         	   177D     872      891      899      918     1072     1157     1163     1207     1208   
		  1220     1227     1288   
NUMBERED    	   140DE    695      872     1207   
NUMERICFLAG 	  1088D    1428     1434     1437     1440   
NUMFIELD    	   171D     940      941      942      943M    1143   
OLDCOMMENTFL	  1005     1088D    1178     1193     1202   
OLDDISPLAY  	   962D     981      986      987     1051     1055   
OLDLINE     	   172D     729      933      934      936      949     1211     1213   
OLDTEXT     	   964     1001     1013M    1030     1040     1066     1089D    1177     1203   
OPEN        	   649      651      692      751      871     1141     1516     1517   
OUTCHAR     	   212      217      904      909     1009     1025     1040     1043     1045     1047   
		  1049     1051     1065     1067     1196     1222     1525   
OUTF        	   176D     893      894      902      911      920      923      924      925M     926M  
		   928      929M     944M     947      951      952M     956      966      970      971   
		   980      983      991      994      995     1010M    1026M    1064     1069M    1073M  
		  1074     1076M    1077M    1079M    1141M    1143     1167     1168M    1197M    1521   
OUTFILE     	   138      176   
OUTFIX      	  1536   
OUTIM       	   916D    1022     1036     1072     1081     1223   
OUTIMAGE    	   168      209      220      654      742      754      757      765      776      811   
		   819      830      849      859      866      886      896      950      958     1542   
OUTINT      	   810     1021     1532     1534     1537     1539   
OUTLENGTH   	   179D     814      815      816M     820      828      835      966      970      971   
		   980      983      991     1141     1142     1166M  
OUTNAME     	   177D     783      869      889      892M     894      896      897      898M     900M  
		   905M     906      907     1526M    1527     1528   
OUTTEXT     	   168      210      213      218      219      654      741      757      762      763   
		   764      775      809      810      817      818M     829      830M     848      857   
		   858M     865      866      884      885M     895      896      906      908M    1527   
		  1529M    1530     1532     1534M    1536     1539     1540     1541   
P           	  1091D    1094D    1098     1103     1104     1105     1109     1113     1114     1123   
		  1127     1129M    1186     1187     1188     1254     1271     1306     1322     1326   
		  1336     1340     1345     1349M    1350     1418     1421     1487     1488     1489   
POS         	   160      209      701      797      799      943      966      970      971      980   
		   983      991      994     1003     1010     1026     1069     1073     1077M    1109   
		  1186     1187     1197     1229     1254M    1271     1290     1300     1306     1312M  
		  1313     1318M    1319M    1322     1326     1333     1336     1340     1345     1349   
		  1350     1418     1421     1427     1433     1445     1449     1453     1454     1455   
		  1456     1457     1460     1462     1476M    1479     1481     1487     1489     1491   
		  1495     1500     1501     1505     1508     1524   
PRINTLINE   	   961D     995     1003     1014     1201   
PROG        	   176D     864M     871M     874      913     1513     1515     1516   
PROGLENGTH  	   178D     731      871      874     1090   
PROGNAME    	   177D     780      863      864      866      867      868M     869      907      908   
		  1528     1529   
PUTCHAR     	   673      926   
PUTINT      	   940     1227     1288   
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-4
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


RANK        	   234      236M     237      732      801M    1047     1049     1052     1053     1301   
RESCAN      	   140DE    148   
REST        	   134DE    152      702      878     1118   
RESTORE     	  1204D    1223   
RESUME      	  1257   
RESWDTREE   	   173D    1144     1146     1147     1261   
RUN         	   136DE   1545     1546   
RUNPROG     	   177D     846      847     1544     1545   
S           	   648MD    649      650      651     1094D    1116     1118     1122   
SCAN        	   141DE    703      760     1245D    1441     1450   
SCANCOMMENT 	  1238     1272     1487D  
SCANCOMMENT2	  1273     1493D  
SCANENDCOMME	  1236     1298D  
SCANINT     	   141DE    815      826      855      882     1158     1212   
SCANTEXT    	  1237     1459D  
SCANTO      	   135DE    151      156M     157      699      877      905     1116     1488     1526   
SEARCH      	   141DE   1113   
SETPOS      	   161      701      905      909      926      941      995     1010     1019     1026   
		  1039     1105     1112     1116     1117     1123     1129     1179     1197     1228   
		  1254     1289     1349     1479     1488     1495     1526   
SIGN        	   828      834      861   
SIMSETTREE  	   173D     784      851     1283     1391     1397     1398     1403   
SIMULATIONTR	   173D     787      852     1283     1396     1405   
SKIP        	   134DE   1179     1241     1247   
SKIPPED     	  1033     1037D  
STANDID     	   173D    1149M    1150     1373   
START       	   726D     744      745      755      758      765      776     1549   
STOP        	  1206     1512D  
STORBOKSTAV 	   135DE   1111   
STRIP       	   150      163      214      773      779     1156     1217   
SUB         	   160      261      262      263      264      265      266      267      337      338   
		   339      340      341      342      343      344      345      346      347      348   
		   349      350      351      352      353      354      355      356      357      358   
		   359      360      361      362      363      364      365      366      367      368   
		   369      370      371      372      373      374      375      376      377      378   
		   379      380      381      382      383      384      385      386      387      388   
		   389      390      391      392      393      394      395      396      397      398   
		   399      400      401      491      492      493      494      495      496      497   
		   498      499      500      501      502      503      504      505      506      507   
		   508      509      510      511      512      513      514      515      516      517   
		   518      519      520      521      522      523      524      525      526      527   
		   528      529      530      531      532      533      534      535      536      537   
		   538      539      540      541      542      543      544      545      546      547   
		   548      549      550      551      552      553      554      555      556      557   
		   558      559      560      561      562      563      564      565      566      567   
		   568      569      570      571      572      573      574      575      594      595   
		   596      597      598      599      600      601      602      603      604      605   
		   606      607      624      625      626      627      628      629      630      631   
		   632      633      634      635      688      689      690      695     1003     1014   
		  1073     1076     1102     1111     1113     1121M    1129     1143     1187     1262   
		  1307     1327     1341     1377     1411   
SYSIN       	   150      646      647      648      649M     874M    1515   
SYSOUT      	   650      651M     652      746M     751      902      909     1141     1142     1517M  
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-5
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


		  1518     1521   
T           	   144D     150      151      152      154M     206D     214M     215      217M     219   
		   232D     234      235      236M     237M     242      244M     246      247M     645D  
		   646      653      687      688      689      690      695      696      698      699   
		   700      701M     702M     703      719M     720      793      794M     795      797   
		   799      800      877M     878M     961D     966      975      995      998     1003   
		  1014M    1020     1029     1086D    1111     1121M    1226D    1227M    1228     1229M  
		  1230M    1231     1255     1256     1259M    1262M    1286D    1287     1288     1289   
		  1290M    1291M    1292     1306     1307     1308     1326     1327     1328     1340   
		  1341     1342     1371M    1377M    1411     1412     1513     1516     1517M  
TABS        	   182D     838      921      924     1007     1024     1195   
TAGORD      	   135DE   1255     1306     1326     1340     1349   
TBUF        	   171D     660     1262M    1263     1264     1265     1272     1273     1274     1307M  
		  1308     1309     1310     1316     1327M    1328     1329     1330     1341M    1342   
		  1343     1344     1356     1377M    1378     1379     1381     1388     1393     1403   
		  1405     1411M    1412M    1414   
TEXTFLAG    	   965     1002     1057     1088D    1199     1203     1237     1470     1472     1495   
		  1497     1499M    1501     1505   
TL          	   962D     964      965M     966      971      983   
TMAIN       	   224D     253      261      262      263      264      265      266      267      271   
		   337      338      339      340      341      342      343      344      345      346   
		   347      348      349      350      351      352      353      354      355      356   
		   357      358      359      360      361      362      363      364      365      366   
		   367      368      369      370      371      372      373      374      375      376   
		   377      378      379      380      381      382      383      384      385      386   
		   387      388      389      390      391      392      393      394      395      396   
		   397      398      399      400      401      405      491      492      493      494   
		   495      496      497      498      499      500      501      502      503      504   
		   505      506      507      508      509      510      511      512      513      514   
		   515      516      517      518      519      520      521      522      523      524   
		   525      526      527      528      529      530      531      532      533      534   
		   535      536      537      538      539      540      541      542      543      544   
		   545      546      547      548      549      550      551      552      553      554   
		   555      556      557      558      559      560      561      562      563      564   
		   565      566      567      568      569      570      571      572      573      574   
		   575      579      594      595      596      597      598      599      600      601   
		   602      603      604      605      606      607      611      624      625      626   
		   627      628      629      630      631      632      633      634      635   
TMPIN       	   135DE    155   
TREE        	   173      174      223D     661      786      788     1391     1396     1398   
TREEARR     	   174D     661     1146     1147     1149   
TSUB        	   135DE 
U           	  1094D    1111     1113     1115M    1117     1118     1125M    1127     1129M  
UPCASE      	   134DE    695      795     1263     1309     1329     1343     1378     1412   
UPPERCASE   	   183D     732      734     1047     1053     1301   
W0          	  1478D    1480     1483   
WARN        	  1119D  
WARNED      	   945      946     1089D  
WARNING     	   206D     947      998     1064     1120     1231     1292     1363     1466     1467   
		  1478   
WINDOW      	  1086D    1182     1183M    1242     1246     1248     1251     1252     1253     1258   
		  1264     1301     1302     1305     1325     1339     1348     1356     1375     1379   
		  1385     1409     1426M    1428     1430     1431M    1432     1434     1436     1437   
DECsystem-10 SIMULA  %4A(310)               18-AUG-1978  13:07				 PAGE   2-6
SIMED.SIM	  18-AUG-1978  13:05		CROSS REFERENCE TABLE


		  1440M    1444     1447     1448M    1453     1454     1455     1456     1457     1458   
		  1460     1461     1462     1464     1475     1482     1483     1486     1496     1498   
		  1502     1504     1508   
WORD        	   228D     239      242      244M     246      247M     261      262      263      264   
		   265      266      267      337      338      339      340      341      342      343   
		   344      345      346      347      348      349      350      351      352      353   
		   354      355      356      357      358      359      360      361      362      363   
		   364      365      366      367      368      369      370      371      372      373   
		   374      375      376      377      378      379      380      381      382      383   
		   384      385      386      387      388      389      390      391      392      393   
		   394      395      396      397      398      399      400      401      491      492   
		   493      494      495      496      497      498      499      500      501      502   
		   503      504      505      506      507      508      509      510      511      512   
		   513      514      515      516      517      518      519      520      521      522   
		   523      524      525      526      527      528      529      530      531      532   
		   533      534      535      536      537      538      539      540      541      542   
		   543      544      545      546      547      548      549      550      551      552   
		   553      554      555      556      557      558      559      560      561      562   
		   563      564      565      566      567      568      569      570      571      572   
		   573      574      575      594      595      596      597      598      599      600   
		   601      602      603      604      605      606      607      624      625      626   
		   627      628      629      630      631      632      633      634      635   
ZUPPRESS    	   180D     855      856      859      861