==== imp/makep3_gen.txt ====
offer p3gens
parm nocheck
edit perq3gen02s,p3gens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes5>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs2>
e
imp p3gens,.null
offer p3gens,ercs01

==== imp/opt04s.txt ====
!
! 25Sep90   Correction to base adjust array in ctop which was wrong
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare

==== imp/makep3_p1.txt ====
edit poneb01s,p3p1s
i<itrimp_perq3poneas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
m/%constlonglongreal/
(a/r'/a16d/'/i/'/)154
e
imp p3p1s,.null
offer p3p1s,ercs01

==== imp/makep3_p2.txt ====
edit timp02s,p3p2s
i<itrimp_perq3ptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
e
imp p3p2s,.null
offer p3p2s,ercs01

==== imp/makep3_opt.txt ====
edit opt03s,p3pos
i<itrimp_perq3optas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
a'
d1i<tripcnsts>
e
imp p3pos,.null
offer p3pos,ercs01

==== imp/make88k_gen5.txt ====
parm nocheck
edit drsgen05s,dgens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes28>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs5>
ta/host=/r6i/DRS/
e
imp dgens,.null
transfer dgens,castle(ercc07,pete)impdir/sources/d386p4s10.i,file

==== imp/make88k_p1.txt ====
edit poneb02s,m88p102s
i<itrimp_m88kponeas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
m/%constlonglongreal/
ta/host=/i/PERQ3
/d
1e
imp m88p102s,m88p1y
permit m88p102s

==== imp/make88k_p2.txt ====
edit timp06s,m88p206s
i<itrimp_m88kptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
ta/host=/i/PERQ3
/d1
e
imp m88p206s,y
permit m88p206s


==== imp/make88k_p3.txt ====
edit opt04s,m88p305s
i<itrimp_M88Koptas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
a'
d1i<tripcnsts>
e
imp m88p305s,.null
permit m88p305s

==== imp/make88k_p4.txt ====
parm nocheck
edit m88kp405s,m88p419s
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes28>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
ta/host=/r6i/Perq3/
e
imp m88p419s,.null
permit m88p419s

==== imp/makeoptimp.txt ====
parm opt,maxdict,nolist
imp ercc07:itrimp_ibmponeas+ercc07:poneb02s,ip1ox,l0
imp ercc07:itrimp_ibmptwoas+timp03s,ip23ox,l1
imp ercc07:itrimp_ibmoptas+opt03s,iopt3ox,l2
imp cserv01s,cserv01ox,l4
imp ibmgen05s,igen5ox,l5
parm map
LINK
IP1oX
IP23oX
IOPT3oX
IGEN5oX
CSERV01oX
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS

==== ercc04_emas-a ====
ftp> ls
200 PORT Command OK (129.215.16.14 129.75 (33099))
150 Data connection opened
-rw-------  41776 ercc08_ercc04 archive          8192 Sep 30  1991 bob
-rw-------  10608 ercc08_ercc04 archive         16384 Jun 23  1988 e3b
-rw-------  37396 ercc08_ercc04 archive        143360 Dec  1  1990 editl
-rw-------  10204 ercc08_ercc04 archive         86016 Jun 16  1988 edwin7
-rw-------   7216 ercc08_ercc04 archive        344064 Jun 16  1988 edwins2900
-rw-------  34988 ercc08_ercc04 archive         77824 Aug 25  1990 emas3specs
-r--------  16552 ercc08_ercc04 archive         77824 Jun 23  1988 emas3specs[1]
drwx------  17908 ercc08_ercc04 ercc08_ercc04         10 Aug 25  1990 ercc63
-rw-------  34360 ercc08_ercc04 archive         61440 Aug 25  1990 fonts
-rw-------  32608 ercc08_ercc04 archive          8192 Aug 25  1990 heaps
drwx------  46128 ercc08_ercc04 ercc08_ercc04          1 Sep 30  1991 imptoc
drwx------  41876 ercc08_ercc04 ercc08_ercc04         49 Jul  1  1992 kanji
-rw-------  37500 ercc08_ercc04 archive          8192 Dec  1  1990 lexicon
-rw-------  53180 ercc08_ercc04 archive        385024 Jul  1  1992 mail6l
-rw-------  52764 ercc08_ercc04 archive        368640 Jul  1  1992 mail7l
-rw-------   6092 ercc08_ercc04 archive         45056 May 19  1988 mail85
-rw-------   5988 ercc08_ercc04 archive        335872 May 19  1988 mail86
-rw-------   6196 ercc08_ercc04 archive        958464 May 19  1988 mail87

==== ercc04_emas-2900 ====
ftp> ls
200 PORT Command OK (129.215.16.14 129.155 (33179))
150 Data connection opened
-rw-------  12532 ercc08_ercc04 archive         36864 May 16  1983 a
-rw-------  29968 ercc08_ercc04 archive         20480 Jan 20  1981 acr5
-rw-------  29240 ercc08_ercc04 archive          8192 Feb 18  1981 acrs
-rw-------  25280 ercc08_ercc04 archive        315392 Jul 27  1981 agss
-r--------  23296 ercc08_ercc04 archive        315392 Sep  3  1981 agss[2]
-r--------  22028 ercc08_ercc04 archive        315392 Jan  6  1982 agss[1]
-rw-------  25908 ercc08_ercc04 archive         49152 Jul  1  1981 allsorts
-rw-------  26016 ercc08_ercc04 archive        135168 Jun 29  1981 allviewlogs
-r--------  24756 ercc08_ercc04 archive        167936 Aug 10  1981 allviewlogs[1]
-rw-------  28716 ercc08_ercc04 archive          8192 Mar 23  1981 autofile
-rw-------   5516 ercc08_ercc04 archive        249856 Mar  1  1985 b01conn
-rw-------   5408 ercc08_ercc04 archive        315392 Mar  1  1985 b02direct
-rw-------   5304 ercc08_ercc04 archive         81920 Mar  1  1985 b07ss
-rw-------  37196 ercc08_ercc04 archive         12288 Jun  3  1980 bad
-rw-------  16628 ercc08_ercc04 archive         24576 Oct 13  1982 bads
-rw-------  16524 ercc08_ercc04 archive         24576 Oct 13  1982 bady
-rw-------  32336 ercc08_ercc04 archive         12288 Oct 28  1980 bits
-rw-------  24652 ercc08_ercc04 archive         28672 Aug 10  1981 bobpd

==== ecmi01/robot52.txt ====
.pg 5.2 A practical example: CONSIGHT-1
The CONSIGHT-1 [6] system was developed by General Motors as a vision system
to permit some of their robots to cope with 2.5-D parts arriving at the
robot's work cell on a conveyor belt, at random intervals and in random
orientations. The essential ingredients are a linear array camera looking down
onto the conveyor belt, viewing a slice across the belt, and two light
projectors each projecting a plane of light. The two planes of light and the
viewing plane of the camera all intersect at the surface of the belt, in a
line across the belt. The side view of the arrangement therefore looks like
this: .sp 16 .br Normally, when there is nothing on the belt, the camera sees
the line of light caused by the two projectors. When an object approaches,
just before it reaches the 'viewing line', it obstructs one of the planes of
light but not both, so that the camera still sees a line of light straight
across the belt. When the object is crossing the 'viewing line', it prevents
both of the planes of light from reaching the surface of the belt, and so the
camera only sees part of a line of light across the belt. The dark portion of
the line is the width of the object there: 
.nf

     
     

==== ecmi01/robot53.txt ====
.pg 5.3 2-D grey level vision: the GM chip spotter
Silhouette vision, while simple, is not very useful. It requires reasonable
lighting, and the interior of the image of objects offers no information.
Grey level images, in which each pixel's value is a grey level typically in 
the range 0-15 or 0-255 rather than merely 0 or 1, carry vastly more 
information. Methods of processing such images are described in [5]; they are 
correspondingly more sophisticated than those for silhouettes. This section 
describes one practical application, the General Motors 'chip spotter'. It has 
various idiosyncratic features, but then most practical vision systems do!
.ti 4
This particular vision system was devised for the task of automatically 
inspecting integrated circuit chips mounted on a heat sink. The inspection has 
two purposes - the first is to detect chips with certain mechanical
manufacturing faults so that they can be rejected rapidly, the second is to 
find the orientation of the chip on the heat sink so that automatic test
equipment can be correctly lowered onto it. The chip and heat sink forms 
part of the high energy ignition system on all General Motors cars.
.nf

   
   

==== ecmi01/robot54.txt ====
.pg 5.4 3-D visual processing
Three dimensional perception would clearly be very useful to a robot - for 
instance, it would then be possible for it to tell whether parts were properly 
aligned with each other before trying to fit them together. There are 
essentially two ways of acquiring the range information on which to base 3-D 
vision. The first is by measuring the time of flight of some kind of wave, 
sound or light or radar, from a known transmitting point reflected to a known 
receiving point. Various problems make this unsuitable for robotics, 
unfortunately:
.nf
a) if the transmitted wave spreads it is hard to be sure where the reflection 
   is coming from; if it does not spread then it is necessary to scan the
   transmitted wave over the scene, and this takes time to do
b) sound travels at around 330 m/s in air. Awaiting the refelction from a n o
   object only 1.5m away wastes around 0.01 secs, so that the time needed to
   build an adequate image is uneconomically large
c) light and other elctromagnetic radiation travels at nearly 300,000,000 m/s
   in air. It would therefore be necessary to be able to measure a time
   difference of only 0.00000001 secs in order to be able to detect the re
   reflection, and considerably smaller times in order to be able to calculate
   the range with any accuracy. While this might be technologically feasible,

==== ecmi01/ecmu05_check.txt ====

check:-
recorded(Sentence,verb(Person,Number,Tense,

==== ecmi01/oldai2_findall.txt ====
findall(X,P,L) :-
         asserta(found([])),
         call(P),
         rec(X),
         fail.
findall(X,P,L) :-
         retract(found(L)),!.

rec(X) :-
         retract(found(L)),!,
         append(L,[X],L1),
         asserta(found(L1)).

append([],X,X).
append([X|L1],L2,[X|L3]) :- append(L1,L2,L3).

==== ecmi01/oldai2_queens.txt ====
/* NON-ATTACKING QUEENS.
   Peter Ross 24 Nov 81.

   This generates solutions to the problem of placing N queens on an NxN
   board so that none attacks any other. To use, call queens(N) and it
   will print out a board with queens represented by 'Q'.
   Note: no solutions for N=2,3.
         speed of solution drops rapidly as you increase N - N=8 may
         cause you a ten-minute wait!

   Meta-level ideas: represent a position of a queen as p(r,c) meaning
         a queen in row r, column c. Then a solution will be represented
         as N of these with no r occuring twice (queens can't be on the
         same row) and no c occuring twice (queens can't be on the same
         column). THEREFORE we can order the solution, say by taking the
         rows in descending order (i.e. from N to 1). The c's will just
         be some permutation of 1 to N. So, tasks are (taking, say, N=4):
           a) form the rows set [4,3,2,1]
           b) form a permutation of it, e.g. [3,1,4,2]
           c) construct a position from this, viz.
                 [p(4,3),p(3,1),p(2,4),p(1,2)]

==== ecmi01/queens.txt ====
/* NON-ATTACKING QUEENS.
   Peter Ross 24 Nov 81.

   This generates solutions to the problem of placing N queens on an NxN
   board so that none attacks any other. To use, call queens(N) and it
   will print out a board with queens represented by 'Q'.
   Note: no solutions for N=2,3.
         speed of solution drops rapidly as you increase N - N=8 may
         cause you a ten-minute wait!

   Meta-level ideas: represent a position of a queen as p(r,c) meaning
         a queen in row r, column c. Then a solution will be represented
         as N of these with no r occuring twice (queens can't be on the
         same row) and no c occuring twice (queens can't be on the same
         column). THEREFORE we can order the solution, say by taking the
         rows in descending order (i.e. from N to 1). The c's will just
         be some permutation of 1 to N. So, tasks are (taking, say, N=4):
           a) form the rows set [4,3,2,1]
           b) form a permutation of it, e.g. [3,1,4,2]
           c) construct a position from this, viz.
                 [p(4,3),p(3,1),p(2,4),p(1,2)]

==== ecmi01/ff_main.txt ====
% File: ECMI01.FF_MAIN
% Author: Peter Hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: FAULFINDER's top level

% Top level, after using ffload/1 from 'load' to set up a database, is
% find_fault/0.

find_fault :-
	initialise,
	prompt(Old, '..? '),
	writef('The system will ask you some questions about your problem.\l'),
	explain_replies,
	nl, nl,
	top_fault(Name),
	find_out(Name, State, [find_fault]),
	describe(Name, State).
find_fault :-
        \+ top_fault(_),
        writef('You haven''t read in a specific description file, sunshine.\l'),
        writef('Use ffload(File) to read one (e.g. ecmi01.ff_gasheater).\l').

==== ecmi01/lisp.txt ====
%begin
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
!*-%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
%const %integer initmode = 1
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecmi01/newsys.txt ====
                              UNIX on the VAX-11/750
                              ----------------------

The new UNIX system has some significant differences from the old one. Your best
course would be to look at (a) this document (b) the online documentation for
the commands 'man', 'more', 'apropos' and 'whatis' in that order. The list below
shows which commands are new or changed; a few new commands aren't mentioned,
either because they are too esoteric or because they are useless without extra
hardware (such as networking). A '+' in the left-hand column indicates that the
command is NEW.

The information below is the best that was available before the software 
is available on our VAX - so don't treat it as definitive. 

The control characters should be as before, viz. control-Z for end-of-file,
control-C to interrupt. The character for stopping a job (something which
didn't exist on the old UNIX) is control-X, not control-Z as the documentation
will tell you. The documentation about the whole system, when it arrives, will
actually be correct apart from the business of control-key functions - these
will be changed to what we are more accustomed to (i.e. as above).


==== ecmi01/rselong.txt ====
  RESEARCH INTO THE CONSTRUCTION AND APPLICATION OF INTELLIGENT KNOWLEDGE
                  BASED SYSTEMS THAT AID COMPUTER USERS

                            Dr. Peter Ross,
                  Department of Artificial Intelligence,
                        University of Edinburgh.
   
INTRODUCTION

   Intelligent knowledge-based (IKB) systems, sometimes referred to as 'expert
systems', are computer programs or sets of programs which contain explicit
knowledge concerning some particular area of human expertise, organised in
such a way that they can function as an expert consultant in that area. Some
existing examples are MECHO (which solves problems in mechanics - [Bundy79]),
MYCIN (which diagnoses bacterial infections - [Shortliffe76]), MOLGEN (which
designs molecular genetic experiments - [Stefik81]) and EL (which analyses
analogue electric circuits [Stallman77]). They contain the factual knowledge
of their subject as sets of rules - for example, one of MYCIN's rules is

   If (a) the infection is primary-bacteremia, and
      (b) the site of the culture is one of the sterile sites, and

==== ecmi01/random.txt ====
/* Simple random number generator.
   Good for numbers in some range less than 100,000 long.
   Called thus:
	random(X, Lower, Upper)
   where Lower and Upper must be instantiated to integers,
   and X must be uninstantiated. Instantiates X to an integer
   in the range    Lower ... Upper-1.

   Cobbled up by Peter Ross, 3 May 1983
*/
seed(27134, 9213, 17773).

getrand(X) :-   seed(A,B,C),
                A1 is (A*171) mod 30269,
                B1 is (B*170) mod 30307,
                C1 is (C*172) mod 30323,
		retract(seed(A,B,C)),
		asserta(seed(A1,B1,C1)),
		X is (7*A + 11*B + 13*C) mod 100000.

random(X,Lower,Upper) :-  (nonvar(X); var(Lower); var(Upper); Upper =< Lower),

==== ecmi01/findall.txt ====
findall(X,P,L) :-
         asserta(found([])),
         call(P),
         rec(X),
         fail.
findall(X,P,L) :-
         retract(found(L)),!.

rec(X) :-
         retract(found(L)),!,
         append(L,[X],L1),
         asserta(found(L1)).

append([],X,X).
append([X|L1],L2,[X|L3]) :- append(L1,L2,L3).

==== ecmi01/diff.txt ====
:- op(700,xfx,:).
:- op(200,xfy,@).

go :- write('Want instructions? Type y or n and press return...'), nl,
      prompt(Old,'y/n? '),
      get(C), skip(10),
      tellall(C),
      prompt(Yn,'diff: '),
      dv.

tellall(C) :- (C=89;C=121),
         emas(ty,'ecmi01.ai2_diffnotes').
tellall(C).
dv :- repeat, read(T), (T=stop; derive(T), fail).

derive(T:X) :- T : X, !.

X : [U] :- X : U.
X : [U|V] :- d(X,U,W), simplify(W,Z), Z : [V].
X : Y :- d(X,Y,W), simplify(W,Z), nl, output(Z), nl, nl.


==== ecmi01/oldai2_grtrans.txt ====
expr(Z,S0,S) :- term(Z,S0,S).
expr(Z,S0,S) :- term(X,S0,S1),c(S1,43,S2),expr(Y,S2,S),Z is X+Y.
expr(Z,S0,S) :- term(X,S0,S1),c(S1,45,S2),expr(Y,S2,S),Z is X-Y.

term(Z,S0,S) :- number(Z,S0,S).
term(Z,S0,S) :-
         number(X,S0,S1),c(S1,42,S2),
         write('s2 '),write(S2),nl,
         write('s  '),write(S),nl,
         term(Y,S2,S),
         write('y  '),write(Y),nl,
         write('x  '),write(X),nl,
         integer(X),integer(Y),
         Z is X*Y.
term(Z,S0,S) :- number(X,S0,S1),c(S1,47,S2),term(Y,S2,S),Z is X/Y.

number(X,S0,S) :- c(S0,C,S),48=<C,C=<57,X is C-48.
number(X,S0,S) :- c(S0,43,S1),number(X,S1,S).
number(X,S0,S) :- c(S0,45,S1),number(Y,S1,S),X is -Y.

==== ecmi01/oldai2_stuart.txt ====

/* this file defines various facts about the House of Stuart.        */
/* The various fact declarations in it should be read thus:          */
/*   father(person1,person2).   means person1 is father of person2.  */
/*   mother(   "   ,   "   ).     "      "     " mother "     "   .  */
/* and so on.
   Note that 'ggparent' stands for "great-grand-parent". */

father(robert_II,robert_III).
father(robert_III,james_I).
father(james_I,james_II).
mother(joan_beaufort,james_II).
father(james_II,james_III).
father(james_II,alexander_duke_of_albany).
father(james_II,mary).
                 /* the next two relationships are for historical   */
                 /* convenience. It saves having to clutter things  */
                 /* up with lord_james_hamilton's children ...      */
                 /* Note prolog DOESN'T know what 'ggfather' means. */
ggfather(lord_james_hamilton,matthew_earl_of_lennox).
ggmother(mary,matthew_earl_of_lennox).

==== ecmi01/ai2_scons.txt ====
/* This file defines three useful predicates:
         retractall(X)   which retracts all clauses beginning with
                         X, e.g. retractall(fry(_)) will retract
                         the clause fry(fish) and the clause
                         fry(X) :- (fishy(X);vegatable(X)).
         scons(File)     which consults the file File, but doesn't
                         print extra information on your terminal
                         (scons = Silent CONSult)
         srecons(File)   which does the same but reconsults
                         (srecons = Silent RECONSult)
*/

retractall(X) :- retract(X), fail.
retractall(X) :- retract((X:-Y)), fail.
retractall(_).           % this succeeds when the other two have failed
                         % because nothing is left to retract.

scons(File) :-
         seeing(Input),
         see(File),
         repeat,

==== ecmi01/stuart.txt ====

/* this file defines various facts about the House of Stuart.        */
/* The various fact declarations in it should be read thus:          */
/*   father(person1,person2).   means person1 is father of person2.  */
/*   mother(   "   ,   "   ).     "      "     " mother "     "   .  */
/* and so on.
   Note that 'ggparent' stands for "great-grand-parent". */

father(robert_II,robert_III).
father(robert_III,james_I).
father(james_I,james_II).
mother(joan_beaufort,james_II).
father(james_II,james_III).
father(james_II,alexander_duke_of_albany).
father(james_II,mary).
                 /* the next two relationships are for historical   */
                 /* convenience. It saves having to clutter things  */
                 /* up with lord_james_hamilton's children ...      */
                 /* Note prolog DOESN'T know what 'ggfather' means. */
ggfather(lord_james_hamilton,matthew_earl_of_lennox).
ggmother(mary,matthew_earl_of_lennox).

==== ecmi01/ai2_setstuff.txt ====
/* This file defines various handy relationships involving sets.
   Here 'set' actually means 'list', but it sounds better ... */


/* member(H,List). Is H one of the elements of List? */
member(H,[H|_]).                 /* yes, if its the first member!    */
member(H,[_|T]) :- member(H,T).  /* yes, if its in the tail. N.B.    */
                                 /* T will be a list. Note that you  */
                                 /* fail if you get to asking for    */
                                 /* member(H,[]) , since this doesnt */
                                 /* match either clause's head       */

 /* intersect(A,B,I). I is the intersection of A and B */
intersect([H|T],B,[H|U]) :-
                 member(H,B),    /* if the answer's got H in it, then */
                 intersect(T,B,U). /* it must be in B                 */
intersect([_|T],B,U) :-
                 intersect(T,B,U). /* If first clause failed, we can  */
                                   /* ignore the head of first list   */
intersect(_,_,[]).               /* If the second also failed, the    */
                                 /* intersection is empty.            */

==== ecmi01/oldai2_family.txt ====

/* definition of some family relationships */

parent(X,Y) :- mother(X,Y).      /* X is the parent of Y if ... */
parent(X,Y) :- father(X,Y).      /* Or if ...                   */

gparent(X,Y) :-                  /* X is grandparent of Y if    */
         parent(X,A),            /* X is parent of (someone) A, */
         parent(A,Y).            /* and A is parent of Y.       */

ggparent(X,Y) :-         /* X is the great-grandparent of Y if  */
         gparent(X,A),   /* X is the grandparent of (someone) A */
         parent(A,Y).    /* and A is the parent of Y.           */
                         /* N.B. alternative: "X is parent of A */
                         /* and A is gparent of Y". It's the    */
                         /* same thing here - why? If you went  */
                         /* on to define 'gggparent' for use in */
                         /* the "stuart" database, the choice   */
                         /* WOULD matter. Why? look at the file */
                         /* "ai2_stuart" ...                    */


==== ecmi01/family.txt ====

/* definition of some family relationships */

parent(X,Y) :- mother(X,Y).      /* X is the parent of Y if ... */
parent(X,Y) :- father(X,Y).      /* Or if ...                   */

gparent(X,Y) :-                  /* X is grandparent of Y if    */
         parent(X,A),            /* X is parent of (someone) A, */
         parent(A,Y).            /* and A is parent of Y.       */

ggparent(X,Y) :-         /* X is the great-grandparent of Y if  */
         gparent(X,A),   /* X is the grandparent of (someone) A */
         parent(A,Y).    /* and A is the parent of Y.           */
                         /* N.B. alternative: "X is parent of A */
                         /* and A is gparent of Y". It's the    */
                         /* same thing here - why? If you went  */
                         /* on to define 'gggparent' for use in */
                         /* the "stuart" database, the choice   */
                         /* WOULD matter. Why? look at the file */
                         /* "ai2_stuart" ...                    */


==== ecmi01/scunit.txt ====
(*$L #5:SCUNIT.LST.TEXT*)
(*$S+*)
UNIT SCUNIT;
  (*Copyright 1980 Kenneth L. Bowles, All rights reserved. Permission is
    hereby granted to use this material for any non-commercial purpose*)
  
  (*This version includes specific constants for Terak 8510A*)
INTERFACE
TYPE
    SCCHSET = SET OF CHAR;
    SCKEYCOMMAND = (BACKSPACEKEY,ETXKEY,ESCKEY,DELKEY,UPKEY,DOWNKEY,
                                LEFTKEY,RIGHTKEY,NOTLEGAL);
    
VAR
  SCCH:CHAR;

PROCEDURE SCINITIALIZE;
PROCEDURE SCLEFT;
PROCEDURE SCRIGHT;
PROCEDURE SCUP;
PROCEDURE SCDOWN;

==== ecmi01/liza.txt ====
/*   Simple ELIZA
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
     Peter Ross 5-Nov-81
*/

:-(['ecmi25.util_readin']).       % load read_in + necessary support.

/* The top level: call liza (so named 'cos it's a mini-version of ELIZA)
   to get going.
   The predicate read_in reads in sentences, currently ending with a
   full stop, exclamation mark or question mark. Thus
         read_in(X)
   will read in
         hello there.
   as
         X = [hello,there,.]
   NOTE: use lower-case letters at the front of words, this is a simple
   beast!
*/


==== ecmi01/ai2_readin.txt ====
/* Read in a sentence.

   Clearly, when reading in text character by character (using get0),
   it is essential NEVER to backtrack over a get0 goal, otherwise you'd
   have lost the character it read in. Thus, when you get a character,
   you must make sure it gets used. If it can't get used in one context
   (e.g. when constructing a word, and you reach a space) it must be
   passed back to predicates that can use it.
   Thus, for example, readword has three arguments below: the first is
   a character, potentially the first of a word but perhaps a bit of
   interword filling (space or tab), the second is uninstantiated at
   first but will be a word eventually, the third is uninstantiated but
   will finally be instantiated to the character that followed the word
   - i.e. the character that told readword it had reached the end of a
   word.
   Similarly, restsent (which is "higher-level" than readword) has three
   arguments: the first is the word just read, the second is the
   character following that word (which has to be handed forward for the
   reasons explained above) and the third is a variable that will be
   instantiated by restsent to a list consisting of the rest of the 
   sentence. The first argument is necessary in order that restsent can

==== ecmi01/ecmu19_tillities.txt ====


                 /* UTILITIES */
                 /* """"""""" */


printstring([]):-!.
printstring([H|T]):-put(H),printstring(T).

read_in([W|Ws]):-get0(C),readword(C,W,C1),restsent(W,C1,Ws).

  restsent(W,_,[]):-lastword(W),!.
  restsent(W,C,[W1|Ws]):-readword(C,W1,C1),restsent(W1,C1,Ws).

  readword(C,W,C1):-singlec(C),!,name(W,[C]),get0(C1).
  readword(C,W,C2):-in_word(C,NewC),!,get0(C1),restword(C1,Cs,C2),name(W,[NewC|Cs]).
  readword(C,W,C2):-get0(C1),readword(C1,W,C2).

  restword(C,[NewC|Cs],C2):-in_word(C,NewC),!,get0(C1),restword(C1,Cs,C2).
  restword(C,[],C).


==== ecmi01/ks299_doc.txt ====
PRACTICAL EXERCISE: A SIMPLE EXPERT SYSTEM SHELL, WRITTEN IN PROLOG

Peter Ross


1. INTRODUCTION

   This describes how to use a simple expert system shell, and gives a number
   of exercises based on it. The shell is modelled loosely on Teknowledge's
   KS-300 (and so is called ks299, since it's not quite the full shilling).
   The shell can be found in

	UNIX: /u4/peter/prolog/ks299/int
	EMAS: ECMI01.KS299_INT

   Neither version needs any external utilities. A sample knowledge base can
   be found in

	UNIX: /u4/peter/prolog/ks299/wine
	EMAS: ECMI01.KS299_WINE


==== ecmi01/grtrans.txt ====
expr(Z,S0,S) :- term(Z,S0,S).
expr(Z,S0,S) :- term(X,S0,S1),c(S1,43,S2),expr(Y,S2,S),Z is X+Y.
expr(Z,S0,S) :- term(X,S0,S1),c(S1,45,S2),expr(Y,S2,S),Z is X-Y.

term(Z,S0,S) :- number(Z,S0,S).
term(Z,S0,S) :-
         number(X,S0,S1),c(S1,42,S2),
         write('s2 '),write(S2),nl,
         write('s  '),write(S),nl,
         term(Y,S2,S),
         write('y  '),write(Y),nl,
         write('x  '),write(X),nl,
         integer(X),integer(Y),
         Z is X*Y.
term(Z,S0,S) :- number(X,S0,S1),c(S1,47,S2),term(Y,S2,S),Z is X/Y.

number(X,S0,S) :- c(S0,C,S),48=<C,C=<57,X is C-48.
number(X,S0,S) :- c(S0,43,S1),number(X,S1,S).
number(X,S0,S) :- c(S0,45,S1),number(Y,S1,S),X is -Y.

==== ecmi01/useful.txt ====
/* call the editor */

em(File) :-
         (retract(emfile(X));true),
         assert(emfile(File)),
         emas(em,File).

rem(File) :-
         em(File),
         reconsult(File).

em :-    emfile(File),
         emas(em,File).
rem :-   emfile(File),
         emas(em,File),
         reconsult(File).


==== ecmi01/oldai2_simplify.txt ====
/* SIMPLIFY.
   The aim of the predicate simplify is to reshuffle expressions which
   are sums of unknowns (represented by Prolog atoms) and integers so
   that all the unknowns are at the start and the sum of all the
   integers is at the end, e.g.
         x+3+y+4+z      gets reshuffled to      x+y+z+7
   This is (a) useful in mathematical manipulations by computer
   and     (b) an illustration of a useful technique called
               "difference pairs".

   To summarise the idea: a structure such as +(a,+(b,c)) could be
   drawn as
                 +
                / \
               a   +
                  / \
                 b   c

   The idea is that when constructing such things you can represent
   intermediate stages as the "difference" of
                 +

==== ecmi01/ai2_news.txt ====
   Differences between PROLOG version 4 and versions 3 and 2
   ---------------------------------------------------------
There is a new version (version 4) as from 10 February 82 with the following
bugs fixed:
1) The bugs with name and =.. have been fixed.
2) The arithmetic bugs involving negative numbers have been fixed.
3) The debugging has been improved slightly. It is now possible to trace past
   cuts. Cuts are, in fact, now invisible to the tracing - like a few other
   evaluable predicates. Also the system no longer traces various obscure parts
   of the top level that used to appear before.
4) prompt(_,_) will not crash anymore if given a long atom. The atom can be any
   length, but note that the prompt actually used will be a truncated version
   of this if it too long. This seems to be an EMAS limitation. The current max
   length is 15.
5) The system now restores its event and interrupt handlers properly after
   returning from programs called through emas(_) or emas(_,_). This, for one
   thing, allows various editors other than the standard one to be used from
   within PROLOG (they used to mess things up so that you couldn't interrupt
   properly after using them).
6) The interrupt handling system has been improved somewhat, so that there
   should be very few of the "funny crashes". One way to make them happen

==== ecmi01/eec.txt ====
%
% This file contains some facts about countries of the EEC, expressed in Prolog.
% (N.B. there are many other ways of expressing these facts in Prolog - follow
% the lectures!).
%
% The file is accessible to you as ECMI01.AI2_EEC and you can "read it in"
% when you are talking to the Prolog interpreter, by the Prolog command
%       ['ecmi01.ai2_eec'].
% - the square brackets, single quotes and the final full stop all being
% necessary.

               % Written by Peter Ross, 11 October 1982
               

area(belgium,11781).
currency(belgium,franc).
population(belgium,9855).
exports(belgium,['manufactured goods',coal,steel,textiles]).
capital(belgium,brussels).
roads(belgium,11277).
natday(belgium,july,21).

==== ecmi01/ecmu05_project.txt ====
/* the morphology charts */

/* Group 1 nouns */

ending(n1,"a",noun(nom,sing,_,_,_,_)).
ending(n1,"am",noun(acc,sing,_,_,_,_)).
ending(n1,"ae",noun(gen,sing,_,_,_,_)).
ending(n1,"ae",noun(dat,sing,_,_,_,_)).
ending(n1,"a",noun(abl,sing,_,_,_,_)).
ending(n1,"ae",noun(nom,plural,_,_,_,_)).
ending(n1,"as",noun(acc,plural,_,_,_,_)).
ending(n1,"arum",noun(gen,plural,_,_,_,_)).
ending(n1,"is",noun(dat,plural,_,_,_,_)).
ending(n1,"is",noun(abl,plural,_,_,_,_)).


/* Group 2 nouns */

/* type a... */

ending(n2a,"us",noun(nom,sing,_,_,_,_)).

==== ecmi01/ks299_wine.txt ====
% File:    /u4/peter/prolog/ks299/wine
% Author:  Peter Ross
% Updated: 6 Sep 84
% Purpose: a simple knowledge base for the KS299 expert system shell

'What is the overall taste (delicate/average/strong)'
    finds tastiness of meal.

'Is there a sauce (yes/no)'
    finds has_sauce.

'What sort of sauce (spicy/creamy/tomatoey/other)'
    finds sauce of meal.

'What body do you prefer (light/medium/full)'
    finds preferred_body of wine.

'What colour do you prefer (red/white)'
    finds preferred_colour of wine.

'What sweetness do you prefer (dry/medium/sweet)'

==== ecmi01/ai2_recurse.txt ====
/* Some examples of recursion.
 *
 *   member(X,List)  succeeds if X is a member of List
 *   append(L1,L2,Ans)  succeeds if Ans is the concatenation of
 *                      L1 and L2
 *   get_n(L,Ans,N)  succeeds if Ans is the list containing the
 *                   first N elements of L
*/

member(X,[X|L]).
member(X,[_|L]) :- member(X,L).

append([X|L3],L4,[X|Ans1]) :- append(L3,L4,Ans1).
append([],L,L).

get_n([],[],_).
get_n([X|L1],[X|Ans1],N) :-
         N>0,
         N1 is N-1,
         get_n(L1,Ans1,N1).
get_n(_,[],0).

==== ecmi01/rserefs.txt ====


REFERENCES

[Bundy79]       A.Bundy, L.Byrd, G.Luger, C.Mellish and M.Palmer, Solving
                mechanics problems using meta-level inference, in Expert
                Systems in the Micro-electronic Age, ed. D.Michie, Edinburgh
                University Press, 1979

[Hayes-Roth82]  eds. F.Hayes-Roth, D.Waterman and D.B.Lenat, Building Expert
                Systems, to be published in 1982

[Shortliffe76]  E.H.Shortliffe, Computer-based medical consultations: MYCIN,
                New York: American Elsevier, 1976

[Stallman77]    R.M.Stallman and G.J.Sussman, Forward reasoning and
                dependency-directed backtracking in a system for computer-
                aided circuit analysis, Artificial Intelligence, 9, pp. 135-
                196, 1977

[Stefik81]      M.J.Stefik, Planning with constraints, Artificial Intelligence,

==== ecmi01/ai2_ineq.txt ====
/* definition of equality/inequality */

eq(X,X).

ineq(X,X) :- !, fail.
ineq(X,Y).

==== ecmi01/unixgive.txt ====
/*      UNIX support routines for file transfer

	Support routines for microcomputer file transfer between
	UNIX and UCSD (TTY program)

	Ann Macintosh  August 1980

	Give file protocol
		* is the escape character
		*B indicates beginning of file
		*E indicates end of file
		*C indicates a '*' char within the file
		** indicates abnormal termination            */


#include <stdio.h>
#include <sgtty.h>
#include <signal.h>

#define GTTY TIOCGETA
#define STTY TIOCSETA

==== ecmi01/ccall.txt ====
I've talked to Geoff Millard briefly about C on EMAS in the future.
We'll be very interested in using a C compiler to port some AI stuff
onto EMAS 3, for teaching. He said you would be interested in a list of
the library routines and standard macros that C-Prolog uses, because
the question of what library routines to provide is still open. Here
they are -

abort	 execl	  fopen	   index    printf   signal   strlen
access	 exit	  fork	   isatty   putc     sizeof   strncpy
atan2	 fclose	  fprintf  link	    putchar  sprintf  times
chdir	 feof	  getc	   longjmp  sbrk     sscanf   unlink
clearerr fflush	  getchar  perror   setbuf   strcmp   wait
close	 fileno	  getenv   pow	    setjmp   strcpy

sbrk is used to get space; there's a special storage allocator defined
in the source, so malloc/calloc are not used.

When there is a C compiler ready for some people to try to break, I'd
be happy to have a go!
						Peter Ross ext 2557,
						central

==== ecmi01/ff_gasheater.txt ====
% File: /usr/lib/prolog/teach/faultfinder/gasheater
% Author: Peter Hammond + Peter Ross
% Updated: 30 Nov 1983
% Purpose: FAULTFINDER: a specific example.

%	====================
%	=                  =
%	= Gas Water Heater =
%	=                  =
%	====================

top_fault = ghnwp.


%		******************
%		* General faults *
%		******************

ghnwp:	name = '<gas heater not working properly>'
	& type = general
	& preconditions = none

==== ecmi01/ai2_recurse2.txt ====
/* generate integers */

is_int(0).
is_int(X) :-
         is_int(Y),
         X is Y+1.

/* generate pairs with sum X */

pair(X,X,0).
pair(X,N1,N2) :-
         X>0,
         X1 is X-1,
         pair(X1,N1,N3),
         N2 is N3+1.

/* generate Pythagorean triples */
pythag(X,Y,Z) :-
         is_int(A),
         pair(A,Y,Z),            % get a pair of numbers Y and Z
         Z>0,

==== ecmi01/anadex.txt ====
(*$S+*)
PROGRAM ANADEXPIC;
(*$I-*)
  
CONST
  TXTMD = 29;                                       (* TEXT/NORMAL MODE     *)
  GRFMD = 28;                                       (* GRAPHICS MODE        *)
  CTRL  = 3;                                        (* CONTROL CHARACTER    *)
  NUL   = 0;                                        (* NUL TO CLEAR SCREEN  *)
  BELL  = 7;                                        (* TELL WHEN PIC DRAWN  *)
  LF    = 10;                                       (* LINE FEED            *)
  VT    = 11;                                       (* VERTICAL TAB         *)
  FF    = 12;                                       (* FORM FEED            *)
  CR    = 13;                                       (* CARRAGE RETURN       *)
  SP    = 32;                                       (* SPACE                *)
  
TYPE
  LINE = PACKED ARRAY [0..319] OF BOOLEAN;          (* FOR SWOPPING ARRAY   *)
  BLOCK = PACKED ARRAY [0..239,0..319] OF BOOLEAN;  (* PICTURE FORMAT       *)
  FOUR = 1..4;
  PICFORMAT = RECORD CASE FOUR OF

==== ecmi01/startup.txt ====
SETMODE VIDEO=ON,LOWER

==== ecmi01/oldai2_setstuff.txt ====
/* This file defines various handy relationships involving sets.
   Here 'set' actually means 'list', but it sounds better ... */


/* member(H,List). Is H one of the elements of List? */
member(H,[H|_]).                 /* yes, if its the first member!    */
member(H,[_|T]) :- member(H,T).  /* yes, if its in the tail. N.B.    */
                                 /* T will be a list. Note that you  */
                                 /* fail if you get to asking for    */
                                 /* member(H,[]) , since this doesnt */
                                 /* match either clause's head       */

 /* intersect(A,B,I). I is the intersection of A and B */
intersect([H|T],B,[H|U]) :-
                 member(H,B),    /* if the answer's got H in it, then */
                 intersect(T,B,U). /* it must be in B                 */
intersect([_|T],B,U) :-
                 intersect(T,B,U). /* If first clause failed, we can  */
                                   /* ignore the head of first list   */
intersect(_,_,[]).               /* If the second also failed, the    */
                                 /* intersection is empty.            */

==== ecmi01/oldai2_recurse.txt ====
/* Some examples of recursion.
 *
 *   member(X,List)  succeeds if X is a member of List
 *   append(L1,L2,Ans)  succeeds if Ans is the concatenation of
 *                      L1 and L2
 *   get_n(L,Ans,N)  succeeds if Ans is the list containing the
 *                   first N elements of L
*/

member(X,[X|L]).
member(X,[_|L]) :- member(X,L).

append([X|L3],L4,[X|Ans1]) :- append(L3,L4,Ans1).
append([],L,L).

get_n([],[],_).
get_n([X|L1],[X|Ans1],N) :-
         N>0,
         N1 is N-1,
         get_n(L1,Ans1,N1).
get_n(_,[],0).

==== ecmi01/commreadin.txt ====

read_in([W|Ws]) :- get0(C),
                   readword(C,W,C1),
                   restsent(W,C1,Ws).

/* Given a word and the character after it, read in the rest
   of the sentence */
restsent(W,10,[]) :- !.
restsent(W,_,[]) :- lastword(W), !.
restsent(W,C,[W1|Ws]) :- readword(C,W1,C1),
                         restsent(W1,C1,Ws).

/* Read in a single word, given an initial character (C),
   and remembering what character came after the word */
readword(C,W,C1) :- single_char(C,W), !,
                    get0(C1).
readword(C,W,C2) :- in_word(C,NewC), !,
                    get0(C1),
                    restword(C1,Cs,C2),
                    name(W,[NewC|Cs]).
readword(C,W,C2) :- get0(C1),

==== ecmi01/oldai2_grulex.txt ====
/* Example of definite clause grammar, as given on the class handout */

expr(Z) --> term(Z).
expr(Z) --> term(X),"+",expr(Y),{Z is X+Y}.
expr(Z) --> term(X),"-",expr(Y),{Z is X-Y}.

term(Z) --> number(Z).
term(Z) --> number(X),"*",term(Y),{Z is X*Y}.
term(Z) --> number(X),"/",term(Y),{Z is X/Y}.

number(X) --> [C],{48=<C,C=<57,X is C-48}.
number(C) --> "+",number(C).
number(C) --> "-",number(X),{C is -X}.

==== ecmi01/pics_pica1.txt ====
   0 255   0 255   2   2
 174 175 174 174 176 173 177 173 175 175 174 173 175 174 174 174
 174 175 175 173 173 172 171 174 175 174 176 174 174 173 174 173
 173 174 174 176 174 173 175 173 173 174 172 173 176 173 175 172
 171 171 173 172 171 171 170 169 169 172 171 169 169 168 167 168
 168 165 166 163 163 164 161 163 161 160 161 160 158 159 157 158
 158 155 156 156 153 153 154 152 151 151 150 151 147 146 148 146
 146 146 143 145 144 143 144 142 140 139 139 139 141 139 137 137
 134 133 134 132 134 132 132 132 131 130 130 131 129 128 130 129
 176 176 173 174 176 176 177 176 176 175 175 174 174 172 176 175
 175 174 174 173 174 174 175 175 175 174 176 174 173 174 174 175
 175 174 176 175 174 176 176 173 176 174 173 171 173 172 174 171
 173 173 173 174 172 172 173 172 172 170 171 169 168 168 169 168
 167 167 164 165 164 164 163 163 162 162 161 158 160 159 158 157
 157 156 156 155 153 154 151 150 148 149 148 149 150 146 146 145
 147 144 145 143 142 140 141 141 139 139 139 138 137 137 138 138
 136 136 134 134 133 133 131 132 130 129 130 129 128 128 128 129
 175 176 175 176 175 176 176 176 177 177 175 176 175 175 176 177
 175 175 175 173 175 174 176 174 176 175 174 173 176 177 176 175
 175 174 176 177 175 176 176 176 176 175 175 174 172 173 172 172
 173 173 172 174 173 171 172 173 171 170 171 170 168 169 167 169

==== ecmi01/grulex.txt ====
/* Example of definite clause grammar, as given on the class handout */

expr(Z) --> term(Z).
expr(Z) --> term(X),"+",expr(Y),{Z is X+Y}.
expr(Z) --> term(X),"-",expr(Y),{Z is X-Y}.

term(Z) --> number(Z).
term(Z) --> number(X),"*",term(Y),{Z is X*Y}.
term(Z) --> number(X),"/",term(Y),{Z is X/Y}.

number(X) --> [C],{48=<C,C=<57,X is C-48}.
number(C) --> "+",number(C).
number(C) --> "-",number(X),{C is -X}.

==== ecmi01/ff_explain.txt ====
% File: ECMI01.FF_EXPLAIN
% Author: Peter Hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: the explanation subsystem for FAULTFINDER

% The only export is read_ans/2. The first arg is a variable, the
% second is a history list containing the (explainable) goals that
% led to the calling of read_ans/2. The goals in the list have arity
% one less than in reality, because the History argument is omitted.

read_ans(Ans, History) :-
	read_poss_ans(Ans1),
	check_for_query(Ans1, Ans, History).

check_for_query(A, A, _) :-
	A \== why.
check_for_query(why, A, History) :-
	trace_query(History),
	check_again_for_query(A).

check_again_for_query(A) :-

==== ecmi01/ff_ff.txt ====
% File: ECMI01.FF_FF
% Author: Peter Hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: a very simple 'expert system'

% FAULTFINDER: a general fault finding system. See below for a brief account.
%
% The rewrite was for various reasons:
%	- the original was in Waterloo Prolog
%	- EMAS Prolog does not offer 'ancestor(_)' or any fast-moving
%	  kludge of it in Prolog
%	- the i/o needed tidying.
%
% Desirable improvements:
%	- probabilistic reasoning
%	- a better interface for questioning the user
%	- a mechanism for 'how' questions
%	- a 'help' mechanism

% These commands load the system. To load a specific fault description
% file, use ffload/1 giving a filename or a list of filenames.

==== ecmi01/recurse.txt ====
/* Some examples of recursion.
 *
 *   member(X,List)  succeeds if X is a member of List
 *   append(L1,L2,Ans)  succeeds if Ans is the concatenation of
 *                      L1 and L2
 *   get_n(L,Ans,N)  succeeds if Ans is the list containing the
 *                   first N elements of L
*/

member(X,[X|L]).
member(X,[_|L]) :- member(X,L).

append([X|L3],L4,[X|Ans1]) :- append(L3,L4,Ans1).
append([],L,L).

get_n([],[],_).
get_n([X|L1],[X|Ans1],N) :-
         N>0,
         N1 is N-1,
         get_n(L1,Ans1,N1).
get_n(_,[],0).

==== ecmi01/ff_load.txt ====
% File: ECMI01.FF_LOAD
% Author: Peter Hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: code for loading a fault database for FAULTFINDER

% This is a simple loading loop for FAULTFINDER fault description files
% Top level for loading is ffload/1.
% The arg can be a file name or a list of them. Items from the file are
% recorded in the internal database, under the terse form of fault name
% as the key. There is a check that, for each fault, only one instance
% of each property appears.

ffload([File|Files]) :- 
	!,
	ffload(File),
	ffload(Files).
ffload([]).
ffload(File) :-
	seeing(Old),
	see(File),
	repeat,

==== ecmi01/pica1.txt ====
   0 255   0 255   2   2
 174 175 174 174 176 173 177 173 175 175 174 173 175 174 174 174
 174 175 175 173 173 172 171 174 175 174 176 174 174 173 174 173
 173 174 174 176 174 173 175 173 173 174 172 173 176 173 175 172
 171 171 173 172 171 171 170 169 169 172 171 169 169 168 167 168
 168 165 166 163 163 164 161 163 161 160 161 160 158 159 157 158
 158 155 156 156 153 153 154 152 151 151 150 151 147 146 148 146
 146 146 143 145 144 143 144 142 140 139 139 139 141 139 137 137
 134 133 134 132 134 132 132 132 131 130 130 131 129 128 130 129
 176 176 173 174 176 176 177 176 176 175 175 174 174 172 176 175
 175 174 174 173 174 174 175 175 175 174 176 174 173 174 174 175
 175 174 176 175 174 176 176 173 176 174 173 171 173 172 174 171
 173 173 173 174 172 172 173 172 172 170 171 169 168 168 169 168
 167 167 164 165 164 164 163 163 162 162 161 158 160 159 158 157
 157 156 156 155 153 154 151 150 148 149 148 149 150 146 146 145
 147 144 145 143 142 140 141 141 139 139 139 138 137 137 138 138
 136 136 134 134 133 133 131 132 130 129 130 129 128 128 128 129
 175 176 175 176 175 176 176 176 177 177 175 176 175 175 176 177
 175 175 175 173 175 174 176 174 176 175 174 173 176 177 176 175
 175 174 176 177 175 176 176 176 176 175 175 174 172 173 172 172
 173 173 172 174 173 171 172 173 171 170 171 170 168 169 167 169

==== ecmi01/partfiles.txt ====
pdfile(X) :- exists(X),!,
         (curpdfile(Y),retract(curpdfile(Y));true),assert(curpdfile(X)).
pdfile(X) :- write('The file '),write(X),write(' is not available to you'),nl.
typd(X) :- curpdfile(Y), name(Y,L),
           name(X,L1), append(L,[95|L1],L2),
           name(Z,L2), emas(ty,Z).
anpd :- curpdfile(X),!,emas(analyse,X).
anpd :- write('No file specified - use pdfile(X).'),nl.
anpd(X) :- curpdfile(Y), name(Y,L), name(X,L1),
           append(L,[95|L1],L2), name(Z,L2),
           emas(analyse,Z).
append([],L,L).
append([X|L1],L2,[X|L3]) :- append(L1,L2,L3).

==== ecmi01/ai2_diffnotes.txt ====
This program differentiates given expressions with respect to specified
unknowns. Expressions can be formed using brackets, the operators
 + - * /   and   @ (meaning 'to the power of')
and the functions
 sin() cos() tan() log() exp().
Unknowns are represented by Prolog atoms. The input should be given in
the form
         expression : unknown.
or
         expression : [unknown,unknown,...].
for multiple differentiation. For example,
         sin(x@2+1):x.
         x@4 + a*x@3 + b*x@2 + c*c + d : [x,x].
         x@y :[x,y,y].
are all acceptable. Don't forget the final dot!
To stop, type stop.
...............................................

==== ecmi01/rt2pas.txt ====
(*$I-*)
PROGRAM RT2PAS;
CONST
  EMPTY = 512;
  PERM = 1024;
  TENTATIVE = 256;
  ENDMARK = 2048;

TYPE
  DATEWRD = PACKED RECORD
                YEAR:  0..31; (*YEAR-72*)
                DAY:   0..31; (*ALLOCATE*)
                MONTH: 0..31; (*5 BITS EA*)
                JUNK:  0..1   (*INTEGER FILL*)
            END;
  CHARS = PACKED ARRAY [0..2] OF CHAR;
  FILENTRY = RECORD
    STATUSWORD: INTEGER;
    FIRST: INTEGER;
    SECOND: INTEGER;
    EXTENSION: INTEGER;

==== ecmi01/oldai2_maze.txt ====
/* Maze.
   Peter Ross, 12-Nov-81.

   The database in this file describes a maze. All the cells are
   labelled with a letter and number, e.g. e2, f12 etc, except for
   the two called in and home. The predicate door(X,Y) means that
   there is a (two way) door between cells X and Y. The predicate
   move(X,Y) expresses the fact that the doors are two-way - it
   means you can move from cell X to cell Y in one move.

   Tasks:
         (1) show you CAN get from in to home.
         (2) find the shortest route
         (3) show you CAN'T get from in to home if the doors are
             only one way!

   NOTE: don't bother trying to draw the maze - (a) it has an
         idiosyncratic cell labelling scheme, and (b) it isn't
         two-dimensional!

*/

==== ecmi01/diffnotes.txt ====
This program differentiates given expressions with respect to specified
unknowns. Expressions can be formed using brackets, the operators
 + - * /   and   @ (meaning 'to the power of')
and the functions
 sin() cos() tan() log() exp().
Unknowns are represented by Prolog atoms. The input should be given in
the form
         expression : unknown.
or
         expression : [unknown,unknown,...].
for multiple differentiation. For example,
         sin(x@2+1):x.
         x@4 + a*x@3 + b*x@2 + c*c + d : [x,x].
         x@y :[x,y,y].
are all acceptable. Don't forget the final dot!
To stop, type stop.
...............................................

==== ecmi01/exp.txt ====
exp(X,0,1).
exp(X,Y,Z) :- even(Y), R is Y/2, P is X*X, exp(P,R,Z).
exp(X,Y,Z) :- T is Y-1, exp(X,T,Z1), Z is Z1*X.
even(R) :- 0 is R mod 2.

==== ecmi01/robot5.txt ====
.pg 5. ROBOTIC VISION
A robot whose only sensory capabilities are touch and force is still almost
totally isolated from the real world. This would be so even if touch and
force sensing could be as good as their human counterpart; to imagine the
sensory information available to one of today's robots, think of being blind
and deaf
and wearing woolen mittens in sub-zero temperatures which have numbed your
fingers and frozen the mittens stiff. You can still 'feel' objects in your
grasp, but only by a sense of muscle resistance, and you can only sense the
grossest characteristics of shape.
Being blind and deaf you can only become aware of new objects by actually 
touching them, and only memory will allow you to keep track of 'known'
objects.
.ti 4
This analogy helps to explain why providing a robot with a visual sense
is such a desirable goal, even though the technology of visual processing is
still fairly rudimentary. At present it is possible for a robot vision
system to find and identify objects provided that it has an adequate
description of the object and that the lighting conditions are well
controlled so that the object can be seen as a clear silhouette. Finding
and identifying objects when they overlap (the 'bin picking' problem) or

==== ecmi01/oldai2_recurse2.txt ====
/* generate integers */

is_int(0).
is_int(X) :-
         is_int(Y),
         X is Y+1.

/* generate pairs with sum X */

pair(X,X,0).
pair(X,N1,N2) :-
         X>0,
         X1 is X-1,
         pair(X1,N1,N3),
         N2 is N3+1.

/* generate Pythagorean triples */
pythag(X,Y,Z) :-
         is_int(A),
         pair(A,Y,Z),            % get a pair of numbers Y and Z
         Z>0,

==== ecmi01/missio.txt ====
% Missionaries and Cannibals: teaching example
%     Peter Ross, May 1983
%
% To start it:
%	?- search(state(3,3,0,0,left), state(3,3,0,0,left), Ans).
% or
%	?- try(Ans).
% Oddity: trace it, and 'check(_,_)' never appears in the trace.

:- op(700,yfx,&).

search(state(0,0,_,_,right), Answer, Answer).

search(state(Ml,Cl,Mr,Cr,left), PastMoves, Answer) :-
	try(M,C,given(Ml,Cl)),
	NewMl is Ml-M, NewCl is Cl-C,
	NewMr is Mr+M, NewCr is Cr+C,
	NewState = state(NewMl,NewCl,NewMr,NewCr,right),
	check(NewState,PastMoves),
	search(NewState, PastMoves & NewState, Answer).


==== ecmi01/oldai2_readin.txt ====
/* Read in a sentence.

   Clearly, when reading in text character by character (using get0),
   it is essential NEVER to backtrack over a get0 goal, otherwise you'd
   have lost the character it read in. Thus, when you get a character,
   you must make sure it gets used. If it can't get used in one context
   (e.g. when constructing a word, and you reach a space) it must be
   passed back to predicates that can use it.
   Thus, for example, readword has three arguments below: the first is
   a character, potentially the first of a word but perhaps a bit of
   interword filling (space or tab), the second is uninstantiated at
   first but will be a word eventually, the third is uninstantiated but
   will finally be instantiated to the character that followed the word
   - i.e. the character that told readword it had reached the end of a
   word.
   Similarly, restsent (which is "higher-level" than readword) has three
   arguments: the first is the word just read, the second is the
   character following that word (which has to be handed forward for the
   reasons explained above) and the third is a variable that will be
   instantiated by restsent to a list consisting of the rest of the 
   sentence. The first argument is necessary in order that restsent can

==== ecmi01/scons.txt ====
/* This file defines three useful predicates:
         retractall(X)   which retracts all clauses beginning with
                         X, e.g. retractall(fry(_)) will retract
                         the clause fry(fish) and the clause
                         fry(X) :- (fishy(X);vegatable(X)).
         scons(File)     which consults the file File, but doesn't
                         print extra information on your terminal
                         (scons = Silent CONSult)
         srecons(File)   which does the same but reconsults
                         (srecons = Silent RECONSult)
*/

retractall(X) :- retract(X), fail.
retractall(X) :- retract((X:-Y)), fail.
retractall(_).           % this succeeds when the other two have failed
                         % because nothing is left to retract.

scons(File) :-
         seeing(Input),
         see(File),
         repeat,

==== ecmi01/readin.txt ====

read_in([W|Ws]) :- get0(C),
                   readword(C,W,C1),
                   restsent(W,C1,Ws).

/* Given a word and the character after it, read in the rest
   of the sentence */
restsent(W,10,[]) :- !.
restsent(W,_,[]) :- lastword(W), !.
restsent(W,C,[W1|Ws]) :- readword(C,W1,C1),
                         restsent(W1,C1,Ws).

/* Read in a single word, given an initial character (C),
   and remembering what character came after the word */
readword(C,W,C1) :- single_char(C,W), !,
                    get0(C1).
readword(C,W,C2) :- in_word(C,NewC), !,
                    get0(C1),
                    restword(C1,Cs,C2),
                    name(W,[NewC|Cs]).
readword(C,W,C2) :- get0(C1),

==== ecmi01/ai2_diff.txt ====
:- op(700,xfx,:).
:- op(200,xfy,@).

go :- write('Want instructions? Type y or n and press return...'), nl,
      prompt(Old,'y/n? '),
      get(C), skip(10),
      tellall(C),
      prompt(Yn,'diff: '),
      dv.

tellall(C) :- (C=89;C=121),
         emas(ty,'ecmi01.ai2_diffnotes').
tellall(C).
dv :- repeat, read(T), (T=stop; derive(T), fail).

derive(T:X) :- T : X, !.

X : [U] :- X : U.
X : [U|V] :- d(X,U,W), simplify(W,Z), Z : [V].
X : Y :- d(X,Y,W), simplify(W,Z), nl, output(Z), nl, nl.


==== ecmi01/setup.txt ====
OPTION(FSTARTFILE=ECMI25.INIT)
OPTION(REMOVEDIR=PLULIB.PACKDIR)
OPTION(SEARCHDIR=ECMI25.PROLOG#DIR)
OPTION(SEARCHDIR=ECMI25.COMMANDS)
DELIVER(PETER_ROSS_FORREST_HILL)
OPTION(NOBRACKETS,NOECHO,ARRAYDIAG=0)
SETMODE VIDEO=ON,LOWER

==== ecmi01/readindoc.txt ====
The predicate 'read_in(L)' in ECMI01.COMMREADIN reads in sentences typed by
the user and returns the words as elements of the list L. The end of a
sentence is marked either by the <return> key or by the backslash symbol -
but note that EMAS won't pass your typing on to Prolog until you type <return>,
so if you have a backslash in a line, it'll appear to be two sentences to
this version of 'read_in(L)'. The following characters are recognised as
one-character words:

         ! " # $ % & ' ( ) * + , - . : ; < = > ? @ [ \ ] ^ ` { | } ~

The character '_' is taken to be a normal character that can appear within
words.

You can copy the file and modify it to suit your needs. The single-character
words are defined by a call to 'in_set(L)' whose argument is a list of lists,
or numbers. Each number is an ASCII character code for what is to be taken as
a valid single-character word; each list contains two numbers, representing a
character range.
                                         Peter Ross, 7 December 1982

==== ecmi01/ai2_liza.txt ====
/*   Simple ELIZA
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
     Peter Ross 5-Nov-81
*/

:-(['ecmi25.util_readin']).       % load read_in + necessary support.

/* The top level: call liza (so named 'cos it's a mini-version of ELIZA)
   to get going.
   The predicate read_in reads in sentences, currently ending with a
   full stop, exclamation mark or question mark. Thus
         read_in(X)
   will read in
         hello there.
   as
         X = [hello,there,.]
   NOTE: use lower-case letters at the front of words, this is a simple
   beast!
*/


==== ecmi01/maze.txt ====
/* Maze.
   Peter Ross, 12-Nov-81.

   The database in this file describes a maze. All the cells are
   labelled with a letter and number, e.g. e2, f12 etc, except for
   the two called in and home. The predicate door(X,Y) means that
   there is a (two way) door between cells X and Y. The predicate
   move(X,Y) expresses the fact that the doors are two-way - it
   means you can move from cell X to cell Y in one move.

   Tasks:
         (1) show you CAN get from in to home.
         (2) find the shortest route
         (3) show you CAN'T get from in to home if the doors are
             only one way!

   NOTE: don't bother trying to draw the maze - (a) it has an
         idiosyncratic cell labelling scheme, and (b) it isn't
         two-dimensional!

*/

==== ecmi01/simplify.txt ====
/* SIMPLIFY.
   The aim of the predicate simplify is to reshuffle expressions which
   are sums of unknowns (represented by Prolog atoms) and integers so
   that all the unknowns are at the start and the sum of all the
   integers is at the end, e.g.
         x+3+y+4+z      gets reshuffled to      x+y+z+7
   This is (a) useful in mathematical manipulations by computer
   and     (b) an illustration of a useful technique called
               "difference pairs".

   To summarise the idea: a structure such as +(a,+(b,c)) could be
   drawn as
                 +
                / \
               a   +
                  / \
                 b   c

   The idea is that when constructing such things you can represent
   intermediate stages as the "difference" of
                 +

==== ecmi01/oldai2_news.txt ====
   Differences between PROLOG version 4 and versions 3 and 2
   ---------------------------------------------------------
There is a new version (version 4) as from 10 February 82 with the following
bugs fixed:
1) The bugs with name and =.. have been fixed.
2) The arithmetic bugs involving negative numbers have been fixed.
3) The debugging has been improved slightly. It is now possible to trace past
   cuts. Cuts are, in fact, now invisible to the tracing - like a few other
   evaluable predicates. Also the system no longer traces various obscure parts
   of the top level that used to appear before.
4) prompt(_,_) will not crash anymore if given a long atom. The atom can be any
   length, but note that the prompt actually used will be a truncated version
   of this if it too long. This seems to be an EMAS limitation. The current max
   length is 15.
5) The system now restores its event and interrupt handlers properly after
   returning from programs called through emas(_) or emas(_,_). This, for one
   thing, allows various editors other than the standard one to be used from
   within PROLOG (they used to mess things up so that you couldn't interrupt
   properly after using them).
6) The interrupt handling system has been improved somewhat, so that there
   should be very few of the "funny crashes". One way to make them happen

==== ecmi01/warplan.txt ====
:- op(700,xfy,&).
:- op(650,yfx,=>).

% generation and output of a plan

plans(C,T) :- not(consistent(C,true)),!, nl,
	      write('*** impossible ***'),nl.
plans(C,T) :- plan(C,true,T,T1), nl, output(T1), nl.

output(Xs=>X) :- !, output1(Xs), write(X), write('.'), nl.

output1(Xs=>X) :- !, output1(Xs), write(X), write(' ;'), nl.
output1(X) :- write(X), write(' ;'), nl.

% top level of main recursive loop

plan(X&C,P,T,T2) :- !, solve(X,P,T,P1,T1), plan(C,P1,T1,T2).
plan(X,P,T,T1) :- solve(X,P,T,P1,T1).

% to solve a goal


==== ecmi01/anadextra.txt ====
 
 (* These procedures are for use with 'TIGERSNAP' to be run on the TERAK. *)

PROCEDURE DRAWLINE(VAR RANGE:INTEGER; VAR S:PICFORMAT;
                   ROW, X0, Y0, DX, DY, PEN:INTEGER);
EXTERNAL;
  
PROCEDURE FRAME;
VAR I:INTEGER;
BEGIN
  FILLCHAR(SCREEN.C[0],9600,NUL);               (* CLEARS THE ARRAY AND   *)
  UNITWRITE(3,SCREEN.C[0],56);                  (* DRAWS A TERAK SCREEN   *)
  DRAWLINE(I,SCREEN,20,0,0,319,0,1);            (* SIZED FRAME            *)
  DRAWLINE(I,SCREEN,20,319,0,0,239,1);
  DRAWLINE(I,SCREEN,20,319,239,-319,0,1);
  DRAWLINE(I,SCREEN,20,0,239,0,-239,1);
  UNITWRITE(3,SCREEN.C[0],7);
END;
    
PROCEDURE SAVEPIC;                              (* A NUL PROCEDURE BECAUSE *)
BEGIN                                           (* THE FRAME IS DRAWN      *)

==== ecmi01/tut.txt ====
                     DEPARTMENT OF ARTIFICIAL INTELLIGENCE
                                        
                Prolog exercises - for week beginning 6 Dec 1982


1. The normal method of getting a program into the interpreter, and modifying
   it, is fairly cumbersome for beginners. Devise a better method. You could
   restrict yourself to clauses such as
        fred eats haggis
        ian hates chips
   and other such clauses of the form "Object Relation Object". Your program
   should give you a prompt and allow you to add facts (use built-in predicate
   'assertz(Term)') and ask questions - say of the form
        is it true that fred eats haggis
   Points to remember:
   (a) in ECMI25.UTIL_READIN there is a program for 'read_in(List)' such that
       the goal 'read_in(L)' will give a prompt and wait for you to type. If
       you type
                fred eats haggis
       then L will be instantiated to the list [fred,eats,haggis].
       Experiment with it a bit to get the feel of it.

==== ecmi01/oldai2_ineq.txt ====
/* definition of equality/inequality */

eq(X,X).

ineq(X,X) :- !, fail.
ineq(X,Y).

==== ecmi01/ff_utils.txt ====
% File: ECMI01.FF_UTILS
% Author: Peter hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: utilities used in other FAULTFINDER modules

:- op(50, xfy, and).
:- op(60, xfy, or).
:- op(70, xfy, if).
:- op(950, xfy, & ).
:- op(960, xfy, :).	% 950 > ','

once(X) :- X, !.

member(A, [A|_]).
member(A, [_|Rest]) :- member(A, Rest).

memberchk(A, [A|_]) :- !.
memberchk(A, [_|Rest]) :- memberchk(A, Rest).

read_poss_ans(Answer) :- 
	get(NonBlankChar),

==== ecmi01/blocks.txt ====
given(start,on(e,floor)).
given(start,on(c,e)).
given(start,clear(c)).
given(start,on(a,floor)).
given(start,clear(a)).
given(start,on(d,floor)).
given(start,on(b,d)).
given(start,clear(b)).

given(state1,on(x,floor)).
given(state1,on(y,floor)).
given(state1,clear(x)).
given(state1,clear(y)).

given(state2,on(p,floor)).
given(state2,on(q,floor)).
given(state2,on(r,p)).
given(state2,clear(q)).
given(state2,clear(r)).

add(on(U,W), move(U,V,W)).

==== ecmi01/ai2_queens.txt ====
/* NON-ATTACKING QUEENS.
   Peter Ross 24 Nov 81.

   This generates solutions to the problem of placing N queens on an NxN
   board so that none attacks any other. To use, call queens(N) and it
   will print out a board with queens represented by 'Q'.
   Note: no solutions for N=2,3.
         speed of solution drops rapidly as you increase N - N=8 may
         cause you a ten-minute wait!

   Meta-level ideas: represent a position of a queen as p(r,c) meaning
         a queen in row r, column c. Then a solution will be represented
         as N of these with no r occuring twice (queens can't be on the
         same row) and no c occuring twice (queens can't be on the same
         column). THEREFORE we can order the solution, say by taking the
         rows in descending order (i.e. from N to 1). The c's will just
         be some permutation of 1 to N. So, tasks are (taking, say, N=4):
           a) form the rows set [4,3,2,1]
           b) form a permutation of it, e.g. [3,1,4,2]
           c) construct a position from this, viz.
                 [p(4,3),p(3,1),p(2,4),p(1,2)]

==== ecmi01/ecmu19_thelot.txt ====
Introduction.

   For some time I have been aware that areas of Artificial Intelligence develop
rapidly to become the centre of attention, more so than in many other academic
disciplines. But in any subject which is undergoing change, one must be sure
neither to be carried along unprotestingly, nor to reject out-of-hand any 
unexpected changes of, say, methodology or the sphere of study. Such major
revisions in the domain and purpose of a subject happen from time to time, and
when they do, it is for all interested parties to explore and constructively
criticise the developments.

   In Linguistics in the mid 1950's there was a major change with the 
introduction of transformational generative grammar, which, modified several
times, has dominated theoretical syntax for over 20 years, though the future of
transformational grammar (not generative grammar, of which it is a type) is
currently under some question.

   As in theory "a generative grammar is a mathematically precise specification
of the grammatical structure of the sentences that it generates" (p126,Lyons),
it should be easy enough to computerise: indeed, if serious problems were to
occur in implementation, this would point to a need for modifications. This

==== ecmi01/oldai2_diffnotes.txt ====
This program differentiates given expressions with respect to specified
unknowns. Expressions can be formed using brackets, the operators
 + - * /   and   @ (meaning 'to the power of')
and the functions
 sin() cos() tan() log() exp().
Unknowns are represented by Prolog atoms. The input should be given in
the form
         expression : unknown.
or
         expression : [unknown,unknown,...].
for multiple differentiation. For example,
         sin(x@2+1):x.
         x@4 + a*x@3 + b*x@2 + c*c + d : [x,x].
         x@y :[x,y,y].
are all acceptable. Don't forget the final dot!
To stop, type stop.
...............................................

==== ecmi01/news.txt ====
   Differences between PROLOG version 4 and versions 3 and 2
   ---------------------------------------------------------
There is a new version (version 4) as from 10 February 82 with the following
bugs fixed:
1) The bugs with name and =.. have been fixed.
2) The arithmetic bugs involving negative numbers have been fixed.
3) The debugging has been improved slightly. It is now possible to trace past
   cuts. Cuts are, in fact, now invisible to the tracing - like a few other
   evaluable predicates. Also the system no longer traces various obscure parts
   of the top level that used to appear before.
4) prompt(_,_) will not crash anymore if given a long atom. The atom can be any
   length, but note that the prompt actually used will be a truncated version
   of this if it too long. This seems to be an EMAS limitation. The current max
   length is 15.
5) The system now restores its event and interrupt handlers properly after
   returning from programs called through emas(_) or emas(_,_). This, for one
   thing, allows various editors other than the standard one to be used from
   within PROLOG (they used to mess things up so that you couldn't interrupt
   properly after using them).
6) The interrupt handling system has been improved somewhat, so that there
   should be very few of the "funny crashes". One way to make them happen

==== ecmi01/ai2_stuart.txt ====

/* this file defines various facts about the House of Stuart.        */
/* The various fact declarations in it should be read thus:          */
/*   father(person1,person2).   means person1 is father of person2.  */
/*   mother(   "   ,   "   ).     "      "     " mother "     "   .  */
/* and so on.
   Note that 'ggparent' stands for "great-grand-parent". */

father(robert_II,robert_III).
father(robert_III,james_I).
father(james_I,james_II).
mother(joan_beaufort,james_II).
father(james_II,james_III).
father(james_II,alexander_duke_of_albany).
father(james_II,mary).
                 /* the next two relationships are for historical   */
                 /* convenience. It saves having to clutter things  */
                 /* up with lord_james_hamilton's children ...      */
                 /* Note prolog DOESN'T know what 'ggfather' means. */
ggfather(lord_james_hamilton,matthew_earl_of_lennox).
ggmother(mary,matthew_earl_of_lennox).

==== ecmi01/ladybug.txt ====
/* LADYBUG is a 'Buggy'-type program for the Linear Algebra Domain */




instructions :-  nl,
                 write('Welcome to LADYBUG.  The format if very simple.'),
                 nl,
                 write('type "show." to find the status of the tracer.'),
                 nl,
                 write('Turn it off for now.  Next type "protocol." and'),
                 nl,
                 write('choose a number from 1 to 6 (0 for standard protocol)'),
                 nl,
                 write('Then just type "begin." once for each equation'),
                 nl,
                 write('you"d like LADYBUG to solve.  Enjoy...').

begin :- nl,
         write('Please enter an equation (q to quit)'),nl,
         read(Eqn),

==== ecmi01/ecmu19_transbit.txt ====
                     /* Transformational Grammar Programme */
                     /* """""""""""""""""""""""""""""""""" */
                     /* ..........James  Scobbie.......... */
                     /* ~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~ */
                     /* artificial intelligence department */
                     /* """""""""""""""""""""""""""""""""" */



:-op(500,yfx,[#]).


go:-banner,choose(Namelist),!,s(Deep,_,_),show(Deep),
         do(Deep,Namelist,Surface).


banner:-line(0),nl,
         printstring("Do you want to test the ordering of the current"),nl,
         printstring("package (option 1) or to change some aspects of"),nl,
         printstring("the rule set for testing? (option 2).Choose the"),nl,
         printstring("option you require by typing 1 or 2 followed by"),nl,

==== ecmi01/ai2_family.txt ====

/* definition of some family relationships */

parent(X,Y) :- mother(X,Y).      /* X is the parent of Y if ... */
parent(X,Y) :- father(X,Y).      /* Or if ...                   */

gparent(X,Y) :-                  /* X is grandparent of Y if    */
         parent(X,A),            /* X is parent of (someone) A, */
         parent(A,Y).            /* and A is parent of Y.       */

ggparent(X,Y) :-         /* X is the great-grandparent of Y if  */
         gparent(X,A),   /* X is the grandparent of (someone) A */
         parent(A,Y).    /* and A is the parent of Y.           */
                         /* N.B. alternative: "X is parent of A */
                         /* and A is gparent of Y". It's the    */
                         /* same thing here - why? If you went  */
                         /* on to define 'gggparent' for use in */
                         /* the "stuart" database, the choice   */
                         /* WOULD matter. Why? look at the file */
                         /* "ai2_stuart" ...                    */


==== ecmi01/ans.txt ====
DEPARTMENT OF ARTIFICIAL INTELLIGENCE

Answers to Prolog exercises (#3)

1.      flatten([],[]).
        flatten([[]|T], Tflat) :- flatten(T, Tflat).
        flatten([H|T], [H|Tflat]) :- atomic(H), !, flatten(T, Tflat).
        flatten([H|T], L) :- flatten(H, Hflat),
                             flatten(T, Tflat),
                             append(Hflat, Tflat, L).

    This uses 'append'. The second clause is there to remove empty lists (which
    are atomic). The cut is there in case of backtracking to the top level
    'flatten' goal.
    
2.      reverse([H|T], Rev) :- reverse(T, Trev), append(Trev, [H], Rev).

    This also uses 'append'. The version below is worth studying, even though
    it looks opaque at first; it is an example of a very generally useful
    technique.
    

==== ecmi01/setstuff.txt ====
/* This file defines various handy relationships involving sets.
   Here 'set' actually means 'list', but it sounds better ... */


/* member(H,List). Is H one of the elements of List? */
member(H,[H|_]).                 /* yes, if its the first member!    */
member(H,[_|T]) :- member(H,T).  /* yes, if its in the tail. N.B.    */
                                 /* T will be a list. Note that you  */
                                 /* fail if you get to asking for    */
                                 /* member(H,[]) , since this doesnt */
                                 /* match either clause's head       */

 /* intersect(A,B,I). I is the intersection of A and B */
intersect([H|T],B,[H|U]) :-
                 member(H,B),    /* if the answer's got H in it, then */
                 intersect(T,B,U). /* it must be in B                 */
intersect([_|T],B,U) :-
                 intersect(T,B,U). /* If first clause failed, we can  */
                                   /* ignore the head of first list   */
intersect(_,_,[]).               /* If the second also failed, the    */
                                 /* intersection is empty.            */

==== ecmi01/rselong2.txt ====
  RESEARCH INTO THE CONSTRUCTION AND APPLICATION OF INTELLIGENT KNOWLEDGE
                  BASED SYSTEMS THAT AID COMPUTER USERS

                            Dr. Peter Ross,
                  Department of Artificial Intelligence,
                        University of Edinburgh.
   
INTRODUCTION

   Intelligent knowledge-based (IKB) systems, sometimes referred to as 'expert
systems', are computer programs or sets of programs which contain explicit
knowledge concerning some particular area of human expertise, organised in
such a way that they can function as an expert consultant in that area. Some
existing examples are MECHO (which solves problems in mechanics - [Bundy79]),
MYCIN (which diagnoses bacterial infections and recommends treatments -
[Shortliffe76]), MOLGEN (which designs molecular genetic experiments -
[Stefik81]) and EL (which analyses analogue electric circuits [Stallman77]).
They contain the factual knowledge of their subject as sets of rules - for
example, one of MYCIN's rules is

   If (a) the infection is primary-bacteremia, and

==== ecmi01/unixtake.txt ====
/*      UNIX support routines for file transfer

	Support routines for microcomputer file transfer between
	UNIX and UCSD (TTY program )

	Ann Macintosh   August 1980           */

#include <stdio.h>
#include <sgtty.h>
#include <signal.h>

#define END '?'
#define DLE 16
#define XON 17

#define GTTY TIOCGETA
#define STTY TIOCSETA

#define MAXNAME 40
#define TRUE 1
#define FALSE 0

==== ecmi01/ineq.txt ====
/* definition of equality/inequality */

eq(X,X).

ineq(X,X) :- !, fail.
ineq(X,Y).

==== ecmi01/rt1pas.txt ====
(*$S+*)
(*$I-*)
PROGRAM RT2PAS;
CONST
  EMPTY = 512;
  PERM = 1024;
  TENTATIVE = 256;
  ENDMARK = 2048;

TYPE
  DATEWRD = PACKED RECORD
                YEAR:  0..31; (*YEAR-72*)
                DAY:   0..31; (*ALLOCATE*)
                MONTH: 0..31; (*5 BITS EA*)
                JUNK:  0..1   (*INTEGER FILL*)
            END;
  CHARS = PACKED ARRAY [0..2] OF CHAR;
  FILENTRY = RECORD
    STATUSWORD: INTEGER;
    FIRST: INTEGER;
    SECOND: INTEGER;

==== ecmi01/pgc.txt ====
DEPARTMENT OF ARTIFICIAL INTELLIGENCE

Running The Post-graduate Course



The course starts with the winter term. So, the event queue for the organiser
starts before then:

---- Summer: by early August

	Get together a brief course description and a general reading list,
	to be sent out to new PGs.

---- Summer: by Sept. 15, say.

	Organise the time table. Check that the lecturers will be available
	at the desired times, and that they know it. Send them time tables.
	Dig out information about rooms - for shared courses contact the other
	course organisers. The first lecture is a welcome by the head of the
	department.

==== ecmi01/oldlbug.txt ====
/* LADYBUG is a 'Buggy'-type program for the Linear Algebra Domain */




begin :- nl,
         write('Please enter an equation (q to quit)'),nl,
         read(Eqn),
         protocol(M),
         solve(M,Eqn).


/* PROTOCOL 0: no malrule -- correct algebraic manipulation */
solve(0,Lhs=Rhs) :-
                 present('solving        ',Lhs,Rhs),
                 !,
                 cattract(Lhs,Rhs,Lhs2,Rhs2),
                 iattract(Lhs2,Rhs2,Lhs3,Rhs3),
                 consolidate(Lhs3,Sum_coeffs),
                 present(lhs_consolidate,Sum_coeffs*x,Rhs3),
                 consolidate(Rhs3,Sum_integers),

==== ecmi01/prenglish.txt ====
:- op(300,xf,?).

begin:- asserta(definition(X,X)),
	asserta(definition((P;Q),[P, or, Q])),
	asserta(definition((P:-Q), [P, if, Q])),
	asserta(definition((P,Q), [P, and, Q])),
    prompt(Old, 'Prolog: '), repeat,nl,nl,read(T), (T=stop; process(T), fail).

process(T-D) :- !, asserta(definition(T,D)).
process([T1|T2]?) :- retrovert(T,[T1|T2]), !, nl, write(T).
process(T) :- translate(T,D), nl, output(D), !.
process(_) :- nl, write('*** untranslatable ***'), nl.

retrovert(T,D) :- definition(T1,D), !, T1 =.. [N|L],
		  retrovert_args(Args,L), T =.. [N|Args].

retrovert_args([A|Args],[L|Ls]) :- retrovert(A,L),
				   retrovert_args(Args, Ls).
retrovert_args([], []).

translate(X,X) :- var(X), !.

==== ecmi01/exmsc.txt ====
-----------------
Please distribute
-----------------

		    EXPERT SYSTEMS: the exam  1984

There are three questions on each of the M.Sc. exams (at least, the AI ones).
Answer two; you'll only get credit for the first two you answer (which is not
necessarily the same as the first two you try!). Some (perhaps most) of the
questions will come in several parts connected by some theme; do the bits you
can, obviously. If you find yourself at sea, try to put down what you do know
that you think relevant; you get marks for what you put down, if its relevant!

Revision: the blue/white Xerox paper ("The Organization of Expert Systems:
	  A Prescriptive Tutorial" by M.Stefik &c), lecture handouts and
	  your own notes. If you want reassurance or further reading, then
	  look at the expensive book ("Building Expert Systems", Hayes-Roth
	  &c) and/or "Expert Systems in the Micro-electronic Age", Michie &c.
	  Try AL/X and OPS5 just to get a taste of the practice, they make the
	  course a little less academic - not obligatory, though.


==== ecmi01/init.txt ====
setmode video=on,lower,width=80,tabs=9:17:25:33:41:49:79
setmode flow=on

==== ecmi01/oldai2_minidb.txt ====
% File:         ECMI01.MINIDB
% Updated:	15 October 84 11:10
% Author:	Peter Ross
% Purpose:	a mini database system, needing improvement in every way
% Level:	introductory.

% This is extremely feeble. Learning exercise: improve it.
%
% It uses the following built-in predicates:
%	assert(Term)		- to add to the database
%	retract(Term)		- to remove from the database
%	read(Term)		- to read data (in the form of a term) or
%				  replies (also in the form of a term) from
%				  the user.
%	abolish(Term,Arity)	- to flush out the database
%	bagof(X, Term, List)    - to collect up all the Xs fitting the Term
%
% NOTES: (1) all database items are held as terms of the form  dbitem(Item).
%	 (2) all your input must be valid Prolog terms.
%	 (3) the program is atypical, because backtracking NEVER happens in it.
%	     It can bomb out, if you attempt to query an empty database.

==== ecmi01/ks299_int.txt ====
% File:    /u4/peter/prolog/ks299/int
% Author:  Original by Steven Hardy. Reworked by Peter Ross.
% Updated: 6 Sep 84 by Peter Ross
% Purpose: a simple rule interpreter in the style of KS-300

% Original code courtesy of Teknowledge Inc. - so don't make use of it
% without acknowledging them.

% The rule base is made up of assertions of the form
%	RULE: if PREMISE then CONCLUSION.
% where	RULE is an atom,
%	PREMISE is a simple proposition of the form
%			THING = VALUE
%		     or THING is known
%		     or THING is unknown
%		or is a combination of simple propositions
%		   built up using "and" and "or", where "or"
%		   binds tighter than "and",
%       CONCLUSION is a simple conclusion of the form
%			THING = VALUE
%		     or THING = VALUE cf CONFIDENCE

==== ecmi01/oldai2_scons.txt ====
/* This file defines three useful predicates:
         retractall(X)   which retracts all clauses beginning with
                         X, e.g. retractall(fry(_)) will retract
                         the clause fry(fish) and the clause
                         fry(X) :- (fishy(X);vegatable(X)).
         scons(File)     which consults the file File, but doesn't
                         print extra information on your terminal
                         (scons = Silent CONSult)
         srecons(File)   which does the same but reconsults
                         (srecons = Silent RECONSult)
*/

retractall(X) :- retract(X), fail.
retractall(X) :- retract((X:-Y)), fail.
retractall(_).           % this succeeds when the other two have failed
                         % because nothing is left to retract.

scons(File) :-
         seeing(Input),
         see(File),
         repeat,

==== ecmi01/charlist.txt ====
charlist([],[]).
charlist([X],Y) :- atomic(X),name(X,Y).
charlist([F,','|Rest],L) :-
	name(F,L1), charlist(Rest,L2),
	append(L1,[44|L2],L), !.
charlist([F|R],L) :-
	name(F,L1), charlist(R,L2),
	append(L1,[32|L2],L).

append([],L,L).
append([X|Y],L1,[X|L]) :-
	append(Y,L1,L).

==== ecmi01/ff_rules.txt ====
% File: /usr/lib/prolog/teach/faultfiner/rules
% Author: Peter hammond, IC, 1982. Rewritten by Peter Ross
% Updated: 30 Nov 1983
% Purpose: the guts of FAULTFINDER.

% The only export is check_rule/3. This finds the final state
% of a fault by working recursively through the causes, and their
% causes...

check_rule(general, Fault, History) :-
	check_causes_of(Fault, History).
check_rule(specific, Fault, History) :-
	suggest_action_for(Fault),
	check_again_for(Fault, History).
check_rule(separable, Fault, History) :-
	suggest_action_for(Fault),
	test_action_for(Fault, Ans, History),
	pursue_causes_of(Fault, Ans, History).

%		***********************
%		* Machinery for rules *

==== ecmi01/recurse2.txt ====
/* generate integers */

is_int(0).
is_int(X) :-
         is_int(Y),
         X is Y+1.

/* generate pairs with sum X */

pair(X,X,0).
pair(X,N1,N2) :-
         X>0,
         X1 is X-1,
         pair(X1,N1,N3),
         N2 is N3+1.

/* generate Pythagorean triples */
pythag(X,Y,Z) :-
         is_int(A),
         pair(A,Y,Z),            % get a pair of numbers Y and Z
         Z>0,

==== ecmi01/ai2_simplify.txt ====
/* SIMPLIFY.
   The aim of the predicate simplify is to reshuffle expressions which
   are sums of unknowns (represented by Prolog atoms) and integers so
   that all the unknowns are at the start and the sum of all the
   integers is at the end, e.g.
         x+3+y+4+z      gets reshuffled to      x+y+z+7
   This is (a) useful in mathematical manipulations by computer
   and     (b) an illustration of a useful technique called
               "difference pairs".

   To summarise the idea: a structure such as +(a,+(b,c)) could be
   drawn as
                 +
                / \
               a   +
                  / \
                 b   c

   The idea is that when constructing such things you can represent
   intermediate stages as the "difference" of
                 +

==== ecmi01/ai2_findall.txt ====
findall(X,P,L) :-
         asserta(found([])),
         call(P),
         rec(X),
         fail.
findall(X,P,L) :-
         retract(found(L)),!.

rec(X) :-
         retract(found(L)),!,
         append(L,[X],L1),
         asserta(found(L1)).

append([],X,X).
append([X|L1],L2,[X|L3]) :- append(L1,L2,L3).

==== ecmi01/ff_readme.txt ====
This partitioned file contains the source of a very simple expert system called
FAULTFINDER, and a sample database for it to work on. A brief description
of the idea, though not of the program itself (which is pretty much common
sense), can be found in the file 'FF'. FAULTFINDER is really a general system,
and you need to create specific fault hierarchy descriptios for it to work on.
There is an example in ECMI01.FF_GASHEATER. Look at 'FF' to find out more.

The files in the partitioned file ECMI01.FF are

	README		this file
	EXPLAIN		the explanation sub-system
	FF		the file to read in to get everything else read in
                        It also has a terse description of the system.
	GASHEATER	the specific example (a gas water heater)
	LOAD		the routines to load a file such as 'GASHEATER'
	MAIN		the top level of FAULTFINDER
	RULES		the guts of FAULTFINDER
	UTILS		some utilities used in 'explain', 'main' and 'rules'

To get started, use 'util' so that member/2 and memberchk/2 are available:


==== ecmi01/oldai2_visiting.txt ====
% File: ECMI01.AI2_VISITING
% Author: Peter Ross
% Purpose: a simple database example
%
% This contains a baby database:
%	visiting(A,B)		meaning A is currently visiting B
%	at(A,Place)		meaning A is at Place
%	phone(Place, Number)	meaning the phone at Place is Number
% There is a predicate 'ring' which finds out which number to ring
% to get hold of a particular person, or vice-versa.

% ---- phone numbers -----

phone(place_a, 667-5770).
phone(place_b, 339-5390).
phone(place_c, 229-8901).
phone(place_d, 229-6031).
phone(place_e, 667-1011-2551).

% ---- some 'at' details ----


==== ecmi01/oldai2_diff.txt ====
:- op(700,xfx,:).
:- op(200,xfy,@).

go :- write('Want instructions? Type y or n and press return...'), nl,
      prompt(Old,'y/n? '),
      get(C), skip(10),
      tellall(C),
      prompt(Yn,'diff: '),
      dv.

tellall(C) :- (C=89;C=121),
         emas(ty,'ecmi01.ai2_diffnotes').
tellall(C).
dv :- repeat, read(T), (T=stop; derive(T), fail).

derive(T:X) :- T : X, !.

X : [U] :- X : U.
X : [U|V] :- d(X,U,W), simplify(W,Z), Z : [V].
X : Y :- d(X,Y,W), simplify(W,Z), nl, output(Z), nl, nl.


==== ecmi01/ai2_grulex.txt ====
/* Example of definite clause grammar, as given on the class handout */

expr(Z) --> term(Z).
expr(Z) --> term(X),"+",expr(Y),{Z is X+Y}.
expr(Z) --> term(X),"-",expr(Y),{Z is X-Y}.

term(Z) --> number(Z).
term(Z) --> number(X),"*",term(Y),{Z is X*Y}.
term(Z) --> number(X),"/",term(Y),{Z is X/Y}.

number(X) --> [C],{48=<C,C=<57,X is C-48}.
number(C) --> "+",number(C).
number(C) --> "-",number(X),{C is -X}.

==== ecmi01/oldai2_liza.txt ====
/*   Simple ELIZA
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
     Peter Ross 5-Nov-81
*/

:-(['ecmi25.util_readin']).       % load read_in + necessary support.

/* The top level: call liza (so named 'cos it's a mini-version of ELIZA)
   to get going.
   The predicate read_in reads in sentences, currently ending with a
   full stop, exclamation mark or question mark. Thus
         read_in(X)
   will read in
         hello there.
   as
         X = [hello,there,.]
   NOTE: use lower-case letters at the front of words, this is a simple
   beast!
*/


==== ecmi01/ai2_maze.txt ====
/* Maze.
   Peter Ross, 12-Nov-81.

   The database in this file describes a maze. All the cells are
   labelled with a letter and number, e.g. e2, f12 etc, except for
   the two called in and home. The predicate door(X,Y) means that
   there is a (two way) door between cells X and Y. The predicate
   move(X,Y) expresses the fact that the doors are two-way - it
   means you can move from cell X to cell Y in one move.

   Tasks:
         (1) show you CAN get from in to home.
         (2) find the shortest route
         (3) show you CAN'T get from in to home if the doors are
             only one way!

   NOTE: don't bother trying to draw the maze - (a) it has an
         idiosyncratic cell labelling scheme, and (b) it isn't
         two-dimensional!

*/

==== ecmi01/ai2_grtrans.txt ====
expr(Z,S0,S) :- term(Z,S0,S).
expr(Z,S0,S) :- term(X,S0,S1),c(S1,43,S2),expr(Y,S2,S),Z is X+Y.
expr(Z,S0,S) :- term(X,S0,S1),c(S1,45,S2),expr(Y,S2,S),Z is X-Y.

term(Z,S0,S) :- number(Z,S0,S).
term(Z,S0,S) :-
         number(X,S0,S1),c(S1,42,S2),
         write('s2 '),write(S2),nl,
         write('s  '),write(S),nl,
         term(Y,S2,S),
         write('y  '),write(Y),nl,
         write('x  '),write(X),nl,
         integer(X),integer(Y),
         Z is X*Y.
term(Z,S0,S) :- number(X,S0,S1),c(S1,47,S2),term(Y,S2,S),Z is X/Y.

number(X,S0,S) :- c(S0,C,S),48=<C,C=<57,X is C-48.
number(X,S0,S) :- c(S0,43,S1),number(X,S1,S).
number(X,S0,S) :- c(S0,45,S1),number(Y,S1,S),X is -Y.

==== ecmi01/tprover.txt ====
:- op(700,xfy,eqv).
:- op(650,xfy,imp).
:- op(600,xfy,or).
:- op(550,xfy,and).
:- op(500,fy,not).
false(f) :- !.
false(not t) :- !.
false(P eqv Q) :- false((P imp Q) and (Q imp P)).
false(P imp Q) :- false(Q or not P).
false(P or Q) :- false(P), false(Q).
false(P and Q) :- (false(P) ; false(Q)).
false(not not P) :- false(P).
false(not(P eqv Q)) :- false(not(P imp Q) or not(Q imp P)).
false(not(P imp Q)) :- false(not(Q or not P)).
false(not(P or Q)) :- false(not P and not Q).
false(not(P and Q)) :- false(not P or not Q).

theorem(T) :- (false(T), write('false'),!;write('true')),nl.

==== ecmi01/robot51.txt ====
.pg 5.1 2-D silhouette vision
This section describes how various sorts of information can be extracted from 
a simple silhouette image, i.e. an image consisting essentially of a 
rectangular array of values each either 0 (representing a point not part of
the image of some object) or 1 (representing a point that is part of some 
object). Consider, for example, this image of the letter 'T':
.nf
.sp 1
                        00000000000000000000000000
                        00000011111111111100000000
                        00000011111111111100000000
                        00000000001111000000000000
                        00000000001111000000000000
                        00000000001111000000000000
                        00000000001111000000000000
                        00000000001111000000000000
                        00000000000000000000000000
.sp 1
.fi
It conveniently fits the frame of the image and is aligned nicely with the 
sides, which shows that it is an artificial example. The 234 values that make

==== ecmi02/winst_arch1prb.txt ====
/*arch1.prb
Winston arch domain
Alan Bundy 5.12.80
use with winston
version with functions */


/* description trees */

tree(shapetree,1,shape(prism(wedge,block),pyramid)).

tree(touchtree,2,touchrel(separate,touch(marries,abuts))).
default(touchtree,separate). % default predicate

tree(orienttree,1,orientation(lying,standing)).

tree(directiontree,2,direction(leftof,rightof)).

tree(supporttree,2,undef(supports,unsupports)).



==== ecmi02/nl_xnl.txt ====
xnl
atn
atnold
eliza
elizanew
parse
qa
.END




==== ecmi02/nl_eliza.txt ====
/*eliza*/
/*natural language conversational program
Alan Bundy 15.11.79*/


/*variable marker*/
:- op(500,fx,[?]).

/*top level*/
eliza :- read_in(Input), eliza(Input).

eliza([bye,.]) :- !.

eliza(Input) :- sr_pair(S,R),
        match(Input,S,off,Subst),
        replace(R,Subst,Output),
        print_list(Output), eliza.

/*associative one way matcher*/
match([],[],off,[]).


==== ecmi02/nl_parse.txt ====
/*parse*/
/*acceptor and parser for sentences from ATN
Alan Bundy 29.11.79
use with readin*/


/*Acceptor Top Level*/
accept :- read_in(Text), accept(Text).

accept(Text) :- accept_part(Text,sentence,start,[]).

/*Accept part of a sentence*/
accept_part(Text,ATN,finish,Text) :- !.

accept_part([Word|Rest],ATN,start,Rest) :-
        arc(ATN,start,finish,Word,t).

accept_part(Text,ATN,Node,Rest) :-
        arc(ATN,Node,Next,SubATN,nt),
        accept_part(Text,SubATN,start,Text1),
        accept_part(Text1,ATN,Next,Rest).

==== ecmi02/teach_randomold.txt ====
/*random*/
/*Random number generator
Alan Bundy 22.11.79*/

/*Get random Num in Range*/
random(Range,Num) :-
        seed(Seed), random(Range,Seed,Num).

/*Get Num ffrom Seed first time*/
random(Range,Seed,Num) :- Num is (Seed mod Range) + 1.

/*Grow Num on subsequent occasions*/
random(Range,Seed,Num) :-
        NewSeed is 125*Seed + 1,
        random(Range,NewSeed,Num).

/*random number seed*/
seed(13).

/*Choose random element of list*/
random_pick(List,El) :-

==== ecmi02/plan_expon.txt ====
/*----- Synthesis of an exponentiation routine -----*/

:-op(700,xfx,=/=).


X after test(X,U) :- X after_test U.

w:loop(U,V,W) after loop(U,V,W).

R:X1*X2 after mult(R,R1,R2,X1,X2).
R:X1-X2 after subtc(R,R1,X2,X1) :- const(X2).
R:X1/X2 after divc(R,R1,X2,X1) :- const(X2).


zero(X) after_test zero(R,X).
even(X) after_test even(R,X).


test(X,U) needs C :- U needs C.
if(_,_,C,_) needs C.


==== ecmi02/math_divide.txt ====
/* DIVIDE.

Test example for SEMANT and MODEL
Clauses and Model for not divides example (see notes p124)

Alan Bundy  22.6.81 */

/* Clauses */

clause(right, [not_div(X*Z,Y)], [not_div(X,Y)], input). % Input clauses

clause(left, [not_div(Z*X,Y)], [not_div(X,Y)], input).

clause(thirty, [equal(30,2*3*5)], [], input).

clause(hypothesis, [not_div(5,a)], [], input).


clause(conclusion, [], [not_div(30,a)], topclause).     % Top clause



==== ecmi02/evans_evans.txt ====
/*evans*/
/*Evan's Geometric Analogy Program - Rational Reconstruction*/
/*Alan Bundy 26.10.79*/


/*top level program*/
evans(FigA,FigB,FigC,AnsList,Ans) :-
        find_rule(FigA,FigB,Rule), rule_is(Rule),
        apply_rule(Rule,FigC,AnsObjs,AnsRels,Sims),
        ans_desc(AnsObjs,AnsRels,Sims),
        select_result(FigC,AnsList,AnsObjs,AnsRels,Sims,Ans),
        ans_is(Ans).


/*find rule given figures*/
find_rule(FigA,FigB,Rule) :-
        relations(FigA,Source), relations(FigB,Target),
        objects(FigA,Alist), objects(FigB,Blist),
        similarities(FigA,FigB,Triples),
        select_set(Triples,Matches),
        takeaway1(Alist,Matches,Removals),

==== ecmi02/math_semant.txt ====
/* SEMANT.

A Depth First Theorem Prover
with vetting by use of interpretations and
incorporating input restriction.
Use with MODEL
DIVIDE contains test example

Alan Bundy 22.6.81 */


/* Top Goal */

go :-
        clause(Goal,_,_,topclause),     % Find the top clause
        semantic(Goal).                 % and away you go


/* Depth first theorem prover */
semantic(Old) :-
        successor(Old,New),     % Find a successor to the current clause

==== ecmi02/nl_atnold.txt ====
/*atn*/
/*generation of random sentences from an ATN
Alan Bundy 19.11.79
use with eliza (for print_list)*/


/*Top Level*/
generate :- generate(sentence,start,Sentence), print_list(Sentence), fail.

generate(ATN,finish,[]).

generate(ATN,Node,[Word|Rest]) :-
        arc(ATN,Node,NewNode,Word,t),
        generate(ATN,NewNode,Rest).

generate(ATN,Node,Sent) :-
        arc(ATN,Node,NewNode,SubATN,nt),
        generate(SubATN,start,SubBit),
        generate(ATN,NewNode,Rest),
        append(SubBit,Rest,Sent).


==== ecmi02/winst_archprb.txt ====
/*arch.prb
Winston arch domain
Alan Bundy 5.12.80
use with winston */

/* space of description trees */
space(arch,[shapetree,touchtree,orienttree,directiontree,supporttree]).


/* description tree */

tree(shapetree,1,shape(prism(wedge,block),pyramid)).

tree(touchtree,2,touchrel(separate,touch(marries,abuts))).
default(touchtree,separate). % default predicate

tree(orienttree,1,orientation(lying,standing)).

tree(directiontree,2,direction(leftof,rightof)).

tree(supporttree,2,undef(supports,unsupports)).

==== ecmi02/emas4#mung.txt ====


%% NEXT FILE %%

nextfl
,dska:emas4.ccl
,nextfl
,dska:infer.[400,405,teach]
,nextfl
,dska:mandc.[400,405,teach]
,nextfl
,dska:random.[400,405,teach]
,nextfl
,dska:random.old[400,405,teach]
,nextfl
,dska:read.[400,405,teach]
,nextfl
,dska:readin.[400,405,teach]
,nextfl
,dska:figure.[400,405,teach,evans]
,nextfl

==== ecmi02/math_skolem.txt ====
/* SKOLEM.

Skolem Normal Form Procedure
(FORMUL contains test examples)

Alan Bundy 17.3.79 */


/*operator declarations*/

:- op(400,xfy,;).               % Disjunction

:- op(300,xfy,<->).             % Double Implication

:-op(400,xfy,->).               % Implication


/*skolem normal form*/

skolem(Sentence,NormalForm) :- !,               % Normal calling pattern
        skolem(Sentence,NormalForm,[],0).       % assume no free vars and being asserted

==== ecmi02/winst_xwinst.txt ====
xwinst
archprb
arch1prb
blockprb
isolprb
pairprb
winst
.END




==== ecmi02/teach_mandc.txt ====
/*mandc
Missionaries and Cannibals program
Alan Bundy 6.11.79*/


/*top level*/
mandc :- gofrom([3,3,1],[0,0,0],[]).

gofrom([0,0,0],Right,OldLefts) :- writef('which is goal state\n \n',[]).

gofrom(Left,Right,OldLefts) :-
        legal(Left), legal(Right),
        not(member(Left,OldLefts)),
        applymove(Left,Right,[ML,CL,BL],[MR,CR,BR]),
        writef('\nThe left bank now contains %t  missionaries and %t cannibals \n',[ML,CL]),
        writef('The right bank now contains %t missionaries and %t cannibals \n',[MR,CR]),
        gofrom([ML,CL,BL],[MR,CR,BR],[Left|OldLefts]).

gofrom(_,_,_) :- writef('Backing up one move \n',[]), fail.

/*decide which way to move*/

==== ecmi02/winst_pairprb.txt ====
/*pair.prb              It is difficult for the untrained fisher
Winston arch domain     to follow examples of this complexity so
Alan Bundy 5.12.80      here is a simple concept: two wedges.
use with winston */

/* space of description trees */
space(pair,     %  each concept must have a space; is this **right**?
        [shapetree,touchtree,orienttree]).


/* description tree */

tree(shapetree,1,shape(wedge,block)).

tree(touchtree,2,touchrel(separate,touch)).

tree(orienttree,1,orientation(lying,standing)).


%   Examples


==== ecmi02/plan_wplanc.txt ====
/* WARPLAN-C CONDITIONAL PLAN GENERATOR */


plans:-plan_from(start,_).

plan_from(T0,A):-
   want C,
   consistent(C,A),
   plan(C,void,T0,P,T,A,[]),
   other_cases(T,P,A,exit).

plan(X1&X2,P0,T0,P,T,A,G):-!,
   plan(X1,P0,T0,P1,T1,A,G),
   plan(X2,P1,T1,P,T,A,G).
plan(X,P0,T0,P,T0,A,G):-
   (always X,P=P0; holds(X,T0),setadd(X,P0,P)).
plan(X,_,_,_,_,A,_):-minimality_violation(X,A),!,fail.
plan(X,_,T0,_,_,_,G):-recorded(loopcheck,Type,_),
   (Type=weak,mkground(X,0,_);Type=strong),
   listel(X:T0,G),!,fail.
plan(X,P0,T0,P,T,A,G):-

==== ecmi02/math_rewrit.txt ====
/* REWRIT.

Simple depth first search rewrite rule system
see Artificial Mathematicians p 104.
Use with UTIL

Alan Bundy  10.7.81 */


/* Find Normal Form of Expression */

normalize(Expression, NormalForm) :-    % To put an expression in normal form:
        rewrite(Expression, Rewriting),         % Rewrite it once
        normalize(Rewriting, NormalForm).       % and recurse

normalize(Expression, Expression) :-    % The expression is in normal form
        not rewrite(Expression, _).     % if it cannot be rewritten


/* Rewrite Rule of Inference */


==== ecmi02/teach_random.txt ====
/*random*/
/*Random number generator
Alan Bundy 22.11.79*/

/*Get Num from Seed and update seed*/
random(Range,Num) :-
        seed(Seed),
        Num is (Seed mod Range) + 1,
        retract(seed(Seed)),
        NewSeed is 125*Seed+1,
        assert(seed(NewSeed)).


/*random number seed*/
seed(13).

/*Choose random element of list*/
random_pick(List,El) :-
        length(List,L), random(L,N), nth(N,List,El).

/*find nth element of a list*/

==== ecmi02/math_breadt.txt ====
/* BREADTH.

A Breadth First Search Theorem Prover.
EQUAL contains test example.

Alan Bundy 16.6.81 */


/* Top Goal */

go :- breadth(0).


/* Breadth First Search Strategy */

breadth(N) :-
        N1 is N+1,                      % Calculate new depth
        repeat(resolve(input,N,N1)),    % Form all resolvants at that depth
        repeat(resolve(N,input,N1)),
        breadth(N1).                    % and recurse


==== ecmi02/math_formul.txt ====
/* FORMUL.

Test Formulae for SKOLEM program

Alan Bundy 23.6.81 */


test1(Ans) :-
        skolem( all(a, all(b, all(c, some(x, a*xf2 + b*x + c = 0)))), Ans).

test2(Ans) :-
        skolem( all(m, some(delta, all(x, (abs(x)=<delta) -> (1/x)>m))), Ans).




==== ecmi02/plan_xplan.txt ====
xplan
expon
wplanc
wpo
.END




==== ecmi02/evans_figure.txt ====
/*figures*/
/*test descriptions for evans program*/
/*Alan Bundy 26.10.79*/

problem1(Ans) :- evans(figa,figb,figc,[fig1,fig2,fig3,fig4,fig5],Ans).
problem2(Ans) :- evans(figa,figb,figc,[fig1,fig2,fig3,fig4a,fig5],Ans).
problem3(Ans) :- evans(figa,figb,figc,[fig1,fig2,fig3,fig5],Ans).


objects(figa,[tri1,tri2]).
relations(figa,[[inside,tri1,tri2]]).

objects(figb,[tri3]).
relations(figb,[]).

similarities(figa,figb,[[tri2,tri3,direct], [tri1,tri3,[scale,2]]]).

objects(figc,[square,circle]).
relations(figc,[[inside,square,circle]]).



==== ecmi02/plan_wpo.txt ====
:-op(950,xfx,[after,needs,affects,after_test,if]).
:-op(950,fx,[always,never,initially,want]).
:-op(900,xfy,&).
:-op(700,xfx,:).
:-op(600,fx,\).



==== ecmi02/math_unify.txt ====
/* UNIFY.

Unification procedure for first order logic (with occurs check)
See p80 of Artificial Mathematicians.

Alan Bundy 10.7.81 */


/* Top Level */

unify(Exp1, Exp2, Subst) :-             % To unify two expressions
        unify(Exp1, Exp2, true, Subst). % Start with empty substitution


/* Unify with output and input substitutions */

unify(Exp, Exp, Subst, Subst).          % If expressions are identical, succeedd

unify(Exp1, Exp2, OldSubst, AnsSubst) :-        % otherwise
        disagree(Exp1,Exp2,T1,T2),      % find first disagreement pair
        make_pair(T1,T2,Pair),          % make a substitution out of them, if pos

==== ecmi02/math_boyer.txt ====
/* BOYER.

                                                Leon Sterling
                                                Updated: 24 July 81

A simple Boyer-Moore theorem prover as in
                Chap. 11 The Productive Use of Failure
                in 'Artificial Mathematicians'.

        The code written here is a simplified version of the algorithm
described in a paper of J Moore
'Computational Logic: Structure Sharing and Proof of Program Properties',
Xerox report CSL 75-2, which appeared also as Dept. of Computational Logic
memo no. 68, and the second part of Moore's Ph.D. thesis.
This is a simplified version of the theorem-prover described in the book
'A Computational Logic' by Boyer and Moore.

        Variable and procedure names have been chosen to be the same
as much as possible, and the mini-projects will be aided by the description
in the paper.


==== ecmi02/nl_qa.txt ====
/*qa*/
/*Question Answering system based on Eliza
Alan Bundy 16.11.79
use with readin, eliza and infer*/


/*top level*/
qa :- read_in(Input), qa(Input).

qa([bye,.]) :- !.

qa(Input) :-
        translate(Input,Desc,Type), answer(Type,Desc), qa.

/*translation*/
translate(Input,Desc,Type) :-
        sm_triple(S,D,Type), match(Input,S,off,Subst),
        replace1(Subst,D,Desc).

/*replace variables by phrases in description*/
replace1(Subst,Word,Word) :- (atomic(Word); var(Word)), !.

==== ecmi02/winst_isolprb.txt ====
/* isol.prb
Definition of Isolation space and examples for Winston Program
Alan Bundy 18.2.81 */

/* Predicate Trees */

tree(occurtree,2,occur_rel(freeof,contains(singleocc,multocc))).
default(occurtree,freeof).

tree(simtree,2,sim_rel(different(unrelated,inverse),ident)).
default(simtree,unrelated).


/* Examples and near Misses */

specimen(isol1, [singleocc(x,expr_at([1,2],before)),
                freeof(x,expr_at([1,1],before)),
                freeof(x,expr_at([2],before)),
                ident(expr_at([1,1],before),expr_at([2,1],after)),
                ident(expr_at([1,2],before),expr_at([1],after)),
                ident(expr_at([2],before),expr_at([2,2],after)),

==== ecmi02/math_simple.txt ====
/* SIMPLE.

Using PROLOG as a theorem prover:
An equality axioms example.
Try goal 'equal(y,x).'.

Alan Bundy  16.6.81 */


equal(x,y).             % The Hypothesis

equal(X,X).             % The Reflexive Axiom

equal(U,W) :- equal(U,V), equal(W,V).   % The Twisted Transitivity Axiom


/* MINI-PROJECTS

1. Try goal ?- equal(y,x).

2.  Experiment by switching the order of the above axioms and trying

==== ecmi02/math_xmath.txt ====
xmath
boyer
breadt
divide
equal
formul
heuris
model
rewrit
semant
simple
skolem
unify
.END




==== ecmi02/math_heuris.txt ====
/* HEURIS.

A Heurisitic Search Theorem Prover.
EQUAL contains test example.

Alan Bundy 19.6.81 */


/* Top Goal */

go :-
        clause(Goal,_,_,topclause),
        heuristic([Goal]).


/* Heuristic Search Strategy */

heuristic(Fringe) :-
        pick_best(Fringe,Current,Rest),         % Pick the clause with best score
        findall(Clause,successor(Current,Clause),NewClauses),   % findall its successors
        append(Rest,NewClauses,NewFringe),      % Put them on fringe

==== ecmi02/teach_read.txt ====
/*read file term by term*/
foo :- see(mandc), repeat, read(T), write(T), nl,
        T=(:-end), seen.




==== ecmi02/nl_elizanew.txt ====
/*   Simple ELIZA
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
*/

:- [readin].    %  load read_in(-) adn its support.

:- public eliza/0. :- mode eliza.

eliza :-
        read_in(Input),
        mandatory_substitutions(Input, Clean),
        Clean \== [bye,.],
        rule(Given, Yield),
        match(Given, Clean),
        reply(Yield), nl, !,
        eliza.
eliza :-
        write('I hope I have helped you.'), nl.

:- mode mandatory_substitutions(+, -), idiom(+, -).

==== ecmi02/teach_infer.txt ====
/*infer*/
/*LOGO type inference package
Alan Bundy 16.11.79*/


/*infer fact by backwards inference*/
infer(Goal) :- infer(Goal,now).

infer(Goal,Sit) :- fact(Goal,Sit).

infer(Goal,Sit) :-
        backward_rule(Ant,Goal), infer(Ant,Sit).

infer(Goal1&Goal2,Sit) :-
        infer(Goal1,Sit), infer(Goal2,Sit).

/*assert fact and trigger forwards inference*/
assert_fact(Fact) :- assert_fact(Fact,now).

assert_fact(Fact,Sit) :-
        assert(fact(Fact,Sit)),

==== ecmi02/math_model.txt ====
/* MODEL.

How to evaluate a clause in an interpretation
(provided it is variable free!!)
use with SEMANT
DIVIDE contains test examples

Alan Bundy 22.6.81 */


/* Vet the clause in any interpretations */

vet(Clause) :-
        not satisfiable(Clause).        % Clause has no model


/* Clause is satisfiable in some Interpretation */

satisfiable(Clause) :-
        interpretation(Interp),         % If there is an interpretation
        model(Interp,Clause),           % in which Clause is true

==== ecmi02/winst_winst.txt ====
/*winst
Rational Reconstruction of Winston Learning Program
Alan Bundy 1.12.80
Version for functions */

/* Top Level Program - learn new concept */
/* ------------------------------------- */

/*First time only accept an example */
winston(Concept) :- !,
        writef('Please give me an example of a %t \n', [Concept]),
        read(Ex), nl,
        make_rec(Concept,Ex,EObjs,ERec),
        maplist(gensym1(plato),EObjs,CObjs),
        make_subst(EObjs,CObjs,Subst),
        subst(Subst,ERec,CRec),
        maplist(add_ups,CRec,CDefn),
        assert(definition(Concept,CObjs,CDefn)),
        winston1(Concept).

/* Is grey area in definition eliminated? */

==== ecmi02/nl_atn.txt ====
/*atn*/
/*generation of random sentences from an ATN
Alan Bundy 19.11.79
use with random*/


/*Top Level*/
generate :- generate(sentence,start),
        writef('\n\n',[]),
        generate.

generate(ATN,finish).

generate(ATN,Node) :-
        arc(ATN,Node,Choices),
        random_pick(Choices,[NewNode,Label,Type]),
        gen(Type,Label,ATN,NewNode).


gen(atn,SubATN,ATN,NewNode) :-
        generate(SubATN,start),

==== ecmi02/teach_xteach.txt ====
xteach
infer
mandc
read
readin
random
randomold
.END




==== ecmi02/evans_xevans.txt ====
xevans
evans
figure
.END




==== ecmi02/winst_blockprb.txt ====
/*block.prb
Winston block domain - simple test example
Alan Bundy 6.12.80
use with winston */


/* space of description tree(s) */
space(block,[shapetree]).

/* description tree(s) */
tree(shapetree,1,shape(prism(wedge,block),pyramid)).

/* Example and near miss */
specimen(block1,[block(a)]).

specimen(wedge1,[wedge(b)]).




==== ecmi02/teach_readin.txt ====
/* Read a sentence */

 :- mode initread(-).
 :- mode readrest(+,-).
 :- mode word(-,?,?).
 :- mode words(-,?,?).
 :- mode alphanum(+,-).
 :- mode alphanums(-,?,?).
 :- mode digits(-,?,?).
 :- mode digit(+).
 :- mode lc(+,-).

 :- module(readin,[read_in(1)]).

/* Read sentence */

read_in(P):-initread(L),words(P,L,[]),!.

initread([K1,K2|U]):-get(K1),get0(K2),readrest(K2,U).

readrest(46,[]):-!.

==== ecmi02/math_equal.txt ====
/* EQUAL.

Test example for BREADT and HEURIS.
Symmetry can be inferred from reflexivity and twisted transitivity
(notes p62).

Alan Bundy  22.6.81 */

clause(hypothesis, [equal(x,y)], [], input ).   % Input clauses
clause(reflexive,  [equal(X,X)], [], input ).
clause(twisted,    [equal(U,W)], [equal(U,V), equal(W,V)], input ).

clause(goal,       [], [equal(y,x)], topclause).        % Top clause




==== ecmi04/scrnlpl.txt ====
%   File   : nlproj.pl
%   Author : Alan Bundy ?
%   Written: ?
%   Updated: 24 January 1985
%   Purpose: a simple RTN grammar sentence generator for AI1 project

%  Taken from file rtn.pl:-

/* generation of random sentences from an rtn */

/* use with random and drinks */

/*top level*/
go :- generate(sentence,start),         /* generate a sentence from start */
      nl,nl.                            /* and print 2 new lines */

generate(RTN,finish).                   /* if at finish then do nothing */

generate(RTN,Node):-                    /* to generate RTN from node */
      arc(RTN,Node,Arcs),               /* find all arcs leaving node */
      random_pick(Arcs,[NewNode,Label,Type]),  /* pick one at random*/

==== ecmi04/trpai1.txt ====
recall
zm-.Emas Prolog                version 4.zm-.Command:.f<red>e
mail compose
ecmi52
student log
@red
y
q
destroy red
.endjob

==== ecmi04/trpai2.txt ====
%external %routine ai1prolog (%string (255) s)
%external %routine %spec obeyjob (%string (255) s)
%external %routine %spec prolog (%string (255) s)
prolog (s)
obeyjob ("ecmi04.trpai1")
%end
%end %of %file

==== ecmi04/winston_winst.txt ====

(Message 1)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:04:30-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:05:26 gmt
Msg ID:   <132001-454-212@EDXA>

--------
/* winst

Consulting all focussing files
Alan Bundy 8.7.82 */

?- [
	conn,		/* operator declarations */
	focus,		/* top level stuff */
	makerc,		/* make records from specimens */
	classi,		/* classify as exs, non-exs or grey */
	learn		/* and apply focussing */
	].

==== ecmi04/appen1pgp.txt ====
;[6{

                                                 217








APPENDIX A


                      EDITING COMMANDS, STORIES AND NOTES ON THE CHILDREN




                     This appendix contains:

[48{



==== ecmi04/chap6pgp.txt ====
;[6{

                                                 131








CHAPTER 7


                               DETAIL OF THE EDITCOST AND PHONCODE PROGRAMS




                       7.1. Introduction

[48{



==== ecmi04/random.txt ====
/* Random number generator */

random_pick(List,El):-                  /* to pick random element from a list*/
      length(List,L),
      random(L,N),
      nth(N,List,El).

random(Range,Num):-                     /* to choose random number in range */
      seed(Seed),                       /* get seed from database */
      Num is (Seed mod Range) + 1,      /* fit seed into range */
      retract(seed(Seed)),              /* delete old value of seed */
      NewSeed is (125*Seed+1) mod 4093, /* calculate new value*/
      assert(seed(NewSeed)).            /* and assert it into database */

seed(13).                               /* random number seed database entry */

/* to get the nth element of list */

nth(1,[Hd|T],Hd):- !.                   /* if n is i then return first element*/

nth(N,[Hd|T],El):-                      /* otherwise*/

==== ecmi04/exer_print.txt ====
/* Practical example - 28th February 1984 -  Helen Pain */
/* AI1 */


/* Consult the file   'ecmi04.printexs'     */

/* this file contains some examples of input and output
   using read and write */

/* type go to start */

go:-
      write('remember to terminate your input with a full stop'),nl,
      nl,nl,
      process_atom, nl,
      process_atom, nl,
      process_atom, nl,nl,
      process_list, nl,nl,
      process_string, nl,nl,
      process_clause, nl,nl.


==== ecmi04/winston_conn.txt ====

(Message 2)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:04:47-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:06:00 gmt
Msg ID:   <132001-454-275@EDXA>

--------
/* CONN.

Operator Declarations for Logical Connectives
Alan Bundy 27.8.82 */

:- op(980,xfy,['->','<->']).	/* implication and equivalence */
:- op(850,xfy,v).		/* disjunction */
:- op(710,fy,~).		/* negation */

--------


==== ecmi04/family.txt ====
mother(mary,tom).
mother(mary,jane).
mother(mary,fred).
father(tom,jim).
father(tom,sue).
father(fred,cecil).

female(mary).
female(jane).
male(tom).
male(jim).
female(sue).
male(cecil).
male(fred).

parent(Parent,Child):-
        father(Parent,Child).
parent(Parent,Child):-
        mother(Parent,Child).
son(Son,Person):-
        parent(Person,Son),

==== ecmi04/winston_arch3prb.txt ====

(Message 5)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:05:54-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:09:59 gmt
Msg ID:   <132001-454-610@EDXA>

--------
/* arch2.prb
Winston arch domain 
Alan Bundy 5.12.80
use with winston */

/* space of description trees */
space(arch,[shapetree,touchtree,orienttree,directiontree,supporttree]).


/* description tree */

tree(shapetree,1,shape(prism(wedge,block),pyramid)).

==== ecmi04/trp1.txt ====
recall
zm-.Emas Prolog.zm-.Command:myprolog.f<red>e
mail compose
ECMI04
student log
@red
y
q
destroy red
.endjob

==== ecmi04/trp2.txt ====
%external %routine myprolog (%string (255) s)
%external %routine %spec obeyjob (%string (255) s)
%external %routine %spec prolog (%string (255) s)
prolog (s)
obeyjob ("ecmi04.trp1")
%end
%end %of %file

==== ecmi04/useful.txt ====
append([],L,L).
append([H|L1],L2,[H|L3]):-
      append(L1,L2,L3).


member(H,[H|_]).
member(H,[_|T]):-
      member(H,T).


rev(L,Revl):-
      rev(L,[],Revl).

rev([],L,L).
rev([H|L1],L2,M):-
      rev(L1,[H|L2],M).

nexto(X,Y,[X,Y|_]).
nexto(X,Y,[_|Z]):-
      nexto(X,Y,Z).


==== ecmi04/exsent.txt ====

29th January 1985                             Helen Pain

        Exercise for week 4, term 2: sentence generator.

        (also basis for Natural Language AI1 project)

Log on to EMAS. Get into PROLOG. Consult the following files:

                 ['ecmi04.rtn'].
                 ['ecmi04.random'].
                 ['ecmi04.drinks'].

Copy them to your own area before you run prolog.

The file 'rtn' contains a sentence generator to be used with an rtn
grammar representation.
The grammar itself is stored in the file 'drinks'.
The file 'random' contains a number of 'utilities' - other generally
useful predicates.


==== ecmi04/exer_greet.txt ====
greet([]).

greet([X|Y]):-
      greet(X),
      greet(Y).

greet(X):-
      write('Hello'),
      tab(1),
      write(X),
      nl.

prstring([]).
prstring([X|Y]):-
      put(X),
      prstring(Y).

greetstr(X):-
      write('Hello'),
      tab(1),
      prstring(X),

==== ecmi04/ai1_drinks.txt ====
/* Example rtn */

/* sentence rtn */
arc(sentence,start,[[a,nounphrase,rtn]]).
arc(sentence,a,[[b,verb,rtn]]).
arc(sentence,b,[[c,nounphrase,rtn]]).
arc(sentence,c,[[finish,stop_mark,rtn]]).

/* nounphrase rtn */
arc(nounphrase,start,[[finish,proper_noun,rtn],[a,determiner,rtn]]).
arc(nounphrase,a,[[finish,noun,rtn],[a,adjective,rtn]]).

/* verb rtn */
arc(verb,start,[[finish,is,word],[finish,drinks,word],[finish,buys,word],
[finish,refuses,word],[finish,has,word],[finish,consumes,word]]).

/* determiner rtn */
arc(determiner,start,[[finish,a,word],[finish,an,word],[finish,the,word]]).

/* noun rtn */
arc(noun,start,[[finish,vicar,word],[finish,policeman,word],[finish,drinks,word]

==== ecmi04/getstart.txt ====
SETMODE LOWER
SETMODE FLOW=ON

==== ecmi04/acknowfnl.txt ====
@part(ackn, root "thesis.mss")
@style(spacing 1)
@pageheading(immediate)
@begin(Titlepage)
@begin(titlebox)
@majorheading(A Computer Tool for Use by Children with 
Learning Difficulties in Spelling)



@majorheading(Helen Pain)

@end(titlebox)

@begin(researchcredit)
@heading(Ph.D.)
@heading(University of Edinburgh)
@heading(1985)
@end(researchcredit)
@end(titlepage)
@prefacesection(Abstract)

==== ecmi04/projs85_quip.txt ====
%   File   : QUIP
%   Author : Dave Plummer
%   Written: 23 January 1985
%   Updated: 24 January 1985
%   Purpose: simple resolution theorem prover for AI1 project


%	The code in this file implements QUIP (QUIck Prover), a resolution 
%	theorem prover, in PROLOG.  For those unfamiliar with theorem
%	proving a quick explanation is given below, for more detail see
%	"The Computational Modelling of Mathematical Reasoning" by Alan Bundy.
%	
%	QUIP proves theorems in a subset of propositional calculus.  In this
%	calculus, propositions are represented by proposition letters, eg
%	a, b, f etc;  Each letter may be thought of as abbreviating an 
%	assertion about the world which is either true or false eg: 
%	
%	"AI is the most interesting subject taught at Edinburgh University",
%	"Theorem proving is the most interesting area of AI",
%	"PASCAL is the best programming language in existence"
%	

==== ecmi04/ai1_colourmap.txt ====
% File: ECMI01.AI2_COLOURMAP
% Author: Leon Sterling
% Updated: 17 November 83
% Purpose: simple depth first search of a set of possibilities
% Needs: UTIL for member/2

% The top level is test/0.
%
% This procedure colours a map so that no two adjoining countries have
% the same colour. It is a famous theorem in mathematics, recently
% proved, that four colours are enough. It is illustrated with the
% map of Europe.
%   The program works by taking each country in turn and trying to put
% it on the map. It checks the country's neighbours to see which of
% the colours can still be used. It stops when all the countries have
% been coloured. With 4 colours and 10 countries there are at most
% 1,048,576 combinations to try!
%   assign_colours(CountriesToDo, MapSoFar, Answer) is intended to have
% as its first argument a list of the countries not yet dealt with, and
% as its second argument a list of the countries coloured so far, together
% with their colours, in the form [ ..., Country=Colour, ...]. The third

==== ecmi04/tpproject.txt ====

(Message 83)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 30-Jan-85 22:59:37-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 30 Jan 85  23:01:21 gmt
Msg ID:   <132017-752-421@EDXA>

--------



       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER
       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER
       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER


                                                          Dave Plummer
                                                       30 January 1985


  Quip  is  a  resolution  theorem  prover written in PROLOG.  In this
project you are asked to investigate and understand the code,  and  to

==== ecmi04/appen3pgp.txt ====
;[6{

                                                 246








APPENDIX C

CORPUS OF ERRORS - BOTH STUDIES




                                        STUDY 1 - ERRORS


                     GQ
shipwright      shipright     heard           herd

                     design          desin         scraping        sraping

==== ecmi04/ai1_sentence.txt ====
% File: ECMI01.AI2_SENTENCE
% Author: Peter Ross and others
% Purpose: a simple-minded way of reading in a sentence
% Needs: UTIL for memberchk/2.

% Top-level goal is sentence/1. When it has succeeded the variable
% will be instantiated to a list of atoms representing the words
% typed in - e.g. if you type "who are you?" then sentence/1 will
% instantiate its argument to the list [who, are, you, ?].
%
% Procedures which read things in character by character are slightly
% more tricky than many others to design, because it is important not
% to backtrack over a get/1 goal. If that happens, the character it had
% previously read will be lost.
%
% In the program below, words/2 has an ASCII code as first argument. The
% second argument will be instantiated to the list of atoms corresponding
% to the typed sentence, starting with the given character. The first two
% words/2 clauses therefore define how the end of the sentence is defined.



==== ecmi04/chap2bpgp.txt ====
;[6{

                                                      47








CHAPTER 3

REVIEW OF THE COMPUTING LITERATURE




                       3.1. Introduction

[48{



==== ecmi04/debug.txt ====

/* DEBUG : an experimental debugger.

						Dave Bowen
						Updated: 19 January 1984

This is an experimental Prolog debugger.  I would be most interested in
comments as to whether any features of it are found to be more useful or less
useful than those in the existing debugger.  Currently it only allows user 
interaction at the CALL port of a procedure.

The predicates offered are

	debug/1		invokes the debugger on a specified goal
	tracing/0	(cf trace/0) switches trace mode on (the default)
	notracing/0	(cf notrace/0) switches trace mode off
	spying/1	(cf spy/1) sets a spypoint
	nospying/1	(cf nospy/1) removes a spypoint
	spying/0	(cf debugging/0) lists current spypoints

Note that spying/1 and nospying/1 take the same variety of forms of argument

==== ecmi04/allwinston.txt ====
>>>>ARCH3PRB<<<<

(Message 5)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:05:54-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:09:59 gmt
Msg ID:   <132001-454-610@EDXA>

--------
/* arch2.prb
Winston arch domain 
Alan Bundy 5.12.80
use with winston */

/* space of description trees */
space(arch,[shapetree,touchtree,orienttree,directiontree,supporttree]).


/* description tree */


==== ecmi04/toemas.txt ====


             March 1984                                  Helen Pain
             AI1             NOTES ON USING EMAS

  Quick      [this note assumes lower case and nobrackets options]
 Reference
             1. LOGGING ON

 LOGGING     First find yourself a terminal, switch it on, and press the
   ON        space bar a few times. You should get a prompt for the host
             machine that you want - type 2972

 Host:           GESQ Host: 2972

             then press then return button (I'll refer to this as <cr>).
             The return button <cr> is pressed at the end of every command
             line.

             You will then be prompted for your user number and password:


==== ecmi04/liz.txt ====
/*   Very Simple ELIZA - LIZ
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
     Peter Ross 5-Nov-81, Helen Pain  26-2-85
*/


/* The top level: call liz (so named 'cos it's a mini-version of ELIZA)
   to get going.
          ?- liz.
   The predicate "read" reads in sentences, input as a list.
   It will read in
      input:  [are,you,a,computer].
   NOTE: use lower-case letters at the front of words, this is a simple
   beast!
*/

liz :-
        write('input:'), nl,
        read(Input),
        nl,

==== ecmi04/winston_focus.txt ====

(Message 9)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 15:55:01-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  15:56:27 gmt
Msg ID:   <132001-523-442@EDXA>

--------
/* focus1
Rational Reconstruction of Winston Learning Program
Alan Bundy 1.12.80
Version for functions
More Efficient Version 25.6.82 */

/* Top Level Program - learn new concept */
/* ------------------------------------- */

/*First time only accept an example */
focus(Concept) :-
	abolish(definition,3),

==== ecmi04/rtn.txt ====
/* generation of random sentences from an rtn */

/* use with random and drinks */

/*top level*/
go :- generate(sentence,start),         /* generate a sentence from start */
      nl,nl.                            /* and print 2 new lines */

generate(RTN,finish).                   /* if at finish then do nothing */

generate(RTN,Node):-                    /* to generate RTN from node */
      arc(RTN,Node,Arcs),               /* find all arcs leaving node */
      random_pick(Arcs,[NewNode,Label,Type]),  /* pick one at random*/
      traverse(Label,Type),              /* traverse it */
      generate(RTN,NewNode).            /* and carry on from the other end */

traverse(Word,word):-                   /* to traverse a word arc */
      write(Word), tab(1).              /* write word and a space */

traverse(SubRTN,rtn) :-                 /*to traverse an rtn arc */
      generate(SubRTN,start).           /* generate subrtn from start */

==== ecmi04/winston_classi.txt ====

(Message 8)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:08:28-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:16:43 gmt
Msg ID:   <132001-455-533@EDXA>

--------
/* classify1

Classify as example, non-example or grey
Alan Bundy 7.7.82 */

classify(CObjs,VObjs,CDefn,VRec,ExDiff,yes) :-
	make_diff(CObjs,VObjs,CDefn,VRec,ExDiff,yes), !.

classify(CObjs,VObjs,CDefn,VRec,BestDiff,grey) :-
	bagof(Diff, make_diff(CObjs,VObjs,CDefn,VRec,Diff,grey), Diffs),
	Diffs \== [], !,
	best(Diffs,BestDiff).

==== ecmi04/exer_useful.txt ====
Exercise - 6th March 1984               Helen Pain
AI1 Practical


Give the command myprolog.

Consult the file "ecmi04.useful".

List it. Try and work out what the predicates are supposed to do.

Try typing the following goals:

      append([a,b],[b,c,d],X).

      member(a,[c,a,b,b,a,g,e]).

      rev(X,[a,p,p,l,e]).

      nexto(a,Y,[c,a,t]).

      replace(a,e,[b,a,n,a,n,a],A).

==== ecmi04/visiting.txt ====
% Author: Peter Ross
% Purpose: a simple database example
%
% This contains a baby database:
%	visiting(A,B)		meaning A is currently visiting B
%	at(A,Place)		meaning A is at Place
%	phone(Place, Number)	meaning the phone at Place is Number
% There is a predicate 'ring' which finds out which number to ring
% to get hold of a particular person, or vice-versa.

% ---- phone numbers -----

phone(place_a, 667-5770).
phone(place_b, 339-5390).
phone(place_c, 229-8901).
phone(place_d, 229-6031).
phone(place_e, 667-1011-2551).

% ---- some 'at' details ----

at(bundy,   place_a).

==== ecmi04/projs85_tpproj.txt ====

(Message 83)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 30-Jan-85 22:59:37-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 30 Jan 85  23:01:21 gmt
Msg ID:   <132017-752-421@EDXA>

--------



       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER
       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER
       AI1 PROLOG PROJECTS: QUIP - A RESOLUTION THEOREM PROVER


                                                          Dave Plummer
                                                       30 January 1985


  Quip  is  a  resolution  theorem  prover written in PROLOG.  In this
project you are asked to investigate and understand the code,  and  to

==== ecmi04/winston_learn.txt ====

(Message 4)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:05:36-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:08:35 gmt
Msg ID:   <132001-454-523@EDXA>

--------
/* learn1

Adjust definition  appropriately
Alan Bundy 7.7.82  */

/* if new example found */
learn1(Concept,Diff,yes,grey) :- !,
	writef('This is a new sort of %t. \n', [Concept]),
	maplist(lub,Diff,New),
	retract(definition(Concept,CObjs,Old)),
	assert(definition(Concept,CObjs,New)).


==== ecmi04/prover.txt ====

(Message 6)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:06:21-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:11:55 gmt
Msg ID:   <132001-454-734@EDXA>

--------
/* HEURISTIC SEARCH THEOREM PROVER */

go :- heuristic([pair(1,goal)]).

/* Top Level Stuff */
heuristic(Agenda) :-
	member(pair(0,Empty),Agenda).


heuristic( [pair(Score,Current) | Rest] ) :-
	setof1(Clause,successor(Current,Clause),NewClauses),
	add_to_agenda(NewClauses,Rest,NewAgenda),

==== ecmi04/refspgp.txt ====
;[6{








[48{





[6{                                 A Computer Tool for Use by Children with
[48{






==== ecmi04/ai2_suphandout.txt ====

(Message 6)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 28-Nov-84 14:43:49-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 28 Nov 84  14:45:12 gmt
Msg ID:   <131720-472-200@EDXA>

--------



                            AI2 - PROJECTS
                            AI2 - PROJECTS
                            AI2 - PROJECTS


                                                            Helen Pain
                                                      26 November 1984


  Each  AI2  student  must  complete  a  project.    A project usually
consists of a program exploring and/or illustrating some area  of  the

==== ecmi04/ai1_babyeliza.txt ====
% File: ECMI01.AI2_BABYELIZA
% Author: Peter Ross
% Purpose: the beginnings of an 'Eliza'-like program
% Needs: UTIL for member/2 and append/3
%	 ECMI01.AI2_SENTENCE for sentence/1

% Top level is go/0.

go :- 
	sentence(Input),
	process(Input).

process(Input) :-
	(member(bye, Input) ; member(goodbye, Input)),
	!,
	write('I enjoyed our little chat.'),
	nl.
process(Input) :-
	pair(InputPattern,OutputPattern),
	match(InputPattern, Input),
	flatten(OutputPattern, Output),

==== ecmi04/scrthemss.txt ====
@style(references STDalphabetic,spacing 1,linewidth 70)
@make(article)
@device(lpt)
@modify(figure,above 2,below 2)
@modify(subheading, below 0)
@set(page=1)
@define(romanize,use enumerate,numbered <(@i)>)
@define(alphabetize,use enumerate,numbered <(@a)>)
@modify(FootnoteCounter, within page, numbered <@*>, referenced <@*>)

@heading(AI1 Prolog Projects: QUIP - a resolution theorem prover)

@>Dave Plummer@*
@>@value(Date)@*

Quip is a resolution theorem prover written in PROLOG.  In this project
you are asked to investigate and understand the code, and to make some
extensions to the program. Look at the file:
@verbatim(             'ecmi04.quip')
At the front of the file is some information about what the program
does and how it is used.

==== ecmi04/projs85_nlproj.txt ====

(Message 85)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 30-Jan-85 22:59:54-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 30 Jan 85  23:01:57 gmt
Msg ID:   <132017-752-505@EDXA>

--------



            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT
            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT
            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT


                                                            Helen Pain
                                                       30 January 1985


  This  project is based on a program that generates sentences from an
recursive transition network (RTN).  The  RTN  representation  of  the

==== ecmi04/strips.txt ====
% File: /u3/pec/project/strips
% Author: Peter Clark
% Date: 1 May 1985
% Purpose: STRIPS revised 16 May 1985 for EMAS

:- op(80 ,xfy,'<>').
:- op(90 ,xfy,and).
:- op(100,xfy,[':',then,add]).
:- op(100, fy,[want,if,delete]).

watch :- retract(nowatching), assert(watching).
nowatch :- retract(watching), assert(nowatching).
nowatching.

% go/0 : the top level. Enter the initial and desired world states, format as
%	 follows....
%	 eg. initial      a			final   a
%			  b  				b
%			  c   d				d
%			 -------		       ---
% 	 Format is    [floor,c,b,a,floor,d].         [floor,d,b,a].

==== ecmi04/ai1_atn.txt ====
/* generation of random sentences from an rtn */

/* use with random and drinks */

/*top level*/
go :- generate(sentence,start),         /* generate a sentence from start */
      nl,nl.                            /* and print 2 new lines */

generate(RTN,finish).                   /* if at finish then do nothing */

generate(RTN,Node):-                    /* to generate RTN from node */
      arc(RTN,Node,Arcs),               /* find all arcs leaving node */
      random_pick(Arcs,[NewNode,Label,Type]),  /* pick one at random*/
      traverse(Label,Type),              /* traverse it */
      generate(RTN,NewNode).            /* and carry on from the other end */

traverse(Word,word):-                   /* to traverse a word arc */
      write(Word), tab(1).              /* write word and a space */

traverse(SubRTN,rtn) :-                 /*to traverse an rtn arc */
      generate(SubRTN,start).           /* generate subrtn from start */

==== ecmi04/winston_makerc.txt ====

(Message 3)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:05:05-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:07:08 gmt
Msg ID:   <132001-454-365@EDXA>

--------
/* make_rec

Make  records from list of relations
Alan Bundy 7.7.82 */

make_rec(Concept,Example,VObjs,VRec,Pairs) :- !,
	specimen(Example,ERelns),
	gen_list(ERelns,VRelns,Pairs),
	maplist(second,Pairs,VObjs),
	maplist(convert,VRelns,VRec).

/* Take list of terms and apply gen_term to each member */

==== ecmi04/mandc.txt ====

%   File   : MANDC
%   Author : Paul
%   Updated: 30 April 1985
%   Purpose: Missionaries and Cannibals by Lawrence Byrd

gofrom([0,0,0],[3,3,1],Oldlefts).

gofrom(Left,Right,Oldlefts):-
	legal(Left),
	legal(Right),
        not looping(Left,Oldlefts),
	applymove(Left,Right,Newleft,Newright),
	append([Left],Oldlefts,Newoldlefts),
	gofrom(Newleft,Newright,Newoldlefts).


applymove(Left,Right,Newleft,Newright):-
	boathere(Left),
	moveload(Left,Right,Newleft,Newright).


==== ecmi04/ai2_liza.txt ====
/*   Simple ELIZA
     -- a natural language misunderstander --
     Alan Bundy 15-Nov-79, Richard O'Keefe 17-Feb-81
     Peter Ross 5-Nov-81
*/

:-(['ecmi25.util_readin']).       % load read_in + necessary support.

/* The top level: call liza (so named 'cos it's a mini-version of ELIZA)
   to get going.
   The predicate read_in reads in sentences, currently ending with a
   full stop, exclamation mark or question mark. Thus
         read_in(X)
   will read in
         hello there.
   as
         X = [hello,there,.]
   NOTE: use lower-case letters at the front of words, this is a simple
   beast!
*/


==== ecmi04/famtree.txt ====
mother(mary,tom).
mother(mary,jane).
mother(mary,fred).
father(tom,jim).
father(tom,sue).
father(fred,cecil).

female(mary).
female(jane).
male(tom).
male(jim).
female(sue).
male(cecil).
male(fred).

parent(Parent,Child):-
        father(Parent,Child).
parent(Parent,Child):-
        mother(Parent,Child).
son(Son,Person):-
        parent(Person,Son),

==== ecmi04/projs85_drinks.txt ====
/* Example rtn */

/* sentence rtn */
arc(sentence,start,[[a,nounphrase,rtn]]).
arc(sentence,a,[[b,verb,rtn]]).
arc(sentence,b,[[c,nounphrase,rtn]]).
arc(sentence,c,[[finish,stop_mark,rtn]]).

/* nounphrase rtn */
arc(nounphrase,start,[[finish,proper_noun,rtn],[a,determiner,rtn]]).
arc(nounphrase,a,[[finish,noun,rtn],[a,adjective,rtn]]).

/* verb rtn */
arc(verb,start,[[finish,is,word],[finish,drinks,word],[finish,buys,word],
[finish,refuses,word],[finish,has,word],[finish,consumes,word]]).

/* determiner rtn */
arc(determiner,start,[[finish,a,word],[finish,an,word],[finish,the,word]]).

/* noun rtn */
arc(noun,start,[[finish,vicar,word],[finish,policeman,word],[finish,drinks,word]

==== ecmi04/ai1_random.txt ====
/* Random number generator */

random_pick(List,El):-                  /* to pick random element from a list*/
      length(List,L),
      random(L,N),
      nth(N,List,El).

random(Range,Num):-                     /* to choose random number in range */
      seed(Seed),                       /* get seed from database */
      Num is (Seed mod Range) + 1,      /* fit seed into range */
      retract(seed(Seed)),              /* delete old value of seed */
      NewSeed is (125*Seed+1) mod 4093, /* calculate new value*/
      assert(seed(NewSeed)).            /* and assert it into database */

seed(13).                               /* random number seed database entry */

/* to get the nth element of list */

nth(1,[Hd|T],Hd):- !.                   /* if n is i then return first element*/

nth(N,[Hd|T],El):-                      /* otherwise*/

==== ecmi04/emnotes.txt ====
Helen Pain                                          February 1984.
AI1 notes

         Notes on using the editor EM

1. Loading a file/Saving a file.

Say you have a file called fred that you want to edit. To load fred
into the editor em from emas command level you type:

      Command:em fred

The word Editor will then be printed and the number of lines in the
files fred (if the file exists). If you do not actually have a file
called fred one will be created.

How do you save the file when you have finished editing? If you are
editing fred and you type w after the > prompt:

      >w


==== ecmi04/charts.txt ====

(Message 7)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 14:07:26-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  14:14:30 gmt
Msg ID:   <132001-455-241@EDXA>

--------
/* 	GENERAL-PURPOSE ACTIVE CHART PARSER		*/

/*  Independent of grammatical formalism used, although the formalism */
/*  will have to have some general resemblance to a phrase-structure */
/*  grammar for a chart to work at all. The phrase-structure grammar */
/*  terms "rule", "LHS", "RHS" have been used here for simplicity,  */
/*  but they should be interpreted fairly abstractly.			*/

/*  All the external interfaces are in terms of 3 data-types:		*/
/*		surface words						*/
/*		syntactic categories					*/
/*		edge-labels						*/

==== ecmi04/ai2_ex1.txt ====
Exercise - 12th November 1984               Helen Pain
AI2 Practical



Consult the file "ecmi04.useful".

List it. Work out what the predicates are supposed to do.

Try typing the following goals:

      append([a,b],[b,c,d],X).

      member(a,[c,a,b,b,a,g,e]).

      rev(X,[a,p,p,l,e]).

      nexto(a,Y,[c,a,t]).

      replace(a,e,[b,a,n,a,n,a],A).
      

==== ecmi04/mystdaref.txt ====

(Message 15)
Subject:  scribe info
From:     Helen Pain <helen@uk.ac.ed.aiva>
Date:     Tue, 19 Nov 85 22:29:09 GMT
To:       ecmi04@uk.ac.ed.emas
Via:      uk.ac.edinburgh.aiva  ; (to uk.ac.edinburgh.emas) 19 Nov 85  22:30:10 gmt
Msg ID:   <sent  19 Nov 85 22:29:09 GMT via AIVA>

@Comment[ Copyright (C) 1979, 1980  UNILOGIC, Ltd. ]

@marker(References,MYSTDalphabetic)
@Comment{

Bibliography format definition for standard open-format alphabetic
references.
}

@Style(Citations=5, StringMax=2000, CitationType=Parentheses,
Citationseparator=";")
@Define(L1,LeftMargin 15,Indent -15,Above 1,Break,Fill)

==== ecmi04/geninfo.txt ====

Folder M#INBOX, messages '1,5,6,8,9,10'

    1   (1313)   01 Feb   J.Wexler @ RCO     Student processes
    5    (580)   03 Feb   J.Wexler @ RCO     Student prolog journals
    6    (172)   07 Feb   L.Byrd             files
    8    (537)   15 Feb   ADVICE @ RCO       Re: file descriptors
    9    (538)   16 Feb   To: ADVICE @ RCO   Re: file descriptors
   10     (57)   16 Feb   To: advice         file size


________________________________________________________________________

(Message 1)
Subject:  Student processes
From:     J.Wexler @ RCO        01 Feb 84  10:30:08 gmt
To:       H.Pain
Msg ID:   <01 Feb 84  10:30:08 gmt  020610@2972>

If you ACCEPT ERCC19.GJNY and INSERT GJNY, you will find you can use the
command GETJNL.  It takes one parameter which is the username of one of

==== ecmi04/winston_infer.txt ====

(Message 10)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 16-Jan-85 15:55:21-GMT
To:       ecmi08@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 16 Jan 85  15:58:01 gmt
Msg ID:   <132001-523-536@EDXA>

--------
/* infer

Inference package for focus program
Alan Bundy 7.7.82 */

infer(Concept) :-		/* to forward infer from current defn */
	rule(Rule),		/* find a rule */
	eval(Concept,Rule,Conc),	/* evaluate rule in current defn */
	simp(Conc,New),		/* simplify conclusion */
	insert(Concept,New),	/* insert new conclusion in defn */
	infer_mess(New),		/* announce inference */
	fail.			/* force backtracking */

==== ecmi04/projmss.txt ====

(Message 161)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 28-Nov-84 14:43:49-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 28 Nov 84  14:45:12 gmt
Msg ID:   <131720-472-200@EDXA>

--------



                            AI2 - PROJECTS
                            AI2 - PROJECTS
                            AI2 - PROJECTS


                                                            Helen Pain
                                                      26 November 1984


  Each  AI2  student  must  complete  a  project.    A project usually
consists of a program exploring and/or illustrating some area  of  the

==== ecmi04/alterer.txt ====
/*  A simple sentence alterer. 
    Helen Pain (from Clocksin and Mellish)  26.2.85

    To use the program, first consult this file and then
    type:
        ?- alter([i,write,a,sentence],X).
    Another sentence will be output, with a number of the
    words in the input sentence changed.

*/
alter([],[]).
alter([H|T],[X|Y]):-
    change(H,X),
    alter(T,Y).

change(we,you).
change(are,[are,not]).
change(french,german).
change(do,no).
change(you,we).
change([are,not],are).

==== ecmi04/wine.txt ====
% File:    /u4/peter/prolog/ks299/wine
% Author:  Peter Ross
% Updated: 6 Sep 84
% Purpose: a simple knowledge base for the KS299 expert system shell

'What is the overall taste (delicate/average/strong)'
    finds tastiness of meal.

'Is there a sauce (yes/no)'
    finds has_sauce.

'What sort of sauce (spicy/creamy/tomatoey/other)'
    finds sauce of meal.

'What body do you prefer (light/medium/full)'
    finds preferred_body of wine.

'What colour do you prefer (red/white)'
    finds preferred_colour of wine.

'What sweetness do you prefer (dry/medium/sweet)'

==== ecmi04/appen2pgp.txt ====
;[6{

                                                 240








APPENDIX B

PHONCODE GRAMMAR AND EXAMPLES




                     In this appendix the following are presented:


                            (a) the grapheme-phoneme grammar used by the phoncode program;


                          (b) a sample of dictionary words, phonetically coded;

==== ecmi04/drinks.txt ====
/* Example rtn */

/* sentence rtn */
arc(sentence,start,[[a,nounphrase,rtn]]).
arc(sentence,a,[[b,verb,rtn]]).
arc(sentence,b,[[c,nounphrase,rtn]]).
arc(sentence,c,[[finish,stop_mark,rtn]]).

/* nounphrase rtn */
arc(nounphrase,start,[[finish,proper_noun,rtn],[a,determiner,rtn]]).
arc(nounphrase,a,[[finish,noun,rtn],[a,adjective,rtn]]).

/* verb rtn */
arc(verb,start,[[finish,is,word],[finish,drinks,word],[finish,buys,word],
[finish,refuses,word],[finish,has,word],[finish,consumes,word]]).

/* determiner rtn */
arc(determiner,start,[[finish,a,word],[finish,an,word],[finish,the,word]]).

/* noun rtn */
arc(noun,start,[[finish,vicar,word],[finish,policeman,word],[finish,drinks,word]

==== ecmi04/chapn6fnl.txt ====
@part(assum,root"thesis.mss")
@chapter(Testing assumptions about the use of the program).
@label(assumptions)

@section(Introduction)
@label(ass-intro)
In chapter @ref(design) a number of assumptions were made about the way
in which the program described would be used. These assumptions 
were tested in two  studies, described in this chapter.
Children from the Reading Unit took part in these studies.

There were  three main purposes of the first  study:
@begin(enumerate)
to test whether children with spelling disabilities
would be both able and willing to use a simple text editor to 
write stories;

to examine the ways in which the text editor was used by the children,
and to consider ways it might be extended;

to provide samples of the children's errors, made in free 

==== ecmi04/allks299.txt ====
>>>>DOC<<<<
PRACTICAL EXERCISE: A SIMPLE EXPERT SYSTEM SHELL, WRITTEN IN PROLOG

Peter Ross


1. INTRODUCTION

   This describes how to use a simple expert system shell, and gives a number
   of exercises based on it. The shell is modelled loosely on Teknowledge's
   KS-300 (and so is called ks299, since it's not quite the full shilling).
   The shell can be found in

	UNIX: /u4/peter/prolog/ks299/int
	EMAS: ECMI01.KS299_INT

   Neither version needs any external utilities. A sample knowledge base can
   be found in

	UNIX: /u4/peter/prolog/ks299/wine
	EMAS: ECMI01.KS299_WINE

==== ecmi04/chap1fnl.txt ====
@part(intro,root "thesis.mss")



@chapter(Introduction)
@set(page=1)
@pageheading(center <@value[page]>,immediate)
@label(background)

@section(Children with learning difficulties in spelling: population
and problem)
@label(pop-problem)

This thesis is concerned with children who, despite being intelligent,
fail to learn how to spell.

Characteristically, they have spelling ages (as measured by standardized tests)
which are two years or more behind their chronological ages.
They are often not able to spell even common words correctly.
In addition, they may have particular difficulty in specific areas:
in perceiving patterns in words; in identifying rhymes; and in the sequencing 

==== ecmi04/quip.txt ====
%   File   : QUIP
%   Author : Dave Plummer
%   Written: 23 January 1985
%   Updated: 24 January 1985
%   Purpose: simple resolution theorem prover for AI1 project


%	The code in this file implements QUIP (QUIck Prover), a resolution 
%	theorem prover, in PROLOG.  For those unfamiliar with theorem
%	proving a quick explanation is given below, for more detail see
%	"The Computational Modelling of Mathematical Reasoning" by Alan Bundy.
%	
%	QUIP proves theorems in a subset of propositional calculus.  In this
%	calculus, propositions are represented by proposition letters, eg
%	a, b, f etc;  Each letter may be thought of as abbreviating an 
%	assertion about the world which is either true or false eg: 
%	
%	"AI is the most interesting subject taught at Edinburgh University",
%	"Theorem proving is the most interesting area of AI",
%	"PASCAL is the best programming language in existence"
%	

==== ecmi04/exuseful.txt ====
Exercise - 12th February 1985               Helen Pain
AI1 Practical


Give the command ai1prolog or p.

Consult the file 'ecmi04.useful'.

List it. Try and work out what the predicates are supposed to do.

Try typing the following goals:

      append([a,b],[b,c,d],X).

      member(a,[c,a,b,b,a,g,e]).

      rev(X,[a,p,p,l,e]).

      nexto(a,Y,[c,a,t]).

      replace(a,e,[b,a,n,a,n,a],A).

==== ecmi04/ex2tree.txt ====
AI1 Prolog exercise 2                            20.11.84				

  Check that you have a copy of emnotes (notes on the editor em).
  Switch the terminal on; call host (2972); log on.

  Look at your files - make sure you still have a copy of the file
  called 'family'. Copy it from me if you haven't (ecmi04.famtree).

  Run prolog - use ai1prolog or p

    Command: ai1prolog

  Consult the file 'family'

    ?- [family].

  Try matching a few goals to remind yourself how it works.

    ?- parent(Who,cecil).

    ?- daughter(tom,D).

==== ecmi04/ex2useful.txt ====
Exercise for week 7 - AI1.

Continuation of 'useful' list processing predicates.


length
------

Try

	?- length(X,[a,sa,d,f,g,h,j]).
	?- length(X,[a,[b,c],d,e]).

nexto
-----

Try

	?- nexto(a,Y,[c,a,t]).
	?- nexto(Y,a,[c,a,t]).
	?- nexto(X,Y,[c,a,t]).

==== ecmi04/ai1_project.txt ====
                    AI1 Projects
                     __________


Log on to EMAS. Get into PROLOG. Consult the following files:

                 ecmi04.atn
                 ecmi04.random
                 ecmi04.drinks

[ you may copy them to your own area before you run prolog if you wish]


In response to the prompt ?- type go.
Try this several times and explore the sentences generated.
List the program.
Trace the program and step through it:
        ?-  trace,go.




==== ecmi04/ks299.txt ====
% File:    /u4/peter/prolog/ks299/int
% Author:  Original by Steven Hardy. Reworked by Peter Ross.
% Updated: 6 Sep 84 by Peter Ross
% Purpose: a simple rule interpreter in the style of KS-300

% Original code courtesy of Teknowledge Inc. - so don't make use of it
% without acknowledging them.

% The rule base is made up of assertions of the form
%	RULE: if PREMISE then CONCLUSION.
% where	RULE is an atom,
%	PREMISE is a simple proposition of the form
%			THING = VALUE
%		     or THING is known
%		     or THING is unknown
%		or is a combination of simple propositions
%		   built up using "and" and "or", where "or"
%		   binds tighter than "and",
%       CONCLUSION is a simple conclusion of the form
%			THING = VALUE
%		     or THING = VALUE cf CONFIDENCE

==== ecmi04/chap4pgp.txt ====
;[6{

                                                      91








CHAPTER 5

DESIGN AND USE OF A COMPUTER PROGRAM
[48{



[6{
                      TO INCORPORATE THE EDITCOST AND PHONCODE CORRECTORS




==== ecmi04/scrthepl.txt ====
%   File   : QUIP
%   Author : Dave Plummer
%   Written: 23 January 1985
%   Updated: 24 January 1985
%   Purpose: simple resolution theorem prover for AI1 project


%	The code in this file implements QUIP (QUIck Prover), a resolution 
%	theorem prover, in PROLOG.  For those unfamiliar with theorem
%	proving a quick explanation is given below, for more detail see
%	"The Computational Modelling of Mathematical Reasoning" by Alan Bundy.
%	
%	QUIP proves theorems in a subset of propositional calculus.  In this
%	calculus, propositions are represented by proposition letters, eg
%	a, b, f etc;  Each letter may be thought of as abbreviating an 
%	assertion about the world which is either true or false eg: 
%	
%	"AI is the most interesting subject taught at Edinburgh University",
%	"Theorem proving is the most interesting area of AI",
%	"PASCAL is the best programming language in existence"
%	

==== ecmi04/chapn8fnl.txt ====

@part(discuss,root "thesis.mss")

@chapter(Performance)
@label(perform)

@section(Introduction)
@label(perform-intro)

In this chapter the performance of the editcost and
phoncode programs, in correcting the errors made by the children,
is assessed.

If the programs are able to provide correction of the errors,
then this provides evidence that:
@begin(alphabetize)
there are regularities in the children's errors;

information relating to these regularities can be used 
by the programs to reconstruct the correction from the error.
@end(alphabetize)

==== ecmi04/ex3visit.txt ====
AI1 TUTORIAL AND PRACTICAL EXERCISE    27 th November 1984
Helen Pain



  LOG ON AND RUN AI1PROLOG OR P

  CONSULT THE FILE ECMI04.VISITING

     ?- ['ecmi04.visiting"].

  GET A LISTING OF IT

      ?- listing.

  READ THE LISTING AND WORK OUT WHAT THE FILE DOES.

  WRITE QUESTIONS TO GET THE ANSWERS TO THE FOLLOWING;

  1. the phone number at place_a


==== ecmi04/projs85_random.txt ====
/* Random number generator */

random_pick(List,El):-                  /* to pick random element from a list*/
      length(List,L),
      random(L,N),
      nth(N,List,El).

random(Range,Num):-                     /* to choose random number in range */
      seed(Seed),                       /* get seed from database */
      Num is (Seed mod Range) + 1,      /* fit seed into range */
      retract(seed(Seed)),              /* delete old value of seed */
      NewSeed is (125*Seed+1) mod 4093, /* calculate new value*/
      assert(seed(NewSeed)).            /* and assert it into database */

seed(13).                               /* random number seed database entry */

/* to get the nth element of list */

nth(1,[Hd|T],Hd):- !.                   /* if n is i then return first element*/

nth(N,[Hd|T],El):-                      /* otherwise*/

==== ecmi04/nlproject.txt ====

(Message 85)
From:     HELEN    HPS (on ERCC DEC-10) <Pain@EDXA>
Date:     Wednesday, 30-Jan-85 22:59:54-GMT
To:       ecmi04@2972,Pain@EDXA
Via:      uk.ac.edinburgh.edxa  ; (to uk.ac.edinburgh.emas) 30 Jan 85  23:01:57 gmt
Msg ID:   <132017-752-505@EDXA>

--------



            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT
            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT
            AI1 PROLOG PROJECTS - NATURAL LANGUAGE PROJECT


                                                            Helen Pain
                                                       30 January 1985


  This  project is based on a program that generates sentences from an
recursive transition network (RTN).  The  RTN  representation  of  the

==== ecmi04/projs85_rtn.txt ====
/* generation of random sentences from an rtn */

/* use with random and drinks */

/*top level*/
go :- generate(sentence,start),         /* generate a sentence from start */
      nl,nl.                            /* and print 2 new lines */

generate(RTN,finish).                   /* if at finish then do nothing */

generate(RTN,Node):-                    /* to generate RTN from node */
      arc(RTN,Node,Arcs),               /* find all arcs leaving node */
      random_pick(Arcs,[NewNode,Label,Type]),  /* pick one at random*/
      traverse(Label,Type),              /* traverse it */
      generate(RTN,NewNode).            /* and carry on from the other end */

traverse(Word,word):-                   /* to traverse a word arc */
      write(Word), tab(1).              /* write word and a space */

traverse(SubRTN,rtn) :-                 /*to traverse an rtn arc */
      generate(SubRTN,start).           /* generate subrtn from start */

==== ecmi04/scrnlmss.txt ====
@style(references STDalphabetic,spacing 1,linewidth 70)
@make(article)
@device(LASER)
@modify(figure,above 2,below 2)
@modify(subheading, below 0)
@set(page=1)
@define(romanize,use enumerate,numbered <(@i)>)
@define(alphabetize,use enumerate,numbered <(@a)>)
@modify(FootnoteCounter, within page, numbered <@*>, referenced <@*>)

@heading(AI1 Prolog Projects - Natural Language Project)

@>Helen Pain@*
@>@value(Date)@*

This project is based on a program that generates sentences from
an recursive transition network (RTN). 
The RTN representation of the grammar consists 
of a number of states and connecting arcs. 
The arcs are labelled by other RTN's (non-terminals) or by words (terminals). 
The RTN may be traversed and a sentence generated in the process

==== ecmi04/ai1_visiting.txt ====
% Author: Peter Ross
% Purpose: a simple database example
%
% This contains a baby database:
%	visiting(A,B)		meaning A is currently visiting B
%	at(A,Place)		meaning A is at Place
%	phone(Place, Number)	meaning the phone at Place is Number
% There is a predicate 'ring' which finds out which number to ring
% to get hold of a particular person, or vice-versa.

% ---- phone numbers -----

phone(place_a, 667-5770).
phone(place_b, 339-5390).
phone(place_c, 229-8901).
phone(place_d, 229-6031).
phone(place_e, 667-1011-2551).

% ---- some 'at' details ----

at(bundy,   place_a).

==== ecmi04/gp300mss.txt ====
@style(references MYSTDAlphabetic,leftmargin 1.5inch, 
topmargin .75inch, spacing 1.5, bottommargin 1.5inch,singlesided,
hyphenation on,widestblank 2, font gothic)
@make(thesis)
@device(gp300)
@modify(verbatim,facecode t)
@modify(HD1A, font titlefont0)
@modify(figure,above 2,below 2)
@define(romanize,use enumerate,numbered <(@i) >, referenced <(@i)>)
@define(alphabetize,use enumerate,numbered <(@a) >, referenced <(@a)>)
@modify(equation, leftmargin +1, rightmargin +0)
@modify(EquationCounter, numbered <(@i)>, referenced <(@i)>)
@modify(FootnoteCounter, within chapter)
@use(Bibliography = Thesis.Bib)
@include(acknow.mss)
@include(chap1.mss)
@include(chap2.mss)
@include(chap2b.mss)
@include(chap3.mss)
@include(chap4.mss)
@include(chap5.mss)

==== ecmi04/util.txt ====
em(File) :-
	emas(em,File),
	reconsult(File).


list(Predicate) :-
	current_predicate(Predicate,Template),
	clause(Template,Body),
	nl,
	list1((Template :- Body)),
	fail.

list(_) :- !.


list1((Template :- true)) :-
	!,
	numbervars(Template,1,_),
	print(Template),write('.'),nl.

list1((Template :- Body)) :-

==== ecmi05/elgnames.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' '"'
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/c_evalp.txt ====
/************************************************************************
*									*
*		   C Prolog	evalp.c					*
*		   ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

/*----------------------------------------------------------------------+
|									|
|			Evaluable Predicates				|
|									|

==== ecmi05/pop2v11s.txt ====
%CONTROL X'FFFFFFF2'
%EXTERNALROUTINE POP2(%STRING(63)POPPARM);
%EXTERNALINTEGERFNSPEC EVENT(%INTEGER I)
  !POP2 INTERPRETER FOR EMAS
%CONSTSTRING(25) IDENTIFICATION="EMAS POP2: V1.1  08/01/78"
!
%SYSTEMROUTINESPEC OUTFILE(%STRING(15) S %INTEGER L,M,P %C
                      %INTEGERNAME C,F)
%EXTERNALSTRINGFNSPEC SSFMESSAGE
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALINTEGERFNSPEC EXIST(%STRING(15)S)
%EXTERNALROUTINESPEC CLEAR(%STRING(63) S)
%EXTERNALLONGREALFNSPEC CPUTIME
%EXTERNALROUTINESPEC PROMPT(%STRING(17) S)
%EXTERNALINTEGERFNSPEC TEST INT(%INTEGER C %STRING(15) S)
%EXTERNALROUTINESPEC E(%STRING(63) S)
!
! REPRESENTATION OF POP2 VALUES:-
!    ...000 :  INTEGER  (TRUE VALUE * 8)
!    ...100 :  REAL     (TRUE FP VALUE WITH LS BITS FORCED)
!    ....10 :  COMPOUND (BYTE ADDRESS OF FIRST WORD MINUS TWO)

==== ecmi05/z5doc.txt ====
=UDK=``+0Titan12iso-P
`+120025A-P
`+2Kosmos10-P
`+3Kosmos10B-P
`+4Kosmos12B-P
`+5Kosmos14-P
`+6kosmos10i-P
`+7cmr11-P
`+8cmi11-P
`+9SymbolC10-P
`m700,0,0,0,495
`d`t70
`i0
`rd200r
`rr1005r`41. INTRODUCTION.
`rd180r
`rr400r`2There`rr27rseem`rr27rto`rr27rbe`rr27rtwo`rr27rmain`rr27rconcerns`rr27rand`rr27rgoals`rr27rbehind`rr27rthe`rr27rwork`rr27ron`rr26rnatural
	language`rr27rusing`rr27rcomputers,`rr27rconverging`rr27rat`rr27rmany`rr27rpoints.`rr45rOne`rr27rgoal,`rr27rthat`rr27rof`rr27rmore
	natural`rr20rcommunication`rr20rwith`rr19rcomputers,`rr19rhas`rr19rits`rr19rroots`rr19rin`rr19rthe`rr19rconcern`rr19rfor`rr19rapplication
	of the fruits of computational research,`rr19ramplified`rr19rby`rr19rthe`rr19rrecent`rr19rrace`rr19rto`rr19rbuild`rr19ra`rr19rnew
	generation`rr29rof`rr29rcomputers,`rr29rin`rr29rorder`rr29rto`rr28rmake`rr28rthem`rr28reven`rr28rmore`rr28ruser-oriented`rr28rand
	more useful for our purposes.`rr37rThe other`rr19rgoal`rr19ris`rr19rtheoretical`rr19rinvestigation`rr19rof`rr19rhuman
	language,`rr25rand`rr25rsome`rr25rresearchers`rr25rhope`rr25rthat`rr25rthe`rr25rcomputer`rr24rmight`rr24rbe`rr24ra`rr24rvery`rr24ruseful

==== ecmi05/parser.txt ====
% File:		parser
% Author:	Peter Ross
% Updated:	6 June 1985
% Purpose:	simple general purpose active chart parser

% This is a (very) simple general purpose chart parser.
% There is separate user documentation in parser.doc.

% There are three important data structures to know about:
% Edge:
%	edge(Category, Found, Needs, StartVertex, EndVertex)
%		Category is the category as on the LHS of a rule.
%		Found is what has already been accounted for, of the
%		    RHS of that rule. At the start it is just []. It
%		    is ordered so that the most recently found item is
%		    first. To help analyse the chart after the parseing,
%		    the items are of the form
%			Category = VertexNumber
%		    showing the vertex number where that found category
%		    started.
%		Needs is what has not yet been accounted for, of the

==== ecmi05/xlisp_xlsetfc.txt ====
/* xlsetf - set field function */

#include "xlisp.h"

/* external variables */
extern NODE *s_car,*s_cdr,*s_get,*s_svalue,*s_splist;
extern NODE *xlstack;

/* xsetf - built-in function 'setf' */
NODE *xsetf(args)
  NODE *args;
{
    NODE *oldstk,arg,place,value;

    /* create a new stack frame */
    oldstk = xlsave(&arg,&place,&value,NULL);

    /* initialize */
    arg.n_ptr = args;

    /* handle each pair of arguments */

==== ecmi05/tdoc.txt ====
=UDK=``+0Titan12iso-P
`+120025A-P
`+2Kosmos10-P
`+3Kosmos10B-P
`+4Kosmos12B-P
`+5Kosmos14-P
`+6kosmos10i-P
`+7cmr11-P
`+8cmi11-P
`+9SymbolC10-P
`m700,0,0,0,495
`d`t70
`i0
`rd750r
`rr430r`b`5PREMINARIES TO PARSING INFLECTIONAL LANGUAGES:
`rr825rSOME ANALYSES OF POLISH
`rd210r
`rr1065r`p`4Jan Bujnowski
`rd1080r
`rr940r`2This is a modified version of
`rr830ra project submitted in partial fulfilment
`rr650rof the requirements of the degree of M.A. with Honours
`rr825rin Linguistics with Artificial Intelligence.
`rd200r
`rr840r`3Department of Artificial Intelligence,

==== ecmi05/xlisp_factlsp.txt ====
(defun factorial (n)
       (cond ((= n 1) 1)
	     (t (* n (factorial (- n 1))))))

==== ecmi05/t.txt ====
$a device=x2700
$a pageno=0
$a sup='\'
$a bold='~'
$a just=1
$B12
$5
$L1m
~PREMINARIES TO PARSING INFLECTIONAL LANGUAGES:~
$L1M
~SOME ANALYSES OF POLISH~
$4
$b3
$l1m
Jan Bujnowski
$2
$b18
$L1m
This is a modified version of
$L1m
a project submitted in partial fulfilment

==== ecmi05/h_pl.txt ====
/************************************************************************
*									*
*                  C Prolog    pl.h					*
*                  ========    ----					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL	*
*  2900 computers, with some contributions by Lawrence Byrd.		*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Beautified, made type-correct, and given additional registers in	*
*  1983 by Richard O'Keefe, DAI Edinburgh.  Made to work on GEC-63s	*
*  and other BACKWARDS machines in 1984 by the same.			*
*									*
************************************************************************/

#include <stdio.h>

#define TRUE	1

==== ecmi05/c_compare.txt ====
/************************************************************************
*									*
*		   C Prolog	compare.c				*
*		   ========	---------				*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 R.A.O'Keefe.					*
*									*
************************************************************************/

/*----------------------------------------------------------------------+
|									|
|   compare() always compares X->v1ofcf and X->v2ofcf.  It calls comp()	|
|   which actually compares the terms.  Comparison starts with a quick	|

==== ecmi05/xlisp_xldmemc.txt ====
/* xldmem - xlisp dynamic memory management routines */

#include "xlisp.h"

/* useful definitions */
#define ALLOCSIZE (sizeof(struct segment) + (anodes-1) * sizeof(NODE))

/* external variables */
extern NODE *oblist,*keylist;
extern NODE *xlstack;
extern NODE *xlenv,*xlnewenv;
extern long total;
extern int anodes,nnodes,nsegs,nfree,gccalls;
extern struct segment *segs;
extern NODE *fnodes;

/* external procedures */
extern char *malloc();
extern char *calloc();

/* newnode - allocate a new node */

==== ecmi05/xlisp_xlcontc.txt ====
/* xlcont - xlisp control built-in functions */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack,*xlenv,*xlnewenv,*xlvalue;
extern NODE *s_unbound;
extern NODE *s_evalhook,*s_applyhook;
extern NODE *true;

/* external routines */
extern NODE *xlxeval();

/* forward declarations */
FORWARD NODE *let();
FORWARD NODE *prog();
FORWARD NODE *progx();
FORWARD NODE *doloop();

/* xcond - built-in function 'cond' */
NODE *xcond(args)

==== ecmi05/xlisp_xlbfunc.txt ====
/* xlbfun.c - xlisp basic builtin functions */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack;
extern NODE *s_lambda,*s_macro;
extern NODE *s_comma,*s_comat;
extern NODE *s_unbound;
extern char gsprefix[];
extern int gsnumber;

/* forward declarations */
FORWARD NODE *bquote1();
FORWARD NODE *defun();
FORWARD NODE *makesymbol();

/* xeval - the builtin function 'eval' */
NODE *xeval(args)
  NODE *args;
{

==== ecmi05/c_parms.txt ====
/************************************************************************
*									*
*		   C Prolog     parms.c					*
*		   ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 R.A.O'Keefe.					*
*									*
************************************************************************/

#include "pl.h"

/* Declaration and properties of work areas */


==== ecmi05/elogosdv.txt ====
%BEGIN
!
! CHANNEL USAGE
! ST01 - DUMPFILE AND DRIBBLE AT GOODBYE
! ST02 - ELGNAM
! SM04 - OWNFILE
! SM05 - LOGERRS
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM09 - LOGMASTR
! SM10 - LOGOTEMP
! SM11 - LOGODRIB
! SM12 - NEW LOGON IN EDITMASTER
! ST13 - SHOWFILE?
!
!*****************************************
! GRAPHICS LINKAGE
!*****************************************
!
%EXTERNALINTEGERFNSPEC CONV (%INTEGER X)

==== ecmi05/xlisp_xlmathc.txt ====
/* xlmath - xlisp builtin arithmetic functions */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack;
extern NODE *true;

/* forward declarations */
FORWARD NODE *unary();
FORWARD NODE *binary();
FORWARD NODE *predicate();
FORWARD NODE *compare();

/* xadd - builtin function for addition */
NODE *xadd(args)
  NODE *args;
{
    return (binary(args,'+'));
}


==== ecmi05/xlisp_readme.txt ====
XLISP

This PD file contains the C sourse of David Betz' XLISP v1.4.
It is free, copyable for non-profit use provided you preserve
the details of authorship.

The manual is terse, a reference manual. For a tutorial introduction,
use Winston's LISP, 2nd edition, for Addison-Wesley. Most of the LISP
described in that book is in XLISP.

XLISP v1.4 is essentially a small core set of Common LISP. The object
oriented features of XLISP are NOT part of Common LISP, however.

In the PD file, C soure files are called <something>C and the single
header file is called XLISPH. The manual is in MANUAL.

You will probably need to edit the C source a little. It expects the
header file to be called xlisp.h at present, and it expects LISP files
to be called <something>.lsp. In this PD file, the demo and startup files
are called <something>LSP.


==== ecmi05/lognam30.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'<'
'>'
'('
')'
'*'
'+'
','
'-'
'/'
'='
'['

==== ecmi05/xlisp_xlinitc.txt ====
/* xlinit.c - xlisp initialization module */

#include "xlisp.h"

/* external variables */
extern NODE *true;
extern NODE *s_quote,*s_function,*s_bquote,*s_comma,*s_comat;
extern NODE *s_lambda,*s_macro;
extern NODE *s_stdin,*s_stdout;
extern NODE *s_evalhook,*s_applyhook;
extern NODE *s_tracenable,*s_tlimit,*s_breakenable;
extern NODE *s_continue,*s_quit;
extern NODE *s_car,*s_cdr,*s_get,*s_svalue,*s_splist,*s_eql;
extern NODE *k_test,*k_tnot,*k_optional,*k_rest,*k_aux;
extern NODE *a_subr,*a_fsubr;
extern NODE *a_list,*a_sym,*a_int,*a_str,*a_obj,*a_fptr;
extern struct fdef ftab[];

/* xlinit - xlisp initialization routine */
xlinit()
{

==== ecmi05/xlisp_xlsubrc.txt ====
/* xlsubr - xlisp builtin function support routines */

#include "xlisp.h"

/* external variables */
extern NODE *k_test,*k_tnot,*s_eql;
extern NODE *xlstack;

/* xlsubr - define a builtin function */
xlsubr(sname,type,subr)
  char *sname; int type; NODE *(*subr)();
{
    NODE *sym;

    /* enter the symbol */
    sym = xlsenter(sname);

    /* initialize the value */
    sym->n_symvalue = newnode(type);
    sym->n_symvalue->n_subr = subr;
}

==== ecmi05/h_arith.txt ====
/************************************************************************
*									*
*		   C Prolog	arith.h					*
*		   ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

/*  Internal code for the Nullary operators:				*/

#define	TIME	1
#define	HEAP	2

==== ecmi05/lognam72.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/music.txt ====
THIS IS LOGO MUSIC PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPERESENTS ALLOCATION OF MUSIC.

==== ecmi05/lognam90.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/lognam96.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/lognam97.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/lognam98.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/lognam99.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/c_space.txt ====
/************************************************************************
*									*
*		   C Prolog	space.c					*
*		   ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*  This module is based on published work by Weinberg? Weisberg?	*
*									*
************************************************************************/

#include "pl.h"

#ifdef	ERRCHECK

==== ecmi05/tdr.txt ====













                 PREMINARIES      TO  PARSING     INFLECTIONAL     LANGUAGES:

                 PREMINARIES      TO  PARSING     INFLECTIONAL     LANGUAGES:
                                 SOME    ANALYSES     OF   POLISH

                                 SOME    ANALYSES     OF   POLISH




                                           Jan Bujnowski



==== ecmi05/ai2tr90.txt ====
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST02 - LOGNAM
! SM04 - LOGOFILE
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************
! GRAPHICS LINKAGE
!*****************************************
!

==== ecmi05/oldnames.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'<'
'>'
'('
')'
'*'
'+'
','
'-'
'/'
'='
'['

==== ecmi05/initfile.txt ====
ttyinit
setmode lower

==== ecmi05/sample.txt ====
% File:		sample3
% Author:	Peter Ross nicked it from GDR
% Updated:	3 June 1985

% ============ SAMPLE GRAMMAR ============

initial_category(trial,s).
strategy(trial,S) :-
	prompt(_,'Strategy (td/bu): '),
	read(S),
	member(S,[td,bu]),
	!.
strategy(trial,S) :-
	write('Answer  td.  or  bu.  please'), nl,
	strategy(trial,S).
policy(trial,P) :-
	prompt(_,'Policy (bf/df):   '),
	read(P),
	member(P,[bf,df]),
	!.
policy(trial,P) :-

==== ecmi05/meccano.txt ====
THIS IS LOGO MECCANO PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPRESENTS ALLOCATION OF MECCANO.

==== ecmi05/c_auxfn.txt ====
/************************************************************************
*									*
*                  C Prolog    auxfn.c					*
*                  ========    -------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

#include "pl.h"
#ifdef	COUNTING
static	Sint funcspace;
static	int  funccount, atomcount;

==== ecmi05/c_unify.txt ====
/************************************************************************
*									*
*                  C Prolog    unify.c					*
*                  ========    -------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

#include "pl.h"

/*  Unify term ta (with global frame ga and local frame V)
    with  term tb (with global frame gb and local frame X)

==== ecmi05/logos.txt ====
%EXTERNALROUTINE LOGO(%STRING(255) GASH)
%EXTERNALROUTINESPEC RUN(%STRING(63) S)
RUN('ECMI05.AI2LOGOY')
%END
%ENDOFFILE

==== ecmi05/xlisp_xlfioc.txt ====
/* xlfio.c - xlisp file i/o */

#include "xlisp.h"
#include "ctype.h"

/* external variables */
extern NODE *s_stdin,*s_stdout;
extern NODE *xlstack;
extern int xlfsize;
extern char buf[];

/* external routines */
extern FILE *fopen();

/* forward declarations */
FORWARD NODE *printit();
FORWARD NODE *flatsize();
FORWARD NODE *explode();
FORWARD NODE *implode();
FORWARD NODE *openit();
FORWARD NODE *getfile();

==== ecmi05/xlisp_xllistc.txt ====
/* xllist - xlisp built-in list functions */

#include "xlisp.h"

#ifdef MEGAMAX
overlay "overflow"
#endif

/* external variables */
extern NODE *xlstack;
extern NODE *s_unbound;
extern NODE *true;

/* external routines */
extern int eq(),eql(),equal();

/* forward declarations */
FORWARD NODE *cxr();
FORWARD NODE *nth(),*assoc();
FORWARD NODE *subst(),*sublis(),*map();
FORWARD NODE *cequal();

==== ecmi05/xlisp_prologlsp.txt ====

;; The following is a tiny Prolog interpreter in MacLisp
;; written by Ken Kahn and modified for XLISP by David Betz.
;; It was inspired by other tiny Lisp-based Prologs of
;; Par Emanuelson and Martin Nilsson.
;; There are no side-effects anywhere in the implementation.
;; Though it is VERY slow of course.

(defun prolog (database &aux goal)
       (do () ((not (progn (princ "Query?") (setq goal (read)))))
              (prove (list (rename-variables goal '(0)))
                     '((bottom-of-environment))
                     database
                     1)))

;; prove - proves the conjunction of the list-of-goals
;;         in the current environment

(defun prove (list-of-goals environment database level)
      (cond ((null list-of-goals) ;; succeeded since there are no goals
             (print-bindings environment environment)

==== ecmi05/c_dbase.txt ====
/************************************************************************
*									*
*		   C Prolog	dbase.c					*
*		   ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

#include "pl.h"

/*  Variable table  */


==== ecmi05/elogos30.txt ====
%BEGIN
!
! CHANNEL USAGE
! ST01 - DUMPFILE AND DRIBBLE AT GOODBYE
! ST02 - ELGNAM
! SM04 - OWNFILE
! SM05 - LOGERRS
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM09 - LOGMASTR
! SM10 - LOGOTEMP
! SM11 - LOGODRIB
! SM12 - NEW LOGON IN EDITMASTER
! ST13 - SHOWFILE?
!
!*****************************************
! GRAPHICS LINKAGE
!*****************************************
!
%EXTERNALINTEGERFNSPEC CONV (%INTEGER X)

==== ecmi05/oldlogs.txt ====
%EXTERNALROUTINE OLDLOGO
%EXTERNALROUTINESPEC RUN(%STRING(63) S)
RUN('ECMI05.OLDLOGOY')
%END
%ENDOFFILE

==== ecmi05/xlisp_xlioc.txt ====
/* xlio - xlisp i/o routines */

#include "xlisp.h"

/* external variables */
extern int xlplevel;
extern int xlfsize;
extern NODE *xlstack;
extern NODE *s_stdin;
extern int xldebug;
extern int prompt;

/* xlgetc - get a character from a file or stream */
int xlgetc(fptr)
  NODE *fptr;
{
    NODE *lptr,*cptr;
    FILE *fp;
    int ch;

    /* check for input from nil */

==== ecmi05/readme.txt ====
All the files are owned by ECMI05:
	- the PD file C contains all the C source
	- the PD file H contains all the header files
	  referred to in #include directives, apart from
	  'standard' ones like "stdio" which I assume are
	  somehow provided by the EMAS C support.
	- the PD file PL conatins all the Prolog files
	  that need to be read at boot time in order to
	  create a runnable system. After reading in all these
	  files ONCE, the system state is saved, and it is 
	  this saved state which the world at large should
	  use thereafter.
NOTE WELL: I have not made ANY modifications to the UNIX version source that
	   might tailor it to EMAS, since I know nothing of the EMAS C
	   compiler. In particular, you may have to change all the
		#include ......
	   lines in the C source files.
	   If you want a (UNIX) cross reference listing, let me know. I am:
		ECMI01@emas
		peter@edai
		Peter Ross, central area extension 2557

==== ecmi05/makelogs.txt ====
%EXTERNALROUTINE MAKELOGO
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING (63) S)
%EXTERNALROUTINESPEC PERMITFILE(%STRING (63) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING (63) S)
%EXTERNALROUTINESPEC CHERISH(%STRING (63) S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER C,%INTEGERNAME L)
%INTEGER LEN,EUNAD,I
%SHORTINTEGERNAME A
%BYTEINTEGERARRAY EUNBYTE(1:7)
%STRING(6) %NAME EMASUSER
EUNAD=COMREG(16)
EUNBYTE(1)=6
%CYCLE I=2,1,7
EUNBYTE(I)=BYTEINTEGER(EUNAD+I-2)
%REPEAT
EMASUSER==STRING(ADDR(EUNBYTE(1)))
DEFINE('SM04,LOGOFILE');NEWSMFILE('LOGOFILE,4096')
A==SHORTINTEGER(SMADDR(4,LEN))
A=0
%PRINTTEXT ' LOGOFILE NOW EXISTS, LENGTH IS '

==== ecmi05/ai2log72.txt ====
%BEGIN
!
! CHANNEL USAGE
! ST02 - LOGNAM
! SM04 - LOGOFILE
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************
! GRAPHICS LINKAGE
!*****************************************
!
%EXTERNALINTEGERFNSPEC CONV (%INTEGER X)
%EXTERNALROUTINESPEC VECORPOINT (%INTEGER I,J,K,L)
%EXTERNALROUTINESPEC PAUSE
%EXTERNALROUTINESPEC LOAD42 (%STRING(63) FILE)
%EXTERNALROUTINESPEC SET42 (%INTEGER NM)
%EXTERNALROUTINESPEC CLEAR 42
%EXTERNALROUTINESPEC  CH3 (%INTEGER CHAR)

==== ecmi05/xlisp_xlglobc.txt ====
/* xlglobals - xlisp global variables */

#include "xlisp.h"

/* symbols */
NODE *true = NIL;
NODE *s_quote = NIL, *s_function = NIL;
NODE *s_bquote = NIL, *s_comma = NIL, *s_comat = NIL;
NODE *s_evalhook = NIL, *s_applyhook = NIL;
NODE *s_lambda = NIL, *s_macro = NIL;
NODE *s_stdin = NIL, *s_stdout = NIL;
NODE *s_tracenable = NIL, *s_tlimit = NIL, *s_breakenable = NIL;
NODE *s_continue = NIL, *s_quit = NIL;
NODE *s_car = NIL, *s_cdr = NIL;
NODE *s_get = NIL, *s_svalue = NIL, *s_splist = NIL;
NODE *s_eql = NIL, *k_test = NIL, *k_tnot = NIL;
NODE *k_optional = NIL, *k_rest = NIL, *k_aux = NIL;
NODE *a_subr = NIL, *a_fsubr = NIL;
NODE *a_list = NIL, *a_sym = NIL, *a_int = NIL;
NODE *a_str = NIL, *a_obj = NIL, *a_fptr = NIL;
NODE *oblist = NIL, *keylist = NIL, *s_unbound = NIL;

==== ecmi05/ai2log96.txt ====
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - DUMPFILE
! ST02 - LOGNAM
! ST03 - LOGOTEMP
! SM04 - LOGOFILE
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************
! GRAPHICS LINKAGE

==== ecmi05/ai2log97.txt ====
! UPDATED 23/10/80
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - DUMPFILE
! ST02 - LOGNAM
! ST03 - LOGOTEMP
! SM04 - LOGOFILE
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/ai2log98.txt ====
! UPDATED 10/11/80 - ALL FILES MADE TEMPORARY
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/ai2log99.txt ====
! UPDATED 19/12/80
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/c_arith.txt ====
/************************************************************************
*									*
*		   C Prolog      arith.c				*
*		   ========	 -------				*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

/* Evaluate arithmetic expressions */

#include "pl.h"
#include "arith.h"

==== ecmi05/plottera.txt ====
THIS IS LOGO PLOTTERA PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPRESENTS ALLOCATION OF PLOTTERA.

==== ecmi05/plotterb.txt ====
THIS IS LOGO PLOTTERB PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPRESENTS ALLOCATION OF PLOTTERB.

==== ecmi05/c_sysbits.txt ====
/************************************************************************
*									*
*                  C Prolog    sysbits.c				*
*                  ========    ---------				*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

/*----------------------------------------------------------------------+
|									|
|    This  is  the  UNIX/PaNiX/Xenix/VMS  interface   module.    Stdio	|
| routines  are called all over the place, and there is an unavoidable	|

==== ecmi05/devtr96.txt ====
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - DUMPFILE
! ST02 - LOGNAM
! ST03 - LOGOTEMP
! SM04 - LOGOFILE
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************
! GRAPHICS LINKAGE

==== ecmi05/xlisp_xlevalc.txt ====
/* xleval - xlisp evaluator */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack,*xlenv,*xlnewenv;
extern NODE *s_lambda,*s_macro;
extern NODE *k_optional,*k_rest,*k_aux;
extern NODE *s_evalhook,*s_applyhook;
extern NODE *s_unbound;
extern NODE *s_stdout;

/* forward declarations */
FORWARD NODE *xlxeval();
FORWARD NODE *evalhook();
FORWARD NODE *evform();
FORWARD NODE *evsym();
FORWARD NODE *evfun();

/* xleval - evaluate an xlisp expression (checking for *evalhook*) */
NODE *xleval(expr)

==== ecmi05/xlisp_xlsymc.txt ====
/* xlsym - symbol handling routines */

#include "xlisp.h"

/* external variables */
extern NODE *oblist,*keylist;
extern NODE *s_unbound;
extern NODE *xlstack;

/* forward declarations */
FORWARD NODE *symenter();
FORWARD NODE *xlmakesym();
FORWARD NODE *findprop();

/* xlenter - enter a symbol into the oblist or keylist */
NODE *xlenter(name,type)
  char *name;
{
    return (symenter(name,type,(*name == ':' ? keylist : oblist)));
}


==== ecmi05/devtr98.txt ====
! UPDATED 10/11/80 - ALL FILES MADE TEMPORARY
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/devtr99.txt ====
! UPDATED 2/12/80 - BUG IN ABBREV
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/xlisp_tracelsp.txt ====
(setq *tracelist* nil)

(defun evalhookfcn (expr &aux val)
       (if (and (consp expr) (member (car expr) *tracelist*))
           (progn (princ ">>> ") (print expr)
                  (setq val (evalhook expr evalhookfcn nil))
                  (princ "<<< ") (print val))
           (evalhook expr evalhookfcn nil)))

(defun trace (fun)
       (if (not (member fun *tracelist*))
	   (progn (setq *tracelist* (cons fun *tracelist*))
                  (setq *evalhook* evalhookfcn)))
       *tracelist*)

(defun untrace (fun)
       (if (null (setq *tracelist* (delete fun *tracelist*)))
           (setq *evalhook* nil))
       *tracelist*)

==== ecmi05/ai2log910.txt ====
! UPDATED 06/02/81 - DOLOGO REMOVED
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/xlisp_xljumpc.txt ====
/* xljump - execution context routines */

#include "xlisp.h"

/* external variables */
extern CONTEXT *xlcontext;
extern NODE *xlvalue;
extern NODE *xlstack,*xlenv,*xlnewenv;
extern int xltrace,xldebug;

/* xlbegin - beginning of an execution context */
xlbegin(cptr,flags,expr)
  CONTEXT *cptr; int flags; NODE *expr;
{
    cptr->c_flags = flags;
    cptr->c_expr = expr;
    cptr->c_xlstack = xlstack;
    cptr->c_xlenv = xlenv;
    cptr->c_xlnewenv = xlnewenv;
    cptr->c_xltrace = xltrace;
    cptr->c_xlcontext = xlcontext;

==== ecmi05/xlisp_makefile.txt ====
SRC1=	xlobj.c xllist.c xlcont.c xlbfun.c
SRC2=	xldmem.c xleval.c xlfio.c xlftab.c xlglob.c xlio.c xlisp.c xljump.c \
	xlmath.c xlprin.c xlread.c xlinit.c
SRC3=	xlsetf.c xlstr.c xlsubr.c xlsym.c xlsys.c xlbind.c xldbug.c
SRCS=	$(SRC1) $(SRC2) $(SRC3) xlisp.h

OBJS=	xlbfun.o xlbind.o xlcont.o xldbug.o xldmem.o xleval.o xlfio.o \
	xlftab.o xlglob.o xlinit.o xlio.o xlisp.o xljump.o xllist.o xlmath.o \
	xlobj.o xlprin.o xlread.o xlsetf.o xlstr.o xlsubr.o xlsym.o xlsys.o 
MISC=	Makefile fact.lsp init.lsp object.lsp prolog.lsp trace.lsp \
	xlstub.c.NOTUSED 

CFLAGS=	-O

xlisp: $(OBJS)
	cc -o xlisp $(CFLAGS) $(OBJS)

$(OBJS): xlisp.h

rcs: $(SRCS)
	rcs -l $?

==== ecmi05/tape.txt ====
THIS IS LOGO TAPE PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPRESENTS ALLOCATION OF TAPE.

==== ecmi05/xlisp_objectlsp.txt ====
; This is an example using the object-oriented programming support in
; XLISP.  The example involves defining a class of objects representing
; dictionaries.  Each instance of this class will be a dictionary in
; which names and values can be stored.  There will also be a facility
; for finding the values associated with names after they have been
; stored.

; Create the 'Dictionary' class.

(setq Dictionary (Class 'new))

; Establish the instance variables for the new class.
; The variable 'entries' will point to an association list representing the
; entries in the dictionary instance.

(Dictionary 'ivars '(entries))

; Setup the method for the 'isnew' initialization message.
; This message will be send whenever a new instance of the 'Dictionary'
; class is created.  Its purpose is to allow the new instance to be
; initialized before any other messages are sent to it.  It sets the value

==== ecmi05/xlisp_xlsysc.txt ====
/* xlsys.c - xlisp builtin system functions */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack;
extern int anodes;

/* external symbols */
extern NODE *a_subr,*a_fsubr;
extern NODE *a_list,*a_sym,*a_int,*a_str,*a_obj,*a_fptr;
extern NODE *true;

/* xload - direct input from a file */
NODE *xload(args)
  NODE *args;
{
    NODE *oldstk,fname,*val;
    int vflag,pflag;

    /* create a new stack frame */

==== ecmi05/h_evalp.txt ====
/************************************************************************
*									*
*                  C Prolog     evalp.h					*
*                  ========	-------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

/*----------------------------------------------------------------------+
|									|
|   These are the internal codes for the evaluable  predicates.   They	|
|   connect  the  definitions in the bootstrap file(s) to the big case	|

==== ecmi05/z5dr.txt ====





                                        1. INTRODUCTION.




                There seem  to be two main concerns and goals behind the work on natural
              language using computers, converging at many points. One goal, that of more
              natural communication with computers, has its roots in the concern for application
              of the fruits of computational research, amplified by the recent race to build a new
              generation of computers, in order to make them even more user-oriented and
              more useful for our purposes. The other goal is theoretical investigation of human
              language, and some researchers hope that the computer might be a very useful
              tool in this task; this hope is expressed by Winograd (1983: 13) thus

              'The computer  shares with  the human  mind the  abiblity to  manipulate
              symbols and carry out complex processes that include making decisions on
              the  basis of  stored knowledge.   Unlike the  human mind,  the computer

==== ecmi05/xlisp_xlispc.txt ====
/* xlisp - an experimental version of lisp that supports object-oriented
           programming */

#include "xlisp.h"

/* define the banner line string */
#define BANNER	"XLISP version 1.4 - 14-FEB-1985, by David Betz"

/* external variables */
extern NODE *s_stdin,*s_stdout;
extern NODE *s_evalhook,*s_applyhook;
extern NODE *true;

/* main - the main routine */
main()
/*
main(argc,argv)
  int argc; char *argv[];
*/
{
    NODE expr;

==== ecmi05/xlisp_xlisph.txt ====
/* xlisp - a small subset of lisp */

/* system specific definitions */
#define UNIX

#ifdef AZTEC
#include "stdio.h"
#include "setjmp.h"
#else
#include <stdio.h>
#include <setjmp.h>
#include <ctype.h>
#endif

/* NNODES	number of nodes to allocate in each request */
/* TDEPTH	trace stack depth */
/* FORWARD	type of a forward declaration (usually "") */
/* LOCAL	type of a local function (usually "static") */

/* for the Computer Innovations compiler */
#ifdef CI

==== ecmi05/c_rewrite.txt ====
/************************************************************************
*									*
*		   C Prolog	rewrite.c				*
*		   ========	---------				*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

#include "pl.h"

#define PREFIX	0
#define INFIX	1

==== ecmi05/ai2logs.txt ====
%EXTERNALROUTINE AI2LOGO
%EXTERNALROUTINESPEC RUN(%STRING(63) S)
RUN('ECMI05.AI2LOGOY')
%END
%ENDOFFILE

==== ecmi05/xlisp_manual.txt ====





            XLISP: An Experimental Object Oriented Language

                              Version 1.4

                            January 1, 1985


                                   by
                               David Betz
                           114 Davenport Ave.
                         Manchester, NH  03103

                         (603) 625-4691 (home)




==== ecmi05/xlisp_xlobjc.txt ====
/* xlobj - xlisp object functions */

#include "xlisp.h"

#ifdef MEGAMAX
overlay "overflow"
#endif

/* external variables */
extern NODE *xlstack;
extern NODE *xlenv,*xlnewenv;
extern NODE *s_stdout;
extern NODE *self;
extern NODE *class;
extern NODE *object;
extern NODE *new;
extern NODE *isnew;
extern NODE *msgcls;
extern NODE *msgclass;
extern int varcnt;


==== ecmi05/xlisp_xlreadc.txt ====
/* xlread - xlisp expression input routine */

#include "xlisp.h"
#include "ctype.h"

/* external variables */
extern NODE *s_stdout,*true;
extern NODE *s_quote,*s_function,*s_bquote,*s_comma,*s_comat;
extern NODE *xlstack;
extern int xlplevel;

/* external routines */
extern FILE *fopen();

/* forward declarations */
FORWARD NODE *plist();
FORWARD NODE *pstring();
FORWARD NODE *pquote();
FORWARD NODE *pname();

/* xlload - load a file of xlisp expressions */

==== ecmi05/readmetoo.txt ====
This directory contains
	the C source code for C-Prolog (*.c and *.h files)
	a makefile
	a startup script used by the makefile
	a directory bmark
	    containing some benchmark files
	    the main Edinburgh benchmark files are NOT here
	a directory pl
	    containing the parts of the Prolog system
	    which are defined in Prolog
	some other junk

To make a new Prolog system,
	check the makefile to see that the FinalVn is right.

	if the C part of the system has changed,
	    "make prolog"
	if the Prolog part of the system has changed,
	or if the format of a saved state has changed,
	    "make startup"


==== ecmi05/xlisp_xlprinc.txt ====
/* xlprint - xlisp print routine */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack;
extern char buf[];

/* xlprint - print an xlisp value */
xlprint(fptr,vptr,flag)
  NODE *fptr,*vptr; int flag;
{
    NODE *nptr,*next;

    /* print nil */
    if (vptr == NIL) {
	putstr(fptr,"nil");
	return;
    }

    /* check value type */

==== ecmi05/turtle.txt ====
THIS IS LOGO TURTLE PSEUDO FILE.
IT IS PERMITTED WRITE UNSHARED TO ALL, AND CONNECTION OF THIS
FILE REPRESENTS ALLOCATION OF TURTLE.

==== ecmi05/initlogs.txt ====
%EXTERNALROUTINE INITLOGO
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING (63) S)
%EXTERNALROUTINESPEC PERMITFILE(%STRING (63) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING (63) S)
%EXTERNALROUTINESPEC CHERISH(%STRING (63) S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER C,%INTEGERNAME L)
%INTEGER LEN,EUNAD,I
%BYTEINTEGERNAME A
%BYTEINTEGERARRAY EUNBYTE(1:7)
%STRING(6) %NAME EMASUSER
EUNAD=COMREG(16)
EUNBYTE(1)=6
%CYCLE I=2,1,7
EUNBYTE(I)=BYTEINTEGER(EUNAD+I-2)
%REPEAT
EMASUSER==STRING(ADDR(EUNBYTE(1)))
DEFINE('SM04,LOGODIR');NEWSMFILE('LOGODIR,4096')
A==BYTEINTEGER(SMADDR(4,LEN))
A=0
%PRINTTEXT ' LOGODIR NOW EXISTS, LENGTH IS '

==== ecmi05/lingos30.txt ====
%BEGIN
!
! CHANNEL USAGE
! ST01 - DUMPFILE AND DRIBBLE AT GOODBYE
! ST02 - ELGNAM
! SM04 - OWNFILE
! SM05 - LOGERRS
! SM06 - LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM09 - LOGMASTR
! SM10 - LOGOTEMP
! SM11 - LOGODRIB
! SM12 - NEW LOGON IN EDITMASTER
! ST13 - SHOWFILE?
!
!*****************************************
! GRAPHICS LINKAGE
!*****************************************
!
%EXTERNALINTEGERFNSPEC CONV (%INTEGER X)

==== ecmi05/xlisp_xlbindc.txt ====
/* xlbind - xlisp symbol binding routines */

#include "xlisp.h"

/* external variables */
extern NODE *xlenv,*xlnewenv;

/* xlsbind - bind a value to a symbol sequentially */
xlsbind(sym,val)
  NODE *sym,*val;
{
    NODE *ptr;

    /* create a new environment list entry */
    ptr = newnode(LIST);
    rplacd(ptr,xlenv);
    xlenv = ptr;

    /* create a new variable binding */
    rplaca(ptr,newnode(LIST));
    rplaca(car(ptr),sym);

==== ecmi05/books.txt ====
book(et,sfipubs).
book(son_of_et,sfipubs).
book(i_was_a_teenage_robot,sfipubs).
book(et_rides_again,sfipubs).
book(biggles_and_wendy,virago).
book(freda_the_fire_engine,virago).
book(i_claudius,penguin).
book(history_of_the_western_world,penguin).
book(dictionary_of_computing,penguin).
book(ttl_cookbook,sams).
book(cmos_cookbook,sams).

stocks(james_thin,sfipubs).
stocks(james_thin,virago).
stocks(james_thin,penguin).
stocks(menzies,sfipubs).
stocks(better_books,penguin).
stocks(better_books,virago).
stocks(bauermeister,penguin).
stocks(bauermeister,sams).
stocks(edinbooks,sfipubs).

==== ecmi05/xlisp_xldbugc.txt ====
/* xldebug - xlisp debugging support */

#include "xlisp.h"

/* external variables */
extern long total;
extern int xldebug;
extern int xltrace;
extern NODE *s_unbound;
extern NODE *s_stdin,*s_stdout;
extern NODE *s_tracenable,*s_tlimit,*s_breakenable;
extern NODE *s_continue,*s_quit;
extern NODE *xlstack;
extern NODE *true;
extern NODE **trace_stack;

/* external routines */
extern char *malloc();

/* forward declarations */
FORWARD NODE *stacktop();

==== ecmi05/xlisp_xlftabc.txt ====
/* xlftab.c - xlisp function table */

#include "xlisp.h"

/* external functions */
extern NODE
    *xeval(),*xapply(),*xfuncall(),*xquote(),*xbquote(),
    *xset(),*xsetq(),*xsetf(),*xdefun(),*xdefmacro(),
    *xgensym(),*xmakesymbol(),*xintern(),
    *xsymname(),*xsymvalue(),*xsymplist(),*xget(),*xremprop(),
    *xcar(),*xcaar(),*xcadr(),*xcdr(),*xcdar(),*xcddr(),
    *xcons(),*xlist(),*xappend(),*xreverse(),*xlast(),*xnth(),*xnthcdr(),
    *xmember(),*xassoc(),*xsubst(),*xsublis(),*xremove(),*xlength(),
    *xmapc(),*xmapcar(),*xmapl(),*xmaplist(),
    *xrplca(),*xrplcd(),*xnconc(),*xdelete(),
    *xatom(),*xsymbolp(),*xnumberp(),*xboundp(),*xnull(),*xlistp(),*xconsp(),
    *xeq(),*xeql(),*xequal(),
    *xcond(),*xand(),*xor(),*xlet(),*xletstar(),*xif(),
    *xprog(),*xprogstar(),*xprog1(),*xprog2(),*xprogn(),*xgo(),*xreturn(),
    *xcatch(),*xthrow(),
    *xerror(),*xcerror(),*xbreak(),*xerrset(),*xbaktrace(),*xevalhook(),

==== ecmi05/oldlogos.txt ====
%BEGIN
%EXTERNALROUTINESPEC DISCONNECT(%STRING(63) S)
%EXTERNALROUTINESPEC CLOSESM(%INTEGER CH)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%SYSTEMROUTINESPEC FINFO(%STRING(15) S,%INTEGER LEV,%C
%RECORDNAME R, %INTEGERNAME FLAG)
%EXTERNALSTRINGFNSPEC DATE
%EXTERNALROUTINESPEC LIST(%STRING(63) S)
%EXTERNALSTRINGFNSPEC TIME
%EXTERNALLONGREALFNSPEC CPUTIME
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER CHANN,%INTEGERNAME LENGTH)
%EXTERNALROUTINESPEC DEFINE(%STRING (65) S)
%EXTERNALROUTINESPEC PERMIT FILE(%STRING (65) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING (63) S)
%EXTERNALROUTINESPEC CHERISH(%STRING (63) S)

%EXTERNALROUTINESPEC PROMPT(%STRING(15) M)
%EXTERNALROUTINESPEC DESTROY(%STRING(65) S)
%EXTERNALROUTINESPEC CLOSESTREAM(%INTEGER CH)
%EXTERNALREALFNSPEC RANDOM (%INTEGERNAME I,%INTEGER J)
%EXTERNALINTEGERFNSPEC TESTINT(%INTEGER C,%STRING(15) INT)

==== ecmi05/lognam910.txt ====
0.9
'EMPTY' ''
'SPACE' ' '
'NL' '
'
'TAB' '      '
'TRUE' 'TRUE'
'FALSE' 'FALSE'
'QUOTE' ''''
'DOTS' ':'
'('
')'
','
'NIL'
'UNDEF'
'THEN'
'ELSE'
'END'
'DELETE'
'UNDO'
'UNDOS'

==== ecmi05/c_main.txt ====
/************************************************************************
*									*
*		   C Prolog      main.c					*
*		   ========	 ------					*
*									*
*  By Fernando Pereira, July 1982.					*
*  EdCAAD, Dept. of Architecture, University of Edinburgh.		*
*									*
*  Based on the Prolog system written in IMP by Luis Damas for ICL 2900	*
*  computers, with some contributions by Lawrence Byrd.  Stricter types	*
*  and several extensions by Richard O'Keefe, also BACKWARDS support.	*
*									*
*  Copyright (C) 1982 Fernando Pereira, Luis Damas and Lawrence Byrd.	*
*  Copyright (C) 1984 F.Pereira, L.Damas, L.Byrd and R.A.O'Keefe.	*
*									*
************************************************************************/

#include "pl.h"
#include "evalp.h"
#include "arith.h"
#include <setjmp.h>

==== ecmi05/newlogs.txt ====
%EXTERNALROUTINE NEWLOGO(%STRING(0) S)
%EXTERNALROUTINESPEC RUN(%STRING(63) S)
RUN('ECMI05.NEWLOGOY')
%END
%ENDOFFILE

==== ecmi05/devtr910.txt ====
! UPDATED 06/02/81 - DOLOGO REMOVED
%BEGIN
!
!
!*********************************************************************
!
! MORE COMMENTS AND SWITCH SYSFUN(232) - SYSFUN(280) TIDIED UP
!
!*********************************************************************
!
! CHANNEL USAGE
! ST01 - T#DUMP
! ST02 - LOGNAM
! ST03 - T#TEMP
! SM04 - LOGOFILE
! SM06 - T#LOGOSTK
! SM07 - LOGOMON
! SM08 - BFILE
! SM10 - JUNK FILE
!
!*****************************************

==== ecmi05/prelogos.txt ====
%EXTERNALROUTINE PRELOGO
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING (63) S)
%EXTERNALROUTINESPEC PERMITFILE(%STRING(63) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING (63) S)
%EXTERNALROUTINESPEC CHERISH(%STRING (63) S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER C,%INTEGERNAME L)
%INTEGER LEN,EUNAD,I
%BYTEINTEGERNAME A
%BYTEINTEGERARRAY EUNBYTE(1:7)
%STRING(6) %NAME EMASUSER
EUNAD=COMREG(16)
EUNBYTE(1)=6
%CYCLE I=2,1,7
EUNBYTE(I)=BYTEINTEGER(EUNAD+I-2)
%REPEAT
EMASUSER==STRING(ADDR(EUNBYTE(1)))
DEFINE('SM04,LOGOINIT');NEWSMFILE('LOGOINIT,4096')
A==BYTEINTEGER(SMADDR(4,LEN))
A=0
%PRINTTEXT ' LOGOINIT NOW EXISTS, LENGTH IS '

==== ecmi05/xlisp_xlstrc.txt ====
/* xlstr - xlisp string builtin functions */

#include "xlisp.h"

/* external variables */
extern NODE *xlstack;

/* external procedures */
extern char *strcat();

/* xstrlen - length of a string */
NODE *xstrlen(args)
  NODE *args;
{
    NODE *val;
    int total;

    /* initialize */
    total = 0;

    /* loop over args and total */

==== ecmi05/parserdoc.txt ====
% File:		parser.doc
% Author:	Peter Ross
% Updated:	7 June 1985

This describes how to use the (very) simple chart parser written in Prolog
in the file 'parser'.

The program expects data in the form of Prolog clauses:

[1] rule(Tag, Category, ExpansionList).
	The 'Tag' argument is just anbitrary Prolog term used to group
	together a set of rule/3 and lexical/3 clauses. The parser needs
	to be told this tag in order to know which set of these clauses
	to use as data. Since it is arbitrary, you could use a compound
	term to allow you to selectively include rules, at no extra cost.
	The 'Category' argument identifies a syntactic category, e.g.
	noun or sentence.
	The 'ExpansionList' is a list giving one possible expansion of that
	category into sub-categories.

[2] lexical(Tag, Word, CategoryList).

==== ecmi05/xlisp_initlsp.txt ====
; get some more memory
(expand 1)

; some fake definitions for Common Lisp pseudo compatiblity
(setq symbol-function symbol-value)
(setq fboundp boundp)
(setq first car)
(setq second cadr)
(setq rest cdr)

; some more cxr functions
(defun caddr (x) (car (cddr x)))
(defun cadddr (x) (cadr (cddr x)))

; (when test code...) - execute code when test is true
(defmacro when (test &rest code)
          `(cond (,test ,@code)))

; (unless test code...) - execute code unless test is true
(defmacro unless (test &rest code)
          `(cond ((not ,test) ,@code)))

==== ecsc01/utilss_compars.txt ====
%constinteger max base commands=12
%conststring(255)%array base commands(1:max base commands)=%C
"alias","remove","monitor","stop","quit","launch","broadcast","tell",
"autoattack","surrender","dump","resources"
!"B","C","D","E","F","G","H","I","J","K","AL","LI","RE","ST"
%recordformat com form (%string(80)comstr,%byteinteger base,type)
%constinteger max possible commands=20
%ownrecord(com form)%array commands(1:max possible commands)
%owninteger max commands=0

%routine sort(%record(com form)%arrayname r,%integer lo,hi)
!%routine sort(%stringarrayname r,%integer lo,hi)
%integer i,j,k,l,n
%record(com form)x
!%string(255)x
l=lo-1
n=hi
!%while n<hi-l %cycle
!  n=2*n
!%repeat
! <=> 1<<((32- shz{shift while not zero}(hi-l-1))&31)

==== ecsc01/utilss_findprivs.txt ====
%externalroutine findpriv(%string(255)u)
%string(6)user
%integer flag,fsys,priv,i
%externalintegerfnspec dfsys(%string(6)user,%integername fsys)
%externalintegerfnspec dsfi (%string(6)user,%integer fsys,type,set,adr)
user<-u
%if length(user)#6 %then flag=8 %and ->out
fsys=-1
flag=dfsys(user,fsys)
->out %unless flag=0
flag=dsfi(user,fsys,38,0,addr(priv))
->out %unless flag=0
write(priv,1)
newline
%for i=0,1,32 %cycle
   %if (priv>>i)&1=1 %then write(i,3)
%repeat
out:
%if flag#0 %start
   printstring("Flag=")
   write(flag,1)

==== ecsc01/utilss_retrieves.txt ====
%externalroutine retrieve(%string(255)s)
%externalintegerfnspec dretrieve(%string(6)t,%integer c)
%systemroutinespec cast out (%string(255)%name s)
%systemintegerfnspec pstoi(%string(255)s)
%string(255)p1,p2
%string(6)t
%integer c,flag
cast out (s)
%unless s->p1.(",").p2 %start
   printstring("Bad param")
   newline
   %return
%finish
t<-p1
c=pstoi(p2)
flag=dretrieve(t,c)
printstring("RETRIEVE ".p1.",".p2." GIVES:")
write(flag,1)
%end
%endoffile

==== ecsc01/utilss_gsqs.txt ====
%externalroutine gsq(%string(255)s)
%externalroutinespec tcpusers(%string(255)s)
tcpusers("GESQ");tcpusers("GSQ2");
%end
%endoffile

==== ecsc01/utilss_iprocs.txt ====
%begin
%externalintegerfnspec DPROCS(%integername max,%integer adr)
%routine idprocs
%integer j,max,adr,l,k
%byteintegerarray plist(0:32*256)
%stringname user
   l=0
   max=256
   adr=addr(plist(0))
   j=dprocs(max,adr)
   %returnif j#0
   %cycle k=0,1,max-1
       user==string(addr(plist(32*k)))
       %unless user="" %start
           write(k,3)
           space
           printstring(user)
           l=l+1
           l=0 %and newline %if l=6
       %finish
   %repeat

==== ecsc01/utilss_finds.txt ====

%record %format rf(%integer conad, filetype, datastart, dataend)
%system %routine %spec connect(%string (31) file, %integer mode, hole, prot,
       %record (rf) %name r, %integer %name flag)
%external %integer %function %spec exist(%string (31) file)
%system %integer %function %spec currentll
%system %long %integer %function %spec load ep(%string (31) entry,
       %integer %name type, flag, %integer loadlevel)
%system %routine %spec unload2(%integer loadlevel, flag)
%external %integer %function %spec uinfi(%integer ep)
%external %routine %spec define(%string (255) s)
%external %routine %spec clear(%string (255) s)
%external %routine %spec closestream(%integer str)
%system %routine %spec ssmessa(%integer fail, %string (63) fname)
%system %routine %spec find entry(%string (31) entry, %integer type, dad,
       %string %name file, %integer %name dr0, dr1, flag)
%system %routine %spec load(%string (31) entry, %integer type,
       %integer %name flag)
%system %routine %spec setpar(%string (255) s)
%system %string %function %spec spar(%integer i)
%system %integer %function %spec parmap

==== ecsc01/sup_samplectopt.txt ====

!
! This file contains the const integers to control compile time options
! in EMAS2900
! it is intended to be concatenated onto the front of sourcefiles
! before compilation
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO = "P" series, YES = "S" series
%CONSTINTEGER MULTIOCP=YES;             ! YES to include semaphoring
%CONSTINTEGER RECONFIGURE=YES;          ! allow OCP/SAC/SMAC reconfiguration
%CONSTINTEGER SFCFITTED=NO;             ! NO for disc only sites
%CONSTINTEGER CPFITTED=NO;              ! card punch fitted
%CONSTINTEGER CSU FITTED=YES;           ! switch unit
%CONSTINTEGER DAP FITTED=YES;           ! array processor available
%CONSTINTEGER SNOOZING=YES;             ! YES allows suspend in store
                                        ! advantageous with large stores
%CONSTINTEGER PRODUCTION=NO;            ! YES for continuing after
                                        ! software errors(most of which
                                        ! are due to hardware!)
%CONSTINTEGER MONLEVEL=7;               ! 0= no monitoring

==== ecsc01/utilss_bellss.txt ====
%externalroutine bells(%string(255)dummy)
%integer i
%cycle i=1,1,20
      printch    (7)
      spaces(4)
%repeat
%end
%endoffile

==== ecsc01/utilss_testsm.txt ====
program testsm(output);
const out='Pascal test maps OK';
      magic = 402653440;
      fname=' 23,t#             ';
type  str19=packed array [1..19]of char;
      ptr19=^str19;
      ftype=packed array [1..711]of char;
      fptr=^ftype;
var   len:integer;
      mapper:fptr;
      smfile:ptr19;
procedure define(i:integer;stref:ptr19);extern;
procedure opensm(chan,mode:integer;var mapper:fptr;var len:integer);extern;
procedure closesm(chan:integer);extern;
begin
      new(smfile);
      smfile^:=fname;
      smfile^[1]:=chr(5);
      define(magic,smfile);
      opensm(23,1,mapper,len);
      writeln(len:5,' bytes of data accessed');

==== ecsc01/utilss_clnewusrs.txt ====
%externalroutine clnewusers(%string(255)par)
%externalroutinespec newusers(%string(255)s)
%externalroutinespec clearscreen(%string(255)s)
clearscreen("")
newline
newusers(par)
%end
%endoffile

==== ecsc01/utilss_notel.txt ====
Source: .IN         Compiled: 18/04/83   19.55.07
Object: T#O

Parms set: DEFAULTS



              ERCC. Imp80 Compiler Release 1 Version 12 Nov 82


  1023  3069
     1        %systemroutinespec to journal (%integer from,len)
     2        %externalroutine note (%string(255)s)
     3        s="
     4"       **** ".s."
     5"       "
     6        tojournal(addr(s)+1,length(s))
     7        %end
     8        %endoffile

     8 LINES ANALYSED IN    64 MSECS  -  SIZE=   214

==== ecsc01/utilss_heaps.txt ====
%constant %integer true=1,false=0,wordshift=2
%own %integer base=0,heap size=65535<<wordshift,
 moning=true,first hole=0,flag=0,
 first call=true
%record %format holef(%half %integer size,next)
%record %format crf(%integer conad,type,start,end)
%own %record (crf) connect report
%own %record (holef) %name prev,curr,succ
%constant %string (11) heap file="T#IHEAP"
%own %string (11) temp file=""
%system %routine %spec outfile(%string (31) file, %integer length,hole,prot,
    %integer %name conad,flag)
%external %integer %function %spec exist(%string (31) file)
%system %routine %spec destroy(%string (31) file, %integer %name flag)
%system %routine %spec connect(%string (31) file, %integer mode,hole,prot,
    %record (crf) %name report, %integer %name flag)
%system %routine %spec disconnect(%string (31) file, %integer %name flag)
%system %routine %spec newgen(%string (31) old,new, %integer %name flag)
%system %routine %spec rename(%string (31) old,new, %integer %name flag)
%system %routine %spec fill(%integer length,start,filler)
%external %integer %function %spec outpos

==== ecsc01/utilss_where.txt ====
%externalstring(63)%fnspec uinfs(%integer ep)
%systemstring(255)%fnspec itos(%integer i)
%systemstring(8)%fnspec htos(%integer i,places)
%externalroutine where(%string(255)dummy)
%string(63)terms
terms=uinfs(14)
%string(6) tcp
%string(8) hexC
%byteinteger C,N,T
N=charno(terms,1);T=charno(terms,2);C=charno(terms,3);
TCP=substring(terms,4,9)
hexC=htos(C,2)
printstring("You are on Console ".itos(c)." (X'".hexC."') on TCP ".TCP)
printstring(" network address N".itos(N)."T".itos(T))
newlines(2)
%end
%endoffile


==== ecsc01/utilss_pal.txt ====
%source off
{!TITLE     Palindrome Finding Program                                         }
{                                                                              }
{      This program is designed for interactive terminal use. It takes a number}
{as input, reverses the digits, adds the two numbers together and tests the    }
{result to see if it is a palindrome. This process can be repeated until either}
{a palindrome is found or the capacity of the array holding the number is r    }
{reached.                                                                      }
{      Further documentation is contained withing the program.                 }
{      Due to the interactive nature of the program no input or output streams }
{should be defined.                                                            }
{                                                                              }
{                                                                              }

program pal(inp,output);

const
   progname   = 'PALINDROME PROGRAM     VERSION 18  ';
   sp         = ' ';
   maxlength  = 100;
   namelength = 30;

==== ecsc01/locsys_locfile.txt ====
2Room 10 ,Appleton Tower Basement_________________
2Appleton Tower Basement__________________________
 Appleton Tower Basement__________________________
 Appleton Tower Basement__________________________
 Appleton Tower Level 4___________________________
2Appleton Tower Level 4___________________________
 Appleton Tower Level 4___________________________
 Appleton Tower Level 4___________________________
 Appleton Tower Level 4___________________________
2George Square____________________________________
 Appleton Tower Basement__________________________
2Forrest Hill Unix Line___________________________
 Appleton Tower Level 4___________________________
2Appleton Tower Basement__________________________
 Appleton Tower Basement__________________________
2Appleton Tower Basement__________________________
2Appleton Tower Basement__________________________
2Appleton Tower Basement__________________________
 Appleton Tower Basement__________________________
2Appleton Tower Basement__________________________
 Appleton Tower Level 4___________________________

==== ecsc01/t#utilss0_xrefs.txt ====
%EXTERNALROUTINE CROSSREF(%STRING(63)INPUT)
%CONSTINTEGER JOBNAMLEN=6,MAXDISP=15,MAXGLOB=255,MAXHASH=4095, %C
   MAXLINE=511,NAMLEN=8,OUTLINE=132,PAGESIZE=4096
%CONSTSTRING(23)VERSION="2.02 07/08/78  (MDB)"
%OWNSTRING(35)HEADER="* VARIABLE CROSS REFERENCE OF FILE "
%OWNSTRING(35)BLANK=""
%OWNSTRING(87)ASTK="*******************************************"
%INTEGER DATASTART,DEND,LENIN,M,MAXNAMES,MAXSTRINGS,MAXUSES
%STRING(31)DATETIME,MEMNAME,NAML,OUTPUT,VNAME
%EXTERNALROUTINESPEC DEFINE(%STRING(63)S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER N,%INTEGERNAME L)
%EXTERNALROUTINESPEC PROMPT(%STRING(15)S)
%EXTERNALSTRINGFNSPEC DATE
%EXTERNALSTRINGFNSPEC TIME
!*
%STRINGFN ITOSTR(%INTEGER I,M)
%STRING(1)SIGN
%STRING(63)S
M=0%IF M<0
%IF I<0%THEN SIGN="-"%AND I=IMOD(I)%ELSE SIGN=" "
S=""

==== ecsc01/total0303x.txt ====
Œ
Œ
! **** **** Never attempt to compile any of the subsystem without **** ****
! **** **** the PARMS NOCHECK and STACK.                          **** ****
!
!
! %CONST declarations for conditional compilation:
! NEWLOADER - SEPRTN must have the same value
! MACHINE   - SEPRTN  "    "    "    "    "  
! STUDENTSS - LOADER  "    "    "    "    "  
! PDFNFC
! PIPER
! NEWCONNECT.
!
!
! To be attended to:
!    Change OPTION to call a %SYSTEM %ROUTINE SETOPT (% STRING (255) PARMS,
!        %STRING (?) OPTION FILE NAME, %INTEGER %NAME FLAG)
!    so that student supervisors' utilities can use it.
!    Why doesn't DISCONNECT(.ALL) do T# files?  Probably not relevant with
!    the new CONNECT mechanism, but with the old mechanism I suppose it's

==== ecsc01/utilss_awaits.txt ====
%externalstringfnspec vdus(%integer i)
%externalroutinespec printchs(%string(255)s)
%recordformat parmf(%integer dest,srce,p1,p2,p3,p4,p5,p6)
%dynamicroutinespec dpoff(%record(parmf)%name p)
%dynamicintegerfnspec ddelay(%integer secs)
%externalroutine await(%string(255) s)
%record(parmf) p
%integer i
printchs(vdus(1))
newlines(5)
printstring("         This terminal is still in use - please do not try to use it")
newlines(5)
i=ddelay(2)
p=0
      dpoff(p)
      %end; ! AWAIT
%endoffile

==== ecsc01/t#utilss0_preface.txt ====
!TITLE UTILITIES FOR USE ON EMAS

==== ecsc01/t#utilss0_uinffs.txt ====
program uinffs(output);
const uinfstart=2359296;
type
      uinff=packed record
            user:packed array[0..6]of char;
            jobdocfile:packed array[0..31]of char;
            mark,fsys,procno,isuff,reason,batchid,
            sessiclim,scidensad,scidens,startcnsl,aiostat,sctdate,sync1dest,sync2dest,
            asyncdest,aacctrec,aicrevs:integer;
            jobname:packed array[0..15]of char;
            basefile:packed array[0..31]of char;
            previc,
            itaddr0,itaddr1,itaddr2,itaddr3,itaddr4,streamid,dident,scarcity,
            preemptat:integer;
            spoolrfile:packed array[0..11]of char;
            funds,sesslen,priority,decks,drives,partclose:integer;
            tmodes:packed array[1..20]of char{DUMMY FILLER!!!};
            pslot:integer;
            itaddr:packed array[0..63]of char;
            fclosing:packed array[0..3]of char;
            clofes,

==== ecsc01/pi7hs.txt ====
%external %routine initialise %alias "S#INITIALISE"

   ! Note: this version of PRINTINIT7 assumes that the printer is a Philips
   !       GP300 dot matrix printer or a Xerox 2700 laser printer.
   !       Various permission checks (terminal, process used etc.) have been
   !       removed. If required in the future, the original listing of
   !       PRINTINIT7A should be examined and the relevant code used.

   %constant %integer save max=7
   %record %format crrf(%integer conad, filetype, datastart, dataend)
   %record %format fhf(%integer end, start, size, type, fhole, dt, sp1, sp2)
   %record %format infof(%integer vsn, state, %string (7) ident, user, %string (15) dest, srce,
     output, %string (31) name, delivery, %string (63) message, %integer dtrec, dtst, dtopst,
     dtdel, start, length, time, (%integer oplim %or %integer cc), %integer size,
     (%integer prior %or %integer pc), %integer aftdt, ahead, %byte %integer forms,
     mode, copies, order, rerun, decks, drives, fails) {256 bytes}
   %record (infof) %name info
   %record (infof) %array %name saveinfo
   %record %format profrecf(%integer cc, pbar, %string (6) %array bar(0:save max),
     %integer pfile, %record (infof) %array saveinfo(0:save max), %integer gcc,
     %string (8) gdate, %integer pc, gpc)

==== ecsc01/t#utilss0_findprivs.txt ====
%externalroutine findpriv(%string(255)u)
%string(6)user
%integer flag,fsys,priv,i
%externalintegerfnspec dfsys(%string(6)user,%integername fsys)
%externalintegerfnspec dsfi (%string(6)user,%integer fsys,type,set,adr)
user<-u
%if length(user)#6 %then flag=8 %and ->out
fsys=-1
flag=dfsys(user,fsys)
->out %unless flag=0
flag=dsfi(user,fsys,38,0,addr(priv))
->out %unless flag=0
write(priv,1)
newline
%for i=0,1,32 %cycle
   %if (priv>>i)&1=1 %then write(i,3)
%repeat
out:
%if flag#0 %start
   printstring("Flag=")
   write(flag,1)

==== ecsc01/t#utilss0_memos.txt ====
%external %routine %spec writeprofile(%string(11) key, %name info,
    %integer %name version, flag)
%external %routine %spec readprofile(%string(11) key, %name info,
    %integer %name version, flag)
%system %routine %spec setpar(%string(255) s)
%system %string(255) %fn %spec spar(%integer i)
%system %integer %fn %spec parmap
%system %integer %fn %spec pstoi(%string(255) s)
%system %string(255) %fn %spec substring(%string %name s, %integer i, j)
%external %routine %spec prompt(%string(255) s)
%external %integer %fn %spec uinfi(%integer i)
%external %string(255) %fn %spec ucstring(%string(255) s)
%system %string %fn %spec itos(%integer i)
%const %integer secsin24hrs = 86400; ! SECS IN DAY
%const %integer days70 = 25567; ! DAYS FROM JAN1 1900 TO JAN1 1970
%const %long %integer secs70 = x'0000000083AA7E80'; ! SECS DITTO
%const %string(1) snl = "
"
%const %integer maxmemos=10
%record %format proff(%integer %array after(1:maxmemos),
    %string(255) %array text(1:maxmemos))

==== ecsc01/t#utilss0_retrieves.txt ====
%externalroutine retrieve(%string(255)s)
%externalintegerfnspec dretrieve(%string(6)t,%integer c)
%systemroutinespec cast out (%string(255)%name s)
%systemintegerfnspec pstoi(%string(255)s)
%string(255)p1,p2
%string(6)t
%integer c,flag
cast out (s)
%unless s->p1.(",").p2 %start
   printstring("Bad param")
   newline
   %return
%finish
t<-p1
c=pstoi(p2)
flag=dretrieve(t,c)
printstring("RETRIEVE ".p1.",".p2." GIVES:")
write(flag,1)
%end
%endoffile

==== ecsc01/sup_comms56s.txt ====

!  R.D.EAGER        CONTAINS CODE FOR OUTPUT ACCOUNTS IN COMM CONTROL,
!                   LP ADAPTOR AND CP ADAPTOR
!                 VERSION OF 13/06/80
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C

==== ecsc01/t#utilss0_allsourcess.txt ====
%constant %integer ssobjfiletype= 1
%constant %integer ssdirfiletype= 2
%constant %integer sscharfiletype= 3
%constant %integer ssdatafiletype= 4
%constant %integer sscorruptobjfiletype=5
%constant %integer sspdfiletype= 6
%constant %integer ssoptfiletype= 9
%constant %integer usingworkfile=0
%record %format connect report format(%integer connect address, file type,
    data start, data end)
%record %format contf(%integer dataend, datastart, psize, filetype, sum,
    datetime, spare1, spare2, mark, null1, ugla, astk, ustk, null2, itwidth,
    ldelim, rdelim, journal, searchdircount, arraydiag, initworksize, spare,
    itinsize, itoutsize, nobl, istk, %long %integer initparms,
    %integer dataecho, terminal, i23, i24, i25, i26, i27, i28, i29, i30, i31,
    i32, %string (31) fstartfile, bstartfile, preloadfile, moddir, cfaults,
    s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20,
    s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31, s32,
    %string (31) %array searchdir(1:16))
%record %format arf(%string (31) name, %integer type)
%system %routine %spec setpar(%string (255) s)

==== ecsc01/t#utilss0_clnewusrs.txt ====
%externalroutine clnewusers(%string(255)par)
%externalroutinespec newusers(%string(255)s)
%externalroutinespec clearscreen(%string(255)s)
clearscreen("")
newline
newusers(par)
%end
%endoffile

==== ecsc01/t#utilss0_penvs.txt ====
program uinf(output);
const
  userad=2359296;{str6}
  fsysad=2359343;{int}
  basefilead=2359420;{str31}
  scarcityad=2359484;{int}
  preemptad=2359488;{int}
  fundsad=2359504;{int}
  termad=2359564;{str63}
  secstocdad=-2134900564;{int}
  secsfrmnad=-2134900568;{int}
  datead=-2134900673;{int}
  timead=-2134900661;{int}
  usersad=-2134900648;{int}
  ocptypead=-2134900736;{int}
  tojdayad=-2134900680;{int}
  suplvnad=-2134900684;{int}
  rationad=-2134900604;{int}
type
  str6=packed array[0..6]of char;
  str31=packed array[0..31]of char;

==== ecsc01/sup_com37s.txt ====
!
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ecsc01/utilss_allsourcess.txt ====
%constant %integer ssobjfiletype= 1
%constant %integer ssdirfiletype= 2
%constant %integer sscharfiletype= 3
%constant %integer ssdatafiletype= 4
%constant %integer sscorruptobjfiletype=5
%constant %integer sspdfiletype= 6
%constant %integer ssoptfiletype= 9
%constant %integer usingworkfile=0
%record %format connect report format(%integer connect address, file type,
    data start, data end)
%record %format contf(%integer dataend, datastart, psize, filetype, sum,
    datetime, spare1, spare2, mark, null1, ugla, astk, ustk, null2, itwidth,
    ldelim, rdelim, journal, searchdircount, arraydiag, initworksize, spare,
    itinsize, itoutsize, nobl, istk, %long %integer initparms,
    %integer dataecho, terminal, i23, i24, i25, i26, i27, i28, i29, i30, i31,
    i32, %string (31) fstartfile, bstartfile, preloadfile, moddir, cfaults,
    s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20,
    s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31, s32,
    %string (31) %array searchdir(1:16))
%record %format arf(%string (31) name, %integer type)
%system %routine %spec setpar(%string (255) s)

==== ecsc01/t#utilss0_pass.txt ====

%constlonginteger password=987325576
%systemroutinespec phex(%integer i)
%externalstring(255)%fnspec interrupt
%externalroutinespec prompt(%string(255)p)
%externalroutinespec setmode(%string(255)s)
%integerfn encrypt(%longinteger n)
%longlongreal lr
%integer i
%constlonglongreal const=131719.0478125
%for i=1,1,6 %cycle
 lr=n
 lr=lr*const
 n=longinteger(addr(lr)+4);!middle 64 bits
%repeat
%result=integer(addr(n))
%end
%externalroutine privilege(%string(255)s)
%longinteger n
n=0
setmode("echo=off")

==== ecsc01/utilss_iprocs2.txt ====
%begin
%recordformat comf(%integerarray i1(1:25),%byteintegerarray b1(1:8),
                   %integerarray i2(1:9),%longinteger l1,
                   %integerarray i3(1:9),%integer MAXPROCS,
                   %integerarray i4(1:4),%integer PROCAAD)
%constrecord(comf)%name com=X'80000000'+48<<18
%integerfn VAL(%integer adr,len,rw,psr)
%integer inseg0,beyondseg0,seg0,seg0ad,dr0
  seg0=adr>>18
  %result=0 %unless 0<len<=32<<18
  %if psr=0 %start
     *LSS_(%LNB+1)
     *ST_PSR
  %finish
  %if seg0#(adr+len-1)>>18 %start
     seg0ad=seg0<<18
     inseg0=X'400000'-(adr-seg0ad)
     beyondseg0=len-inseg0
     %result=VAL(adr,inseg0,rw,psr)&VAL(adr+inseg0,beyondseg0,rw,psr)
  %finish
  dr0=x'18000000'!len

==== ecsc01/t#utilss0_pasmons.txt ====
%external %routine pasmon
   %system %routine %spec ndiag(%integer pc, lnb, fault, inf)
   %integer pc, lnb
      printstring("PASCAL MONITOR ENTERED: THE PROGRAM HAS NOT CRASHED")
      newline
      *lss_(%lnb +2)
      *st_pc
      *stln_lnb
      ndiag(pc, lnb, 0, 0)
      newline
      printstring("PASCAL MONITOR COMPLETED: RETURN TO PROGRAM")
      newline
%end
%end %of %file

==== ecsc01/utilss_fnoks.txt ====
program test_f_name(input,output);
type string31=packed array[1..31]of char;
var  filename:string31;

function fnok(s:string31;write_to:boolean):boolean;
var i,dot,sub:integer;fail,ftype:packed array[0..4]of boolean;done:boolean;

function my_file(s:string31):boolean;
const
  userad=2359296;{str6}
type
  str6=packed array[0..6]of char;
     cheat=record
         dummyi:integer;
         case boolean of
            true:(addr:integer);
            false:(ptr:^str6)
         end;
  var peeker:cheat;me,owner:str6;i:integer;
  begin
     peeker.addr:=userad;

==== ecsc01/utilss_uinffs.txt ====
program uinffs(output);
const uinfstart=2359296;
type
      uinff=packed record
            user:packed array[0..6]of char;
            jobdocfile:packed array[0..31]of char;
            mark,fsys,procno,isuff,reason,batchid,
            sessiclim,scidensad,scidens,startcnsl,aiostat,sctdate,sync1dest,sync2dest,
            asyncdest,aacctrec,aicrevs:integer;
            jobname:packed array[0..15]of char;
            basefile:packed array[0..31]of char;
            previc,
            itaddr0,itaddr1,itaddr2,itaddr3,itaddr4,streamid,dident,scarcity,
            preemptat:integer;
            spoolrfile:packed array[0..11]of char;
            funds,sesslen,priority,decks,drives,partclose:integer;
            tmodes:packed array[1..20]of char{DUMMY FILLER!!!};
            pslot:integer;
            itaddr:packed array[0..63]of char;
            fclosing:packed array[0..3]of char;
            clofes,

==== ecsc01/utilss_hasps.txt ====
%external %routine %spec set return code(%integer flag)
%external %integer %function %spec return code
%external %routine %spec detach(%string (255) s)
%external %routine %spec detachjob(%string (255) s)
%external %routine %spec prompt(%string (255) s)
%external %routine %spec destroy(%string (255) s)
%external %integer %function %spec exist(%string (255) s)
%systemroutinespec move(%integer len,from,to)
%system %routine %spec ssmessa(%integer flag, %string (63) fname)
%system %routine %spec outfile(%string (31) file, %integer size, hole, prot, %c
       %integer %name conad, flag)

%routine makefile(%string (255) ownfile)
   %integer flag, conad, i, j
      %on %event 9 %start
         ->out
      %finish
      destroy(ownfile) %if exist(ownfile) # 0
      outfile(ownfile, 4096, 0, X'40000000' {temp file}, conad, flag)
      %if flag # 0 %then ssmessa(flag, ownfile) %and ->err
      printstring("Enter contents of job file. Finish by typing Ctrl-Y")

==== ecsc01/t#utilss0_iodemos1.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr31   =^string31;
    string31=packed array[0..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure define(k:integer;p:ptr31);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;var l:integer;var name:string31):boolean;
var ok:boolean;temp:integer;
begin
if first_try then begin pprompt(prompt);reset(inp);first_try:=false;end
             else begin pprompt(prompt);while inp^=' ' do get(inp);end;
for l:=0 to 31 do name[l]:=' ';
l:=1;
while (inp^<>' ') and not(eoln(inp)) and (l<29) do begin

==== ecsc01/t#utilss0_iodemos2.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr63   =^string63;
    string63=packed array[0..63]of char;
    string31=packed array[1..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure pdefine(k:integer;p:ptr63);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;var l:integer;var name:string31):boolean;
var ok:boolean;temp:integer;
begin
if first_try then begin pprompt(prompt);reset(inp);first_try:=false;end
             else begin pprompt(prompt);while inp^=' ' do get(inp);end;
for l:=1 to 31 do name[l]:=' ';
l:=1;

==== ecsc01/t#utilss0_iodemos3.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr63   =^string63;
    string63=packed array[0..63]of char;
    string31=packed array[1..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure pdefine(k:integer;p:ptr63);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;
                  var l:integer;
                  var name:string31;
                  write_to:boolean):boolean;
var ok:boolean;temp:integer;

function fnok(s:string31;write_to:boolean):boolean;

==== ecsc01/utilss_clrscreens.txt ====
%externalstringfnspec vdus(%integer i)
%externalroutinespec printchs(%string(255)s)
%externalroutine clearscreen(%string(255)s)
printchs(vdus(1))
%end
%endoffile

==== ecsc01/utilss_usnames.txt ====
%systemstring(31)%fnspec username(%string(6)u,%integer i)
%externalroutine name(%string(255) s)
%string(6)u
%if s = "" %thenreturn
u<-s
s=username(u,1)
%if s#"?" %then printstring(u." <==> ".s) %else printstring("Not known")
newline
%end
%endoffile

==== ecsc01/utilss_user.txt ====
program processes(output);
const uinfstart=2359296;ausers=-2134900645;
type
      uinff=packed array[0..6] of char;
      uinf_p_t=record
               dummyp:integer;
               case boolean of
                  true:(paddr:integer);
                  false:(pval:^uinff)
               end;
      int_p_t=record
              dummyi:integer;
              case boolean of
                  true:(iaddr:integer);
                  false:(ival:^integer)
              end;
var
      i:integer;
      int_ptr:int_p_t;
      uinf_ptr:uinf_p_t;
      user:uinff;

==== ecsc01/utilss_proc1.txt ====
program processes(input,output);
const procaad=-2134900528;maxprocs=-2134900736;
type
      procf=packed record
            user:packed array[0..6] of char;
            incar,category,wsn,rung,active:char;
            actwo,lstat,lamtx,stack,status:integer
            end;
      plist_t=packed array [0..256] of procf;
      proc_p_t=record
               dummyp:integer;
               case boolean of
                  true:(paddr:integer);
                  false:(pval:^procf)
               end;
      integer_p_t=record
                  dummyi:integer;
                  case boolean of
                    true:(iaddr:integer);
                    false:(ival:^integer)
                  end;

==== ecsc01/t#ut0.txt ====
>>>>ALLSOURCESS<<<<
%constant %integer ssobjfiletype= 1
%constant %integer ssdirfiletype= 2
%constant %integer sscharfiletype= 3
%constant %integer ssdatafiletype= 4
%constant %integer sscorruptobjfiletype=5
%constant %integer sspdfiletype= 6
%constant %integer ssoptfiletype= 9
%constant %integer usingworkfile=0
%record %format connect report format(%integer connect address, file type,
    data start, data end)
%record %format contf(%integer dataend, datastart, psize, filetype, sum,
    datetime, spare1, spare2, mark, null1, ugla, astk, ustk, null2, itwidth,
    ldelim, rdelim, journal, searchdircount, arraydiag, initworksize, spare,
    itinsize, itoutsize, nobl, istk, %long %integer initparms,
    %integer dataecho, terminal, i23, i24, i25, i26, i27, i28, i29, i30, i31,
    i32, %string (31) fstartfile, bstartfile, preloadfile, moddir, cfaults,
    s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20,
    s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31, s32,
    %string (31) %array searchdir(1:16))
%record %format arf(%string (31) name, %integer type)

==== ecsc01/t#utilss0_gsqs.txt ====
%externalroutine gsq(%string(255)s)
%externalroutinespec tcpusers(%string(255)s)
tcpusers("GESQ");tcpusers("GSQ2");
%end
%endoffile

==== ecsc01/locsys_helpinfo.txt ====
!TITLE Location System Help Info
!< Current Version Of Location System 27/09/83

!< Descriptions Of Commands

!< The Command Addname

     This command is used to construct a name list in your ss#profile file,
this name list being used in conjunction with the FIND command (see below)
     The name list contains a user number and string associated with each
entry , these data elements being entered in the following way.

Command:ADDNAME ECTU74,"G.Wallace
Number Of Names Inserted = 1


!>

!< The Command Removename

   This command is the opposite of ADDNAME and simply removes a user from

==== ecsc01/t#utilss0_pal.txt ====
%source off
{!TITLE     Palindrome Finding Program                                         }
{                                                                              }
{      This program is designed for interactive terminal use. It takes a number}
{as input, reverses the digits, adds the two numbers together and tests the    }
{result to see if it is a palindrome. This process can be repeated until either}
{a palindrome is found or the capacity of the array holding the number is r    }
{reached.                                                                      }
{      Further documentation is contained withing the program.                 }
{      Due to the interactive nature of the program no input or output streams }
{should be defined.                                                            }
{                                                                              }
{                                                                              }

program pal(inp,output);

const
   progname   = 'PALINDROME PROGRAM     VERSION 18  ';
   sp         = ' ';
   maxlength  = 100;
   namelength = 30;

==== ecsc01/t#utilss0_copy3s.txt ====
%constant %integer true=0,false=1
%constant %integer testing=false
%if testing = true %start
   %routine %spec monitor(%string (255) s)
%finish
%system %string %function %spec failuremessage(%integer flag)
%system %string (31) %function %spec itos(%integer i)
%own %string (11) save owner,save file
%own %integer already connected=0
%constant %string (6) %name me=9<<18
%system %routine %spec outfile(%string (31) file, %integer size,hole,prot,
    %integer %name conad,flag)
%system %routine %spec move(%integer len,from,to)
%system %routine %spec destroy(%string (31) file, %integer %name flag)
%system %string (31) %function %spec nexttemp
%system %routine %spec setpar(%string (255) par)
%system %integer %function %spec parmap
%system %string (31) %function %spec spar(%integer which)
%system %integer %function %spec allowconnect(%string (6) who,
    %string (11) what)
%system %routine %spec zcopy2(%string (255) par, %integer silent,

==== ecsc01/sup_makechkd.txt ====
PARM NOCHECK,NOLIST,STACK
IMP80 CTOPT+SUP29CSRCE_SUP29CS,SUPZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_COM37S,COMZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_PRINT10S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_OPER38S,OPERZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_ENTER17S,ENTERZZ,,.OUT
PARM OPT,STACK,NOLIST
IMP80 CTOPT+SUP29CSRCE_GPC40S,GDCZZ,,.OUT
IMP80 SUP29CSRCE_NDIAG07S,NDIAGZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_COMMS56S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_FAST44S,FASTZZ,,.OUT
IMP80 CTOPT+SUP29CSRCE_TAPE80S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GDCZZ
NDIAGZZ

==== ecsc01/utilss_anals.txt ====
%constant %integer ssdatafiletype= 4
%constant %integer ssobjfiletype= 1
%constant %integer sscorruptobjfiletype=5
%constant %integer ssdirfiletype= 2
%constant %integer sscharfiletype= 3
%constant %integer sspdfiletype= 6
%constant %integer ssoptfiletype= 9
%record %format arf(%string (31) name, %integer type)
%record %format pdhf(%integer dataend, datastart, size, filetype, sum,
       datetime, adir, count)
%record %format rf(%integer conad, filetype, datastart, dataend)
%record %format dhf(%integer dataend, datastart, size, filetype, sum,
       datetime, pstart, spare)
%record %format lnf(%byte %integer type, %string (6) name, %integer rest,
       point, dr1)
%record %format frf(%integer conad, filetype, datastart, datend, size, rup,
       eep, mode, users, arch, %string (6) tran, %string (8) date, time,
       %integer count, spare1, spare2)
%record %format hf(%integer dataend, datastart, filesize, filetype, sum,
       datetime, format, records)
%record %format dahf(%integer dataend, datastart, size, filetype, date, time,

==== ecsc01/t#utilss0_getaddr.txt ====
%begin
%recordformat comf %c
(%integerarray i1(1:25),%byteintegerarray b1(1:8),%integerarray i2(1:9),
%longinteger l1,%integerarray i3(1:9),%integer MAXPROCS,
%integerarray i4(1:4),%integer PROCAAD)
%constrecord(comf)%name com=X'80000000'+48<<18
printstring("Addresses of communications record")
newline
printstring("Record starts at ");write(addr(com_i1(1)),10);newline
printstring("Maxprocs is at   ");write(addr(com_maxprocs),10);newline
printstring("Procaad is at    ");write(addr(com_procaad),10);newline
%endofprogram

==== ecsc01/locsys_newsys.txt ====
! Constant Filenames
%CONSTANT %STRING (20) database = "ECMU24.locfile"
%CONSTANT %STRING (20) update   = "ECMU23.upusers"
%CONSTANT %STRING (20) helpfile = "ECMU23.helpfile"

! Stuff Needed For Connect
%RECORD %FORMAT recfor(%INTEGER conad,filetype,datastart,dataend)
%SYSTEM %ROUTINE %SPEC connect(%STRING (31) filename, %INTEGER access,
   maxbytes,prot, %RECORD (recfor) %NAME r, %INTEGER %NAME flag)
%SYSTEM %ROUTINE %SPEC disconnect(%STRING (31) filename, %INTEGER %NAME flag)




! Common External Reference Points
%EXTERNAL %ROUTINE %SPEC writeprofile(%STRING (11) key, %NAME blah,
    %INTEGER %NAME version,flag)
%EXTERNAL %STRING (255) %FUNCTION %SPEC uinfs(%INTEGER i)
%EXTERNAL %INTEGER %FUNCTION %SPEC uinfi(%INTEGER i)
%EXTERNAL %ROUTINE %SPEC readprofile(%STRING (11) key, %NAME info,
    %INTEGER %NAME v,f)

==== ecsc01/utilss_interrupts.txt ====
   
!TITLE Interrupts, %EVENTs and fault trapping.
!<Interrupts
    Subsystem cannot control or handle interrupts on its own, and has to
exploit the facilities offered by Director for the purpose.
!< PRIME CONTINGENCY
    One of the tools provided is the
    %EXTERNAL %INTEGER %FN PRIME CONTINGENCY (%ROUTINE TRAP)
in Director.  This need only be called once, to nominate the routine TRAP
to Director.  The %SPEC of TRAP must be
    %ROUTINE %SPEC TRAP (%INTEGER CLASS, SUBCLASS).
If an interrupt subsequently occurs which is relevant to the process
(and subject to some conditions which will appear later), Director
will suspend the process and force it to enter TRAP, supplying the
two %INTEGER parameters CLASS and SUBCLASS to indicate what sort of
interrupt has occurred.  TRAP will normally be some routine which is
declared as part of the subsystem, and in the standard subsystem it is
the routine DIRTRAP, declared in module BASE.  The corresponding call of
PRIME CONTINGENCY is almost the first instruction executed in the
%SYSTEM %ROUTINE CONTROL declared in module CONT.
!>

==== ecsc01/utilss_preface.txt ====
!TITLE UTILITIES FOR USE ON EMAS

==== ecsc01/t#utilss0_userss.txt ====
%EXTERNALROUTINE MYUSERS(%STRING(255)S)
%externalroutinespec printchs(%string(255)s)
%externalstring(31)%fnspec vdus(%integer i)
!%externalintegerfnspec fecount(%integername a, b)
%EXTERNALINTEGERFNSPEC DPROCEDURE(%INTEGER ACT, ADR)
%RECORDFORMAT RF1(%INTEGER N, A)
%RECORD(RF1) R1
%RECORDFORMAT PF(%STRING(6)USER, %STRING(15)TCP, %BYTEINTEGER A, INVOC, B, N, F,
      %INTEGER LOGS, %BYTEINTEGER site, reason, cons1, cons2, %c
       %INTEGER ID, PROC, G, H, Z)
%RECORD(PF)%ARRAY P(1:256)
%record (pf) %name pp
%INTEGER J, feusers,tcpusers, i, k, f, l, max
%integerarray fe(0:4)
%ownintegerarray index(0:255)

%string (24) t,u
%string(12)%array nam(1:50)
%ownintegerarray nuf(1:50)
%ownintegerarray nus(1:50)


==== ecsc01/sup_gdc02s.txt ====
!*
!*    GPC/DCU driver
!*
%CONSTSTRING(26) VSN=".GDC02 - 4th May 1983"
%OWNINTEGER IVSN=M'GDC2'
!*
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %C
                                          %STRING(23)TEXT))
!*
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C

==== ecsc01/utilss_copy3s.txt ====
%constant %integer true=0,false=1
%constant %integer testing=false
%if testing = true %start
   %routine %spec monitor(%string (255) s)
%finish
%system %string %function %spec failuremessage(%integer flag)
%system %string (31) %function %spec itos(%integer i)
%own %string (11) save owner,save file
%own %integer already connected=0
%constant %string (6) %name me=9<<18
%system %routine %spec outfile(%string (31) file, %integer size,hole,prot,
    %integer %name conad,flag)
%system %routine %spec move(%integer len,from,to)
%system %routine %spec destroy(%string (31) file, %integer %name flag)
%system %string (31) %function %spec nexttemp
%system %routine %spec setpar(%string (255) par)
%system %integer %function %spec parmap
%system %string (31) %function %spec spar(%integer which)
%system %integer %function %spec allowconnect(%string (6) who,
    %string (11) what)
%system %routine %spec zcopy2(%string (255) par, %integer silent,

==== ecsc01/sup_ndiag07s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ecsc01/t#utilss0_snoops.txt ====
%conststring(1) snl="
"
%externalroutinespec files(%string(255)s)
%systemstring(31)%fnspec itos(%integer i)
%externalroutine snoop(%string(255)group)
%integer no
%string(2)nos
%if length(group)=6 %then files(group.".") %andreturn
%if length(group)<4 %then printstring("Invalid group".snl) %andreturn
%if length(group)=5 %start
    %for no=0,1,9 %cycle
       nos=itos(no)
       printstring("Command:files ".group.nos.".");newline
       files(group.nos.".")
    %repeat
%finishelsestart
    %for no=0,1,99 %cycle
       nos=itos(no);nos="0".nos %if no<10
       printstring("Command:files ".group.nos.".");newline
       files(group.nos.".")
    %repeat

==== ecsc01/cobhelp.txt ====


COBOL

   Invokes the VAX-11 COBOL compiler to compile a COBOL source program.
   See the VAX-11 COBOL User's Guide for additional information.

   This optional software product is available under separate license.

   Format:

        COBOL file-spec[,...]

   COBOL can also be used to:

        o  Invoke the VAX-11 COBOL-74 compiler (COBOL/C74)

  Additional information available:

  Other_compiler
  /C74

==== ecsc01/sspd_source.txt ====
! The first parameter of the command SS is the particular function
! to be executed. Each one is described in full below.
!
!<General
! If you reply to the 'Function: ' prompt with 'HELP', you will be
! directed to this file
!>
%CONTROL 0
%RECORDFORMAT OF(%STRING(11)NAME, %INTEGER SP12, NKB, %C
      %BYTEINTEGER ARCH, CODES, CCT, OWNP, %C
      EEP, USE, CODES2, SSBYTE, FLAGS, POOL, DAYNO, SP31)
%RECORDFORMAT AF(%STRING(11)NAME, %INTEGER NKB, %STRING(8)DATE, %C
      %STRING(6)TAPE, %INTEGER CHAP, COUNT)
      %RECORDFORMAT %C
DFINF(%INTEGER NKB, RUP, EEP, APF, USE, ARCH, FS, SEG, CCT, CDS, %C
      %BYTEINTEGER SP, DAY, POL, CD2, %C
      %INTEGER SS, %C
      %STRING(6)OFF)
!
!
!

==== ecsc01/utilss_pronames.txt ====
%externalroutine proname(%string(255)user)
%record(%integer no,%string(6)%array user(1:25),%string(31)%array alias(1:25)) data
%integer vsn,flag,i
%externalroutinespec readprofile(%string(11)key,%name data,%integername vsn,flag)
vsn=0
readprofile("GWW",data,vsn,flag)
printstring("Flag=");write(flag,1);printstring("   Vsn=");write(vsn,1);newline
printstring("No=");write(data_no,1);newline
%for i=1,1,data_no  %cycle
  printstring(data_user(i));spaces(5);printstring(data_alias(i));newline
%repeat
%end
%endoffile

==== ecsc01/locsys_tcpusers.txt ====
%externalroutine tcpusers(%string(255) s)

%constant %integer maxtcps=39

%constant %string(15) %array tcpname(1:maxtcps)="TCPA","TCPC","TCPD","TCPM","JCMB",
"G.SQ.","EULIB","SOCS","ATB-1","ATB-2","ATB-3","CS-AT1","CS-AT2","ENGIN","CHEM",
"POLLCK","XGATE","TCPS","GEOG","PSSE","SIAE","FCNRS","BUSH","IGS","HFRO",
"SCRI-I","SCRI-P","FOREST","ERSKIN","WS-COA","GTCP1","GTCP2","GTCP3","GTCP4",
"GTCP5","STCP","STCL-2","null","TEMP"

%integer i,j
%recordformat rf1(%integer n,a)
%recordformat pf(%string(6)user,%string(15)tcp,%byteinteger a,invoc,b,n,f,
%integer logs,%byteinteger c,d,e,r,%integer id,proc,g,h,z)
%record(rf1) r1
%record(pf)%array p(1:256)
%externalroutinespec prompt(%string(255) s)
%externalintegerfnspec dprocedure(%integer a,b)
%systemstringfnspec username(%string(6) user,%integer flag)

%on %event 4 %start

==== ecsc01/utilss_newsnoops.txt ====
%external %routine new snoop(%string (255) s)

   %record %format finff(%string (11) fname, %integer sp12, kbytes,
       %byte %integer arch, codes, cct, ownp, eep, use, codes2, ssbyte,
       flags, pool, dayno, sp31)
   %external %integer %function %spec dfsys(%string (6) user,
       %integer %name fsys)
   %external %integer %function %spec dsfi(%string (6) user, %integer fsys,
       type, set, addr)
   %external %integer %function %spec dfilenames(%string (6) user,
       %record (finff) %array %name inf, %integer %name fileno, maxrec,
       nfiles, %integer fsys, type)
   %external %string (15) %function %spec interrupt
   %system %string (255) %function %spec itos(%integer i)
   %system %routine %spec phex(%integer i)

   %own %integer found=0

   %string (255) %function itos2(%integer i)
      %string (255) s
      s = itos(i)

==== ecsc01/sup_tape80s.txt ====
!***********************************************************************
!
!                          2900 TAPE HANDLER
!
!***********************************************************************
!
%IF SSERIES=NO %START
  !..........PSERIES..........PSERIES..........PSERIES..........PSERIES
  !
  %CONSTINTEGER TOP LBE=36
  !                                                                    { CH FN
  %CONSTINTEGERARRAY LBES(0:TOP LBE)= %C
  X'00000200',                                                         {  1 RF
  X'40001200',                                                         {  2 RR
  X'00000200',                                                         {  3 RF
  X'44C01200',X'86800D10',X'00006200',                                 {  4 RR,AS,RFEC
  X'40001200',                                                         {  5 RR
  X'04C00200',X'86800D10',X'40007200',                                 {  6 RF,AS,RREC
  X'04C00200',X'04805200',X'86800D10',X'00006200',                     {  7 RF,SR,AS,RFEC
  X'44C01200',X'04804200',X'86800D10',X'40007200',                     {  8 RR,SF,AS,RREC
  X'00000200',                                                         {  9 RF

==== ecsc01/utilss_xrefs.txt ====
%EXTERNALROUTINE CROSSREF(%STRING(63)INPUT)
%CONSTINTEGER JOBNAMLEN=6,MAXDISP=15,MAXGLOB=255,MAXHASH=4095, %C
   MAXLINE=511,NAMLEN=8,OUTLINE=132,PAGESIZE=4096
%CONSTSTRING(23)VERSION="2.02 07/08/78  (MDB)"
%OWNSTRING(35)HEADER="* VARIABLE CROSS REFERENCE OF FILE "
%OWNSTRING(35)BLANK=""
%OWNSTRING(87)ASTK="*******************************************"
%INTEGER DATASTART,DEND,LENIN,M,MAXNAMES,MAXSTRINGS,MAXUSES
%STRING(31)DATETIME,MEMNAME,NAML,OUTPUT,VNAME
%EXTERNALROUTINESPEC DEFINE(%STRING(63)S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER N,%INTEGERNAME L)
%EXTERNALROUTINESPEC PROMPT(%STRING(15)S)
%EXTERNALSTRINGFNSPEC DATE
%EXTERNALSTRINGFNSPEC TIME
!*
%STRINGFN ITOSTR(%INTEGER I,M)
%STRING(1)SIGN
%STRING(63)S
M=0%IF M<0
%IF I<0%THEN SIGN="-"%AND I=IMOD(I)%ELSE SIGN=" "
S=""

==== ecsc01/utilss_counters.txt ====
%begin
!%externalroutine t(%string(255)dummy)
%externalintegerfnspec ddelay(%integer i)
%longintegerarray store(1:10)
%longinteger now ,then
%integer counter,flag
%longintegerfn tim(%integer val)
*RRTC_1
*USH_(%LNB+5)
*STUH_%TOS
*USH_1
*USH_-1
*EXIT_-64
%end
%for counter=1,1,10 %cycle
     store(counter)=tim(-19)
     flag=ddelay(30)
%repeat
then=store(1)
%for counter=1,1,10 %cycle
   now=store(counter)

==== ecsc01/t#utilss0_finds.txt ====

%record %format rf(%integer conad, filetype, datastart, dataend)
%system %routine %spec connect(%string (31) file, %integer mode, hole, prot,
       %record (rf) %name r, %integer %name flag)
%external %integer %function %spec exist(%string (31) file)
%system %integer %function %spec currentll
%system %long %integer %function %spec load ep(%string (31) entry,
       %integer %name type, flag, %integer loadlevel)
%system %routine %spec unload2(%integer loadlevel, flag)
%external %integer %function %spec uinfi(%integer ep)
%external %routine %spec define(%string (255) s)
%external %routine %spec clear(%string (255) s)
%external %routine %spec closestream(%integer str)
%system %routine %spec ssmessa(%integer fail, %string (63) fname)
%system %routine %spec find entry(%string (31) entry, %integer type, dad,
       %string %name file, %integer %name dr0, dr1, flag)
%system %routine %spec load(%string (31) entry, %integer type,
       %integer %name flag)
%system %routine %spec setpar(%string (255) s)
%system %string %function %spec spar(%integer i)
%system %integer %function %spec parmap

==== ecsc01/utilss_pasmons.txt ====
%external %routine pasmon
   %system %routine %spec ndiag(%integer pc, lnb, fault, inf)
   %integer pc, lnb
      printstring("PASCAL MONITOR ENTERED: THE PROGRAM HAS NOT CRASHED")
      newline
      *lss_(%lnb +2)
      *st_pc
      *stln_lnb
      ndiag(pc, lnb, 0, 0)
      newline
      printstring("PASCAL MONITOR COMPLETED: RETURN TO PROGRAM")
      newline
%end
%end %of %file

==== ecsc01/t#utilss0_notel.txt ====
Source: .IN         Compiled: 18/04/83   19.55.07
Object: T#O

Parms set: DEFAULTS



              ERCC. Imp80 Compiler Release 1 Version 12 Nov 82


  1023  3069
     1        %systemroutinespec to journal (%integer from,len)
     2        %externalroutine note (%string(255)s)
     3        s="
     4"       **** ".s."
     5"       "
     6        tojournal(addr(s)+1,length(s))
     7        %end
     8        %endoffile

     8 LINES ANALYSED IN    64 MSECS  -  SIZE=   214

==== ecsc01/t#utilss0_heaps.txt ====
%constant %integer true=1,false=0,wordshift=2
%own %integer base=0,heap size=65535<<wordshift,
 moning=true,first hole=0,flag=0,
 first call=true
%record %format holef(%half %integer size,next)
%record %format crf(%integer conad,type,start,end)
%own %record (crf) connect report
%own %record (holef) %name prev,curr,succ
%constant %string (11) heap file="T#IHEAP"
%own %string (11) temp file=""
%system %routine %spec outfile(%string (31) file, %integer length,hole,prot,
    %integer %name conad,flag)
%external %integer %function %spec exist(%string (31) file)
%system %routine %spec destroy(%string (31) file, %integer %name flag)
%system %routine %spec connect(%string (31) file, %integer mode,hole,prot,
    %record (crf) %name report, %integer %name flag)
%system %routine %spec disconnect(%string (31) file, %integer %name flag)
%system %routine %spec newgen(%string (31) old,new, %integer %name flag)
%system %routine %spec rename(%string (31) old,new, %integer %name flag)
%system %routine %spec fill(%integer length,start,filler)
%external %integer %function %spec outpos

==== ecsc01/t#utilss0_where.txt ====
%externalstring(63)%fnspec uinfs(%integer ep)
%systemstring(255)%fnspec itos(%integer i)
%systemstring(8)%fnspec htos(%integer i,places)
%externalroutine where(%string(255)dummy)
%string(63)terms
terms=uinfs(14)
%string(6) tcp
%string(8) hexC
%byteinteger C,N,T
N=charno(terms,1);T=charno(terms,2);C=charno(terms,3);
TCP=substring(terms,4,9)
hexC=htos(C,2)
printstring("You are on Console ".itos(c)." (X'".hexC."') on TCP ".TCP)
printstring(" network address N".itos(N)."T".itos(T))
newlines(2)
%end
%endoffile


==== ecsc01/sup_fast44s.txt ====
!*
!* Communications record format - extant from CHOPSUPE 22B onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1, %C
         (%BYTEINTEGER SACPORT1,SACPORT0 %OR %BYTEINTEGER  %C
            OCP1 SCU PORT,OCP0 SCU PORT), %BYTEINTEGER  %C
         NOCPS,SYSTYPE,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,%BYTEINTEGER DAPNO,DAPBLKS,DAPUSER,DAPSTATE, %C
         %INTEGER DAP1,SP1,SP2,SP3,SP4, %C

==== ecsc01/sspd_preface.txt ====
==== ecsc01/utilss_userss.txt ====
%EXTERNALROUTINE MYUSERS(%STRING(255)S)
%externalroutinespec printchs(%string(255)s)
%externalstring(31)%fnspec vdus(%integer i)
!%externalintegerfnspec fecount(%integername a, b)
%EXTERNALINTEGERFNSPEC DPROCEDURE(%INTEGER ACT, ADR)
%RECORDFORMAT RF1(%INTEGER N, A)
%RECORD(RF1) R1
%RECORDFORMAT PF(%STRING(6)USER, %STRING(15)TCP, %BYTEINTEGER A, INVOC, B, N, F,
      %INTEGER LOGS, %BYTEINTEGER site, reason, cons1, cons2, %c
       %INTEGER ID, PROC, G, H, Z)
%RECORD(PF)%ARRAY P(1:256)
%record (pf) %name pp
%INTEGER J, feusers,tcpusers, i, k, f, l, max
%integerarray fe(0:4)
%ownintegerarray index(0:255)

%string (24) t,u
%string(12)%array nam(1:50)
%ownintegerarray nuf(1:50)
%ownintegerarray nus(1:50)


==== ecsc01/locsys_profs.txt ====
%record %format profile f(%string(11) key, %integer version, offset, length)
%record %format ssprofile f(%integer end, start, size, filetype, checksum,
                            datetime, format, sp0, marker, max profiles,
                            no profiles, sp1, %record(profile f)%array %c
                            profile(1:500)); ! 500 will never be approached.

! Structure of profile file: It starts with the format of ssprofile f
! above.  The first 8 words are standard Subsystem header. Thereafter:

!   marker:       to check against overwriting or other corruption.
!   max profiles: the maximum number of profiles which this file can currently hold.
!   no profiles:  the actual number of profiles held.
!   profile:      a record array (1:max profiles), each element containing the
!                 following:
!                 key:       the keyword (the only access to profile data)
!                 version:   the version number of the profile format.
!                 offset:    the offset of the start of the profile data.
!                 length:    the length of the profile data, as seen by the
!                            user.  The profile scheme adds a marker word
!                            and rounds up to word align the data.


==== ecsc01/utilss_memos.txt ====
%external %routine %spec writeprofile(%string(11) key, %name info,
    %integer %name version, flag)
%external %routine %spec readprofile(%string(11) key, %name info,
    %integer %name version, flag)
%system %routine %spec setpar(%string(255) s)
%system %string(255) %fn %spec spar(%integer i)
%system %integer %fn %spec parmap
%system %integer %fn %spec pstoi(%string(255) s)
%system %string(255) %fn %spec substring(%string %name s, %integer i, j)
%external %routine %spec prompt(%string(255) s)
%external %integer %fn %spec uinfi(%integer i)
%external %string(255) %fn %spec ucstring(%string(255) s)
%system %string %fn %spec itos(%integer i)
%const %integer secsin24hrs = 86400; ! SECS IN DAY
%const %integer days70 = 25567; ! DAYS FROM JAN1 1900 TO JAN1 1970
%const %long %integer secs70 = x'0000000083AA7E80'; ! SECS DITTO
%const %string(1) snl = "
"
%const %integer maxmemos=10
%record %format proff(%integer %array after(1:maxmemos),
    %string(255) %array text(1:maxmemos))

==== ecsc01/utilss_clss.txt ====
%externalroutinespec printchs(%string(255)s)
%externalstringfnspec vdus(%integer ep)
%externalroutine cls(%string(255)s)
%if s#"" %then printchs(vdus(0))
printchs(vdus(1))
%end
%endoffile

==== ecsc01/utilss_snoops.txt ====
%conststring(1) snl="
"
%externalroutinespec files(%string(255)s)
%systemstring(31)%fnspec itos(%integer i)
%externalroutine snoop(%string(255)group)
%integer no
%string(2)nos
%if length(group)=6 %then files(group.".") %andreturn
%if length(group)<4 %then printstring("Invalid group".snl) %andreturn
%if length(group)=5 %start
    %for no=0,1,9 %cycle
       nos=itos(no)
       printstring("Command:files ".group.nos.".");newline
       files(group.nos.".")
    %repeat
%finishelsestart
    %for no=0,1,99 %cycle
       nos=itos(no);nos="0".nos %if no<10
       printstring("Command:files ".group.nos.".");newline
       files(group.nos.".")
    %repeat

==== ecsc01/t#utilss0_user.txt ====
program processes(output);
const uinfstart=2359296;ausers=-2134900645;
type
      uinff=packed array[0..6] of char;
      uinf_p_t=record
               dummyp:integer;
               case boolean of
                  true:(paddr:integer);
                  false:(pval:^uinff)
               end;
      int_p_t=record
              dummyi:integer;
              case boolean of
                  true:(iaddr:integer);
                  false:(ival:^integer)
              end;
var
      i:integer;
      int_ptr:int_p_t;
      uinf_ptr:uinf_p_t;
      user:uinff;

==== ecsc01/utilss_penvs.txt ====
program uinf(output);
const
  userad=2359296;{str6}
  fsysad=2359343;{int}
  basefilead=2359420;{str31}
  scarcityad=2359484;{int}
  preemptad=2359488;{int}
  fundsad=2359504;{int}
  termad=2359564;{str63}
  secstocdad=-2134900564;{int}
  secsfrmnad=-2134900568;{int}
  datead=-2134900673;{int}
  timead=-2134900661;{int}
  usersad=-2134900648;{int}
  ocptypead=-2134900736;{int}
  tojdayad=-2134900680;{int}
  suplvnad=-2134900684;{int}
  rationad=-2134900604;{int}
type
  str6=packed array[0..6]of char;
  str31=packed array[0..31]of char;

==== ecsc01/utilss_fnok.txt ====
program testfile(input,output);

type
   string31   = packed array [1..31] of char;

var
   filename   : string31;
   flag       : boolean;

procedure readstring(var inp:text;var s:string31; var flag:boolean);

var
   i          : integer;

procedure skipspaces(var inp:text);
begin
   while (inp^=' ') and not (eoln(inp)or eof(inp)) do
      get(inp);
end;

begin

==== ecsc01/t#utilss0_newsnoops.txt ====
%external %routine new snoop(%string (255) s)

   %record %format finff(%string (11) fname, %integer sp12, kbytes,
       %byte %integer arch, codes, cct, ownp, eep, use, codes2, ssbyte,
       flags, pool, dayno, sp31)
   %external %integer %function %spec dfsys(%string (6) user,
       %integer %name fsys)
   %external %integer %function %spec dsfi(%string (6) user, %integer fsys,
       type, set, addr)
   %external %integer %function %spec dfilenames(%string (6) user,
       %record (finff) %array %name inf, %integer %name fileno, maxrec,
       nfiles, %integer fsys, type)
   %external %string (15) %function %spec interrupt
   %system %string (255) %function %spec itos(%integer i)
   %system %routine %spec phex(%integer i)

   %own %integer found=0

   %string (255) %function itos2(%integer i)
      %string (255) s
      s = itos(i)

==== ecsc01/sup_print10s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%EXTRINSICLONGINTEGER KMON
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PON(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC GDC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%SYSTEMROUTINESPEC ITOE(%INTEGER A, L)
%IF MULTIOCP=YES %THEN %START
   %EXTERNALROUTINESPEC SEMALOOP(%INTEGERNAME SEMA,%INTEGER PARM)
   %ROUTINESPEC RESERVE LOG
   %ROUTINESPEC RELEASE LOG
   %ROUTINESPEC AWAIT LOG ROUTE
%FINISH
!------------------------------------------------------------------------
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C

==== ecsc01/t#utilss0_compars.txt ====
%constinteger max base commands=12
%conststring(255)%array base commands(1:max base commands)=%C
"alias","remove","monitor","stop","quit","launch","broadcast","tell",
"autoattack","surrender","dump","resources"
!"B","C","D","E","F","G","H","I","J","K","AL","LI","RE","ST"
%recordformat com form (%string(80)comstr,%byteinteger base,type)
%constinteger max possible commands=20
%ownrecord(com form)%array commands(1:max possible commands)
%owninteger max commands=0

%routine sort(%record(com form)%arrayname r,%integer lo,hi)
!%routine sort(%stringarrayname r,%integer lo,hi)
%integer i,j,k,l,n
%record(com form)x
!%string(255)x
l=lo-1
n=hi
!%while n<hi-l %cycle
!  n=2*n
!%repeat
! <=> 1<<((32- shz{shift while not zero}(hi-l-1))&31)

==== ecsc01/sup_oper38s.txt ====
!*
!* OPER37 - 2nd April 1982 *
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ecsc01/utilss_getaddr.txt ====
%begin
%recordformat comf %c
(%integerarray i1(1:25),%byteintegerarray b1(1:8),%integerarray i2(1:9),
%longinteger l1,%integerarray i3(1:9),%integer MAXPROCS,
%integerarray i4(1:4),%integer PROCAAD)
%constrecord(comf)%name com=X'80000000'+48<<18
printstring("Addresses of communications record")
newline
printstring("Record starts at ");write(addr(com_i1(1)),10);newline
printstring("Maxprocs is at   ");write(addr(com_maxprocs),10);newline
printstring("Procaad is at    ");write(addr(com_procaad),10);newline
%endofprogram

==== ecsc01/locsys_broonsinfo.txt ====
STATUS:
       This provides the user with the current state of another users process
, that is to say , how long it has been since the user has executed a command.
       The routine uses DPROCS to obtain information about the user.
In the record used by DPROCS there is a field status which AND'd with 16 gives
result true if and only if the user is active. 
If this turns out to be false the field active gives an integer which can be
translated into a message to show how long the process has be left dormant.
This message works on the lines that the more sleepy the message the longer
it has been left

RENEW:
      This command enables the user to allocate a new location to a particular
TCP's buffer.
      The TCP's name is read in along with the console number (decimal) and
the new location message. To update the location the starting address of the
database file is obtained using CONNECT and the correct location is changed
by calculating the correct offset in the file. 
      In addition to the location being changed a record of what user changed
what location and what TCP+console he/she was on a the time. This is done
in order to check up on invalid locations.

==== ecsc01/t#utilss0_clrscreens.txt ====
%externalstringfnspec vdus(%integer i)
%externalroutinespec printchs(%string(255)s)
%externalroutine clearscreen(%string(255)s)
printchs(vdus(1))
%end
%endoffile

==== ecsc01/sup_enter17s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%RECORDFORMAT SERVAF(%INTEGER P, C)
%EXTERNALINTEGERSPEC INPTR
%EXTERNALINTEGERSPEC OUTPTR
%CONSTINTEGER MASK=X'80FC3FFF'
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC HOOT(%INTEGER NUM)
%EXTERNALROUTINESPEC GDC(%RECORD(PARMF)%NAME P)
%IF SSERIES=NO %START
   %EXTERNALINTEGERFNSPEC GPC INIT(%INTEGER CA,PT,MODE)
%FINISH
%EXTERNALINTEGERFNSPEC SAFE IS READ(%INTEGER ISAD,%INTEGERNAME VAL)
%EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1)
%EXTERNALROUTINESPEC SUP29
%EXTERNALROUTINESPEC SUPPOFF(%RECORD(SERVAF)%NAME SERV, %C
      %RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC DISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PDISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC WAIT(%INTEGER MILLISECS)

==== ecsc01/vol_vlink20.txt ====
LINK
SSLD05Z
VOLS20Z
.END
V20Z
SPFIX V20Z,V20R,V20D
PERMIT V20R,,ER

==== ecsc01/t#utilss0_fnoks.txt ====
program test_f_name(input,output);
type string31=packed array[1..31]of char;
var  filename:string31;

function fnok(s:string31;write_to:boolean):boolean;
var i,dot,sub:integer;fail,ftype:packed array[0..4]of boolean;done:boolean;

function my_file(s:string31):boolean;
const
  userad=2359296;{str6}
type
  str6=packed array[0..6]of char;
     cheat=record
         dummyi:integer;
         case boolean of
            true:(addr:integer);
            false:(ptr:^str6)
         end;
  var peeker:cheat;me,owner:str6;i:integer;
  begin
     peeker.addr:=userad;

==== ecsc01/t#utilss0_hasps.txt ====
%external %routine %spec set return code(%integer flag)
%external %integer %function %spec return code
%external %routine %spec detach(%string (255) s)
%external %routine %spec detachjob(%string (255) s)
%external %routine %spec prompt(%string (255) s)
%external %routine %spec destroy(%string (255) s)
%external %integer %function %spec exist(%string (255) s)
%systemroutinespec move(%integer len,from,to)
%system %routine %spec ssmessa(%integer flag, %string (63) fname)
%system %routine %spec outfile(%string (31) file, %integer size, hole, prot, %c
       %integer %name conad, flag)

%routine makefile(%string (255) ownfile)
   %integer flag, conad, i, j
      %on %event 9 %start
         ->out
      %finish
      destroy(ownfile) %if exist(ownfile) # 0
      outfile(ownfile, 4096, 0, X'40000000' {temp file}, conad, flag)
      %if flag # 0 %then ssmessa(flag, ownfile) %and ->err
      printstring("Enter contents of job file. Finish by typing Ctrl-Y")

==== ecsc01/vol_source.txt ====


!********************************************************************
!*                                                                  *
!*                                                                  *
!*               * * * * * * *  * * * * * * * * *                   *
!*             * V O L U M E S  E X E C U T I V E *                 *
!*               * * * * * * *  * * * * * * * * *                   *
!*                                                                  *
!*                                                                  *
!********************************************************************
!*
%CONSTSTRING(3) VERSION="20R"
!* 23-JAN-84:
!*    'NEW RESTORE REQUEST' TO RESOLVE ARCH ALIAS AMBIGUITY.
!*    'BACKUP ONLY' TO DO BACKUP WITH NO SECURE, OVERRIDING EXPLICIT/IMPLICIT
!*    EXPLICIT 'SECURE' COMMAND
!*
! %CONSTSTRING(3) VERSION="20Q"
!* 26-OCT-83:
!*    SYSTEM EPAGES=X500 FOR SECURE OF NEW SYSTEM DISCS

==== ecsc01/locsys_llr.txt ====
! Constant Filename
%CONSTANT %STRING (20)  update = "ECTU74.upusers"


%recordformat rf(%integer conad,filetype,datastart,dataend)
%systemroutinespec connect(%string(31) filename,%integer access,maxbytes,prot,
%record(rf) %name r,%integername flag)
%systemroutinespec disconnect(%string(31) filename,%integername flag)

! Start of routine llr to list all users who have used renew
%externalroutine llr(%string(255) nowt)

%byteintegerarrayformat raformat(0:50)
%byteintegerarrayname contents
%integer i,j,flag,startaddr
%record(rf) r

connect(update,10,0,0,r,flag) { Connect up relevant file}
startaddr=r_conad+r_datastart
%for i=0,1,49 %cycle
   contents==array(startaddr+i*51,RAFORMAT)

==== ecsc01/t#utilss0_proc1.txt ====
program processes(input,output);
const procaad=-2134900528;maxprocs=-2134900736;
type
      procf=packed record
            user:packed array[0..6] of char;
            incar,category,wsn,rung,active:char;
            actwo,lstat,lamtx,stack,status:integer
            end;
      plist_t=packed array [0..256] of procf;
      proc_p_t=record
               dummyp:integer;
               case boolean of
                  true:(paddr:integer);
                  false:(pval:^procf)
               end;
      integer_p_t=record
                  dummyi:integer;
                  case boolean of
                    true:(iaddr:integer);
                    false:(ival:^integer)
                  end;

==== ecsc01/t#utilss0_interrupts.txt ====
   
!TITLE Interrupts, %EVENTs and fault trapping.
!<Interrupts
    Subsystem cannot control or handle interrupts on its own, and has to
exploit the facilities offered by Director for the purpose.
!< PRIME CONTINGENCY
    One of the tools provided is the
    %EXTERNAL %INTEGER %FN PRIME CONTINGENCY (%ROUTINE TRAP)
in Director.  This need only be called once, to nominate the routine TRAP
to Director.  The %SPEC of TRAP must be
    %ROUTINE %SPEC TRAP (%INTEGER CLASS, SUBCLASS).
If an interrupt subsequently occurs which is relevant to the process
(and subject to some conditions which will appear later), Director
will suspend the process and force it to enter TRAP, supplying the
two %INTEGER parameters CLASS and SUBCLASS to indicate what sort of
interrupt has occurred.  TRAP will normally be some routine which is
declared as part of the subsystem, and in the standard subsystem it is
the routine DIRTRAP, declared in module BASE.  The corresponding call of
PRIME CONTINGENCY is almost the first instruction executed in the
%SYSTEM %ROUTINE CONTROL declared in module CONT.
!>

==== ecsc01/t#utilss0_pronames.txt ====
%externalroutine proname(%string(255)user)
%record(%integer no,%string(6)%array user(1:25),%string(31)%array alias(1:25)) data
%integer vsn,flag,i
%externalroutinespec readprofile(%string(11)key,%name data,%integername vsn,flag)
vsn=0
readprofile("GWW",data,vsn,flag)
printstring("Flag=");write(flag,1);printstring("   Vsn=");write(vsn,1);newline
printstring("No=");write(data_no,1);newline
%for i=1,1,data_no  %cycle
  printstring(data_user(i));spaces(5);printstring(data_alias(i));newline
%repeat
%end
%endoffile

==== ecsc01/utilss_pass.txt ====

%constlonginteger password=987325576
%systemroutinespec phex(%integer i)
%externalstring(255)%fnspec interrupt
%externalroutinespec prompt(%string(255)p)
%externalroutinespec setmode(%string(255)s)
%integerfn encrypt(%longinteger n)
%longlongreal lr
%integer i
%constlonglongreal const=131719.0478125
%for i=1,1,6 %cycle
 lr=n
 lr=lr*const
 n=longinteger(addr(lr)+4);!middle 64 bits
%repeat
%result=integer(addr(n))
%end
%externalroutine privilege(%string(255)s)
%longinteger n
n=0
setmode("echo=off")

==== ecsc01/t#utilss0_iprocs2.txt ====
%begin
%recordformat comf(%integerarray i1(1:25),%byteintegerarray b1(1:8),
                   %integerarray i2(1:9),%longinteger l1,
                   %integerarray i3(1:9),%integer MAXPROCS,
                   %integerarray i4(1:4),%integer PROCAAD)
%constrecord(comf)%name com=X'80000000'+48<<18
%integerfn VAL(%integer adr,len,rw,psr)
%integer inseg0,beyondseg0,seg0,seg0ad,dr0
  seg0=adr>>18
  %result=0 %unless 0<len<=32<<18
  %if psr=0 %start
     *LSS_(%LNB+1)
     *ST_PSR
  %finish
  %if seg0#(adr+len-1)>>18 %start
     seg0ad=seg0<<18
     inseg0=X'400000'-(adr-seg0ad)
     beyondseg0=len-inseg0
     %result=VAL(adr,inseg0,rw,psr)&VAL(adr+inseg0,beyondseg0,rw,psr)
  %finish
  dr0=x'18000000'!len

==== ecsc01/t#utilss0_iprocs.txt ====
%begin
%externalintegerfnspec DPROCS(%integername max,%integer adr)
%routine idprocs
%integer j,max,adr,l,k
%byteintegerarray plist(0:32*256)
%stringname user
   l=0
   max=256
   adr=addr(plist(0))
   j=dprocs(max,adr)
   %returnif j#0
   %cycle k=0,1,max-1
       user==string(addr(plist(32*k)))
       %unless user="" %start
           write(k,3)
           space
           printstring(user)
           l=l+1
           l=0 %and newline %if l=6
       %finish
   %repeat

==== ecsc01/t#utilss0_bellss.txt ====
%externalroutine bells(%string(255)dummy)
%integer i
%cycle i=1,1,20
      printch    (7)
      spaces(4)
%repeat
%end
%endoffile

==== ecsc01/t#utilss0_testsm.txt ====
program testsm(output);
const out='Pascal test maps OK';
      magic = 402653440;
      fname=' 23,t#             ';
type  str19=packed array [1..19]of char;
      ptr19=^str19;
      ftype=packed array [1..711]of char;
      fptr=^ftype;
var   len:integer;
      mapper:fptr;
      smfile:ptr19;
procedure define(i:integer;stref:ptr19);extern;
procedure opensm(chan,mode:integer;var mapper:fptr;var len:integer);extern;
procedure closesm(chan:integer);extern;
begin
      new(smfile);
      smfile^:=fname;
      smfile^[1]:=chr(5);
      define(magic,smfile);
      opensm(23,1,mapper,len);
      writeln(len:5,' bytes of data accessed');

==== ecsc01/utilss_iodemos1.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr31   =^string31;
    string31=packed array[0..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure define(k:integer;p:ptr31);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;var l:integer;var name:string31):boolean;
var ok:boolean;temp:integer;
begin
if first_try then begin pprompt(prompt);reset(inp);first_try:=false;end
             else begin pprompt(prompt);while inp^=' ' do get(inp);end;
for l:=0 to 31 do name[l]:=' ';
l:=1;
while (inp^<>' ') and not(eoln(inp)) and (l<29) do begin

==== ecsc01/utilss_iodemos2.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr63   =^string63;
    string63=packed array[0..63]of char;
    string31=packed array[1..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure pdefine(k:integer;p:ptr63);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;var l:integer;var name:string31):boolean;
var ok:boolean;temp:integer;
begin
if first_try then begin pprompt(prompt);reset(inp);first_try:=false;end
             else begin pprompt(prompt);while inp^=' ' do get(inp);end;
for l:=1 to 31 do name[l]:=' ';
l:=1;

==== ecsc01/utilss_iodemos3.txt ====
program iodemo(inp,output,infile,outfile);
type
    string15=packed array[1..15]of char;
    ptr63   =^string63;
    string63=packed array[0..63]of char;
    string31=packed array[1..31]of char;
var
    infile,outfile,inp:text;
procedure pprompt(s:string15);extern;
procedure pdefine(k:integer;p:ptr63);extern;

procedure define_files;
var filename:string31;length:integer;first_try,ok:boolean;

function get_name(prompt:string15;
                  var l:integer;
                  var name:string31;
                  write_to:boolean):boolean;
var ok:boolean;temp:integer;

function fnok(s:string31;write_to:boolean):boolean;

==== ecsc01/sup_sup29cs.txt ====

!
! To make S series supervisor requires:-
!     1) Change SSERIES=NO to SSERIES=YES in ctoptions file
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTINTEGER CBTLEN=299;               ! LENGTH OF CBT TABLE
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=8*CBTLEN+255+2*LSTLEN; ! SIZE OF SAME
                                        ! MADE UP OF 2049 FOR CBT
                                        ! 2*LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT
%CONSTINTEGER LSTACKLEN=3;              ! LOCAL CONT. STACK ELEN

==== ecsc01/t#utilss0_anals.txt ====
%constant %integer ssdatafiletype= 4
%constant %integer ssobjfiletype= 1
%constant %integer sscorruptobjfiletype=5
%constant %integer ssdirfiletype= 2
%constant %integer sscharfiletype= 3
%constant %integer sspdfiletype= 6
%constant %integer ssoptfiletype= 9
%record %format arf(%string (31) name, %integer type)
%record %format pdhf(%integer dataend, datastart, size, filetype, sum,
       datetime, adir, count)
%record %format rf(%integer conad, filetype, datastart, dataend)
%record %format dhf(%integer dataend, datastart, size, filetype, sum,
       datetime, pstart, spare)
%record %format lnf(%byte %integer type, %string (6) name, %integer rest,
       point, dr1)
%record %format frf(%integer conad, filetype, datastart, datend, size, rup,
       eep, mode, users, arch, %string (6) tran, %string (8) date, time,
       %integer count, spare1, spare2)
%record %format hf(%integer dataend, datastart, filesize, filetype, sum,
       datetime, format, records)
%record %format dahf(%integer dataend, datastart, size, filetype, date, time,

==== ecsc01/t#utilss0_counters.txt ====
%begin
!%externalroutine t(%string(255)dummy)
%externalintegerfnspec ddelay(%integer i)
%longintegerarray store(1:10)
%longinteger now ,then
%integer counter,flag
%longintegerfn tim(%integer val)
*RRTC_1
*USH_(%LNB+5)
*STUH_%TOS
*USH_1
*USH_-1
*EXIT_-64
%end
%for counter=1,1,10 %cycle
     store(counter)=tim(-19)
     flag=ddelay(30)
%repeat
then=store(1)
%for counter=1,1,10 %cycle
   now=store(counter)

==== ecsc01/locsys_tcpanal.txt ====
%externalroutine tcpanal(%string(255) s)

%constant %integer maxtcps=27

%constant %string(15) %array tcpname(1:maxtcps)="TCPA","TCPC","TCPD","TCPM","JCMB",
"G.SQ.","EULIB","SOCS","ATB-1","ATB-2","ATB-3","CS-AT1","CS-AT2","ENGIN","CHEM",
"POLLCK","XGATE","TCPS","GEOG","PSSE",
"X25","SCRI-I","SCRI-P","FOREST","ERSKIN","WS-COA","null"

%integer i,tcpusercount,j
%recordformat rf1(%integer n,a)
%recordformat pf(%string(6)user,%string(15)tcp,%byteinteger a,invoc,b,n,f,
%integer logs,%byteinteger c,d,e,r,%integer id,proc,g,h,z)
%record(rf1) r1
%record(pf)%array p(1:256)
%externalroutinespec prompt(%string(255) s)
%externalintegerfnspec dprocedure(%integer a,b)

%on %event 4 %start
printstring("You Are Supposed To Type The Number Associated With The Tcp!")
newline

==== ecsc01/testpi7.txt ====
%external %routine testinit

   ! Note: Version of PRINTINIT7 for transfer of HP Laser Jet files to
   !       APM Filestore (Appleton Tower) Spooler.
   !       Only commands "PRINT", "QUEUE", "STOP", "QUIT", "EXIT" available
   !       under program operation. No permission checks other than on
   !       global process running program. No accounting/profile kept.

   %record %format crrf(%integer conad, filetype, datastart, dataend)
   %record (crrf) crname
   %record %format fhf(%integer end, start, size, type, fhole, dt, sp1, sp2)
   %record %format infof(%integer vsn, state, %string (7) ident, user,
     %string (15) dest, srce, output, %string (31) name, delivery,
     %string (63) message, %integer dtrec, dtst, dtopst, dtdel, start,
     length, time, (%integer oplim %or %integer cc), %integer size,
     (%integer prior %or %integer pc), %integer aftdt, ahead,
     %byte %integer forms, mode, copies, order, rerun, decks, drives, fails)
     {256 bytes}
   %record (infof) %name info
   %record %format pe(%integer dest, srce, p1, p2, p3, p4, p5, p6)
   %record %format reqf(%integer dest, srce, flag, %string (6) user, file,

==== ecsc01/tfile.txt ====
asdlsadjlksjdksladjal;kdjskl;dj
skdl;sakdl; dsad;lskdl;sd
l;k

;ksdl;k

dflkdl;sfgkdl; ewrieowqrioperiepor

==== ecsc01/t#utilss0_clss.txt ====
%externalroutinespec printchs(%string(255)s)
%externalstringfnspec vdus(%integer ep)
%externalroutine cls(%string(255)s)
%if s#"" %then printchs(vdus(0))
printchs(vdus(1))
%end
%endoffile

==== ecsc01/sup_gpc40s.txt ====

%CONSTSTRING (25) VSN="GPC40 15th Mar 1982"
!************************************************GPC GPC GPC
!*
!*   EMAS 2900 SUPERVISOR NOTE
!*                                           No: 5
!*                                         Date: 21/05/80
!*                                       Author: A.Gibbons
!*
!*
!* %EXTERNAL ROUTINE GPC(%RECORD(PARMF)%NAME P)
!*
!* 1. CONVENTIONS
!* The record spec for the parameter is
!*   %RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
!* where
!*   DEST is considered as two half words DSNO and DACT. DSNO
!*        must be GPC's DSNO 
!*        DACT is set according to the function required.
!*
!*   SRCE is considered as two halfwords SSNO and SACT.

==== ecsc01/t#utilss0_usnames.txt ====
%systemstring(31)%fnspec username(%string(6)u,%integer i)
%externalroutine name(%string(255) s)
%string(6)u
%if s = "" %thenreturn
u<-s
s=username(u,1)
%if s#"?" %then printstring(u." <==> ".s) %else printstring("Not known")
newline
%end
%endoffile

==== ecsc01/t#utilss0_fnok.txt ====
program testfile(input,output);

type
   string31   = packed array [1..31] of char;

var
   filename   : string31;
   flag       : boolean;

procedure readstring(var inp:text;var s:string31; var flag:boolean);

var
   i          : integer;

procedure skipspaces(var inp:text);
begin
   while (inp^=' ') and not (eoln(inp)or eof(inp)) do
      get(inp);
end;

begin

==== ecsc01/t#utilss0_awaits.txt ====
%externalstringfnspec vdus(%integer i)
%externalroutinespec printchs(%string(255)s)
%recordformat parmf(%integer dest,srce,p1,p2,p3,p4,p5,p6)
%dynamicroutinespec dpoff(%record(parmf)%name p)
%dynamicintegerfnspec ddelay(%integer secs)
%externalroutine await(%string(255) s)
%record(parmf) p
%integer i
printchs(vdus(1))
newlines(5)
printstring("         This terminal is still in use - please do not try to use it")
newlines(5)
i=ddelay(2)
p=0
      dpoff(p)
      %end; ! AWAIT
%endoffile

==== ecsc01/sup_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%IF FAULT>0 %THEN %STOP
%END

==== ecsc04/pcompats.txt ====
!********************************************************************
%routinespec pstack(%string(31) name,%integer bits,words,
  %integername controlx,controly,pushcony,popcony,phi1x,phi2x,phi3x,phi4x,
  %integer pushyref,popyref)
%routinespec pplacepads(%string(31) chipname,cellname,%integer portsref,n)
!*********************************************************************
%externalroutinespec stack(%string(31) name,%integer bits,words,
  %integername controlx,controly,pushcony,popcony,phi1x,phi2x,phi3x,phi4x,
  %integerarrayname pushy,popy)
%recordformat connf(%integer type,side,c,w,%string(4) layer)
%externalroutinespec placepads(%string(31) chipname,cellname, %c
  %record(connf)%arrayname ports,%integer n)
!---------------------------------------------------------------------
%externalroutine pstack(%string(31) name,%integer bits,words,
  %integername controlx,controly,pushcony,popcony,phi1x,phi2x,phi3x,phi4x,
  %integer pushyref,popyref)
%integerarray pushy,popy(1:bits)
%integer i
  stack(name,bits,words,controlx,controly,pushcony,popcony,
    phi1x,phi2x,phi3x,phi4x,pushy,popy)
  %for i=1,1,bits %cycle

==== ecsc04/sup24l.txt ====
LINK
ECSC04.SUP24
ERCC07.COM23Z
ERCC07.FAST21Z
ECSC17.OPER16Z
ERCS04.DPRINT25Z
ERCS04.TAPE61Z
ERCC35.GPC16Y
ERCC07.NDIAG06Z
ERCC20.COMMS33Z
.END
SUP24Z
SUPFIX SUP24Z,SUP24T

==== ecsc04/gpms.txt ====

%BEGIN
%INTEGER E0,F0,H0,R
%OWNINTEGER A,W,W1,H,P,F,C=0,S=39,E=33,Q=1,MARKER=X'FFFFC000'
%SWITCH MCM(1:6)
%OWNSHORTINTEGERARRAY ST(0:1000)=%C
   -1,4,'D','E','F',-1,
   0,4,'V','A','L',-2,
   6,7,'U','P','D','A','T','E',-3,
   12,4,'B','I','N',-4,
   21,4,'D','E','C',-5,
   27,4,'B','A','R',-6,
   0(962)
%ROUTINESPEC MONITOR(%INTEGER N)
%ROUTINE LOAD
   %IF H=0 %THEN PRINT SYMBOL(A) %ELSE ST(S)=A %AND S=S+1
%END
%ROUTINE NEXTCH
   %IF C=0 %THEN READ SYMBOL(A) %ELSE A=ST(C) %AND C=C+1
%END
%ROUTINE FIND(%INTEGER X)

==== ecsc04/laycom.txt ====
%EXTERNALROUTINE LAY(%STRING (63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINESPEC RUN(%STRING (63) S)
%STRING (63) S1,S2,S3
%IF S->S1.('/').S2 %THEN %START
DEFINE('ST01,'.S1)
   %IF S2->S1.(',').S3 %THEN %START
      DEFINE('ST03,'.S3)
   %FINISH %ELSE S1=S2 %AND DEFINE('ST03,.NULL')
   DEFINE('ST02,'.S1)   ;! DOCUMENT
%FINISH %ELSE %MONITORSTOP
RUN('MYLAYY')
%END
%ENDOFFILE

==== ecsc04/ocgsignals.txt ====

BE41    #25LS2519 QUAD FF/10

DC33    #25LS2539 DUAL DEMUX/20

CE41    #25LS2569 UPDOWN CTR/20
CG17    #25LS2569 UPDOWN CTR/20
CG27    #25LS2569 UPDOWN CTR/20
DA41    #25LS2569 UPDOWN CTR/20

AA01    #2907 BUS TRANS/20
AC01    #2907 BUS TRANS/20
AE01    #2907 BUS TRANS/20
AG01    #2907 BUS TRANS/20

AC19    #29701 RAM/16
AE19    #29701 RAM/16
CA25    #29701 RAM/16
CA33    #29701 RAM/16
CC33    #29701 RAM/16


==== ecsc04/ilaps_pads.txt ====
%include "ilap_inc"
!
%routine draw output pad area
%integer i
  layer(metal)
    box(0,88,96,96) ; box(0,0,96,8) ; box(24,24,72,72)
    box(82,67,86,73) ; box(72,68,82,72) ; box(82,45,86,51)
    box(72,46,82,50) ; box(82,23,86,29) ; box(72,24,82,28)
    box(67,13,73,17) ; box(68,17,72,24) ; box(45,13,51,17)
    box(46,17,50,24) ; box(23,13,29,17) ; box(24,17,28,24)
    box(10,23,14,29) ; box(14,24,24,28) ; box(10,45,14,51)
    box(14,46,24,50) ; box(10,67,14,73) ; box(14,68,24,72)
  layer(contact)
    box(i,89,i+4,91) %and box(i,93,i+4,95) %for i=34,8,58
    box(i,3,i+4,5) %for i=6,10,86
    box(83,68,85,72) ; box(83,46,85,50) ; box(83,24,85,28)
    box(68,14,72,16) ; box(46,14,50,16) ; box(24,14,28,16)
    box(11,24,13,28) ; box(11,46,13,50) ; box(11,68,13,72)
  layer(diffusion)
    box(70,26,96,96) ; box(0,0,96,26)
    box(0,26,26,96) ; box(26,70,70,96)

==== ecsc04/spiceobey.txt ====
DEFINE 5,SPICE2
DEFINE 6,.LP
DEFINE 7,SPICEJ
SPICE

==== ecsc04/xtalkbbc.txt ====






                    BBC Micrcomputer  X-talk  User Guide

                    Release Version 1.0     1st Nov 1984

                               Keith Mitchell

                        ERCC Real Time Support Group



      Contents


      1) Introduction                    2


==== ecsc04/Emas-a/oproute.txt ====
%externalroutine route(%realarray(1)%name ax,bx,%integer n,%real awid, %c
  bwid,twid,tsep,ay,%realname by,%integer v)
%externalrealfnspec sin(%real x)
%externalrealfnspec cos(%real x)
%routinespec genpolys(%integer i,%realarray(1)%name ax,bx, %c
  %realarray(3)%name apx,apy,bpx,bpy,%integerarray(2)%name apv,bpv, %c
  %integerarray(1)%name apn,bpn,%real atw,btw)
%routinespec getsep(%integer i,%realarray(3)%name apx,apy,bpx,bpy,%c
  %integerarray(2)%name apv,bpv,%integerarray(1)%name apn,bpn)
%realarray px,py(0:n-1,1:v),apx,apy,bpx,bpy(1:n,0:n-1,1:v+1)
%integerarray apn,bpn,sign(1:n),apv,bpv(1:n,0:n-1)
%real atw,btw,maxsep,d,r,s,t
%constreal pi=3.14159265
%integer i,j,k,l,m
  atw=(awid-twid)/2
  btw=(bwid-twid)/2
  d=twid+tsep
  ! generate polygon vertex positions
  r=cos(pi/(4*v))
  %for i=1,1,v %cycle
    s=d*cos((2*i-1)*pi/(4*v))/r

==== ecsc04/Emas-a/start.txt ====
alias files,f
alias destroy,delete
alias vecce,v

==== ecsc04/iwcsa.txt ====

!!!!!!!!!!!!!!!!!!!!!!!!! ELEMENT DEFINITIONS !!!!!!!!!!!!!!!!!!!!!!!!!!
%ELEMENTDEF CTR(%INPUT C1,C2,R,S,%INPUTARRAY A(0:3),%OUTPUTARRAY Y(0:3))
%ELEMENTDEF SWITCH(%INPUTARRAY A(0:7),%OUTPUTARRAY Y(0:7))
%ELEMENTDEF INV(%INPUT A,%OUTPUT Y)
%ELEMENTDEF NAND2(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF NAND2OC(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF AND2(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF BUFF(%INPUT A,%OUTPUT Y)
%ELEMENTDEF NOR5(%INPUT A,B,C,D,E,%OUTPUT Y)
%ELEMENTDEF NAND8(%INPUTARRAY A(0:7),%OUTPUT Y)
%ELEMENTDEF MMVBR(%INPUT A1,A2,B,T9,T10,T11,%OUTPUT Q,QB)
%ELEMENTDEF DFF(%INPUT C,D,P,CL,%OUTPUT Q,QB)
%ELEMENTDEF MULT2(%INPUT S0,S1,A,B,%OUTPUT Y)
%ELEMENTDEF MULTB2(%INPUT S0,S1,A,B,%OUTPUT Y)
%ELEMENTDEF RAM8(%INPUT D,RW,CE1,CE2,CE3,%ARRAY A(0:7),%OUTPUT Y)
%ELEMENTDEF RAM10(%INPUT D,RW,CE,%ARRAY A(0:9),%OUTPUT Y)
%ELEMENTDEF COMP(%INPUT A,%OUTPUT Y)




==== ecsc04/xtalkibm.txt ====


                             IBM PC X-talk.


                   Version 1.01  A. Howitt Sept. 1984.



Introduction :

The IBM PC X-talk program is a communications package using asynchronous
protocols to provide a utility for transferring files to  and  from  the
Edinburgh  Multi-Access  System  (EMAS) via a Terminal Control Processor
(TCP).  The program was written originally for the  Sirius  computer  by
Robin  E.   Day  of  Business  Studies  and  hence the user interface is
similar on both machines.

In order to run the program DOS Version 2.00 operating  system  must  be
used  with the extended screen and keyboard control device driver.  This
can be accomplished by placing the command :

==== ecsc04/balls.txt ====
%EXTERNALROUTINE BALL(%STRING(63) FILE)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%ROUTINESPEC PRINT FORM(%STRING(63) S)
%ROUTINESPEC QSORT(%INTEGER A,B)
%ROUTINESPEC BWRITE(%INTEGER N,M)
%BYTEINTEGERARRAY FORM(1:80)
%CONSTINTEGER VCOL=54,MAXCOL=60,MAXVOTES=22
%INTEGERARRAY VOTE(10:MAXCOL)
%INTEGERARRAY TOT,RANK,ORDER(1:8,10:MAXCOL)
%INTEGERARRAY FORMS(1:8)
%INTEGERARRAY HASH(0:511)
%BYTEINTEGERARRAY FAC(0:511)
%INTEGER COL,TIT1,C1,C2,C3,C4,DEPT,F,H,I,J,K,U,V
%CONSTINTEGERARRAY TOTC(1:10)=4,4,4,1,4,2,3,1,4,5
%CONSTSTRING(3)%ARRAY TIT(10:MAXCOL)="L1 ","L2 ","L3 ","L4 ","L5 ",
  "L6 ","L7 ","S1 ","S2 ","S3 ","S4 ","S5 ","S6 ","S7 ","E1 ","E2 ",
  "E3 ","E4 ","E5 ","E6 ","E7 ","E8 ","E9 ","E10","C1 ","C2 ","C3 ",
  "C4 ","C5 ","H1 ","H2 ","H3 ","H4 ","O1 ","O2 ","O3 ","O4 ","O5 ",
  "O6 ","O7 ","O8 ","I1 ","I2 ","I3 ","I4 ","D1 "(2),"D2 "(2),"D3 "(2)
%CONSTSTRING(21)%ARRAY ABREV(10:MAXCOL)="ADA","ALGOL 68","APL","LISP",
  "UCSD PASCAL","POP-2","PROLOG","BASIC","BCPL","COBOL","LOGO",

==== ecsc04/iwcs.txt ====

!!!!!!!!!!!!!!!!!!!!!!!!! ELEMENT DEFINITIONS !!!!!!!!!!!!!!!!!!!!!!!!!!
%ELEMENTDEF CTR(%INPUT C1,C2,R,S,%INPUTARRAY A(0:3),%OUTPUTARRAY Y(0:3))
%ELEMENTDEF SWITCH(%INPUTARRAY A(0:7),%OUTPUTARRAY Y(0:7))
%ELEMENTDEF INV(%INPUT A,%OUTPUT Y)
%ELEMENTDEF NAND2(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF NAND2OC(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF AND2(%INPUT A,B,%OUTPUT Y)
%ELEMENTDEF BUFF(%INPUT A,%OUTPUT Y)
%ELEMENTDEF NOR5(%INPUT A,B,C,D,E,%OUTPUT Y)
%ELEMENTDEF NAND8(%INPUTARRAY A(0:7),%OUTPUT Y)
%ELEMENTDEF MMVBR(%INPUT A1,A2,B,T9,T10,T11,%OUTPUT Q,QB)
%ELEMENTDEF DFF(%INPUT C,D,P,CL,%OUTPUT Q,QB)
%ELEMENTDEF MULT24(%INPUT S0,S1,%ARRAY A,B(0:3),%OUTPUTARRAY Y(0:3))
%ELEMENTDEF MULTB24(%INPUT S0,S1,%ARRAY A,B(0:3),%OUTPUTARRAY Y(0:3))
%ELEMENTDEF RAM8(%INPUT D,RW,CE1,CE2,CE3,%ARRAY A(0:7),%OUTPUT Y)
%ELEMENTDEF RAM10(%INPUT D,RW,CE,%ARRAY A(0:9),%OUTPUT Y)
%ELEMENTDEF COMP(%INPUT A,%OUTPUT Y)




==== ecsc04/as88.txt ====
(CIF 2.0);
(as88.CIF produced by Imp LAP V2.0 on 29-MAY-1981 at 16:11:16);
(Lambda = 300 hundredths of a micron);
DS 100 300 10;    9 gb;
L NM;
B 40 40 0 0;
L ND;
B 40 40 0 0;
L NC;
B 20 20 0 0;
DF;

DS 101 300 10;    9 rb;
L NM;
B 40 40 0 0;
L NP;
B 40 40 0 0;
L NC;
B 20 20 0 0;
DF;


==== ecsc04/iops.txt ====

0
BALR
BCTR
BFCR
NHR
CLHR
OHR
XHR
LHR
CHR
AHR
SHR
MHR
DHR
ACHR
SCHR

0(16)

BTBS

==== ecsc04/facs.txt ====
9EUAB
9YCNW
4EOPD
0
0
6YIAW
0
4EQMD
4EORE
0
0
0
0
0
4EOLZ
0
0
0
0
0
0

==== ecsc04/ilapincs.txt ====
!*********************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %routine %spec first cell number (%integer num)
%external %routine %spec set lambda (%integer l)
%external %routine %spec buried contacts
%external %routine %spec butting contacts
%external %string (2) %fn %spec contacts
%external %integer %map %spec ILAP control
%constant %integer       no warnings = 1
%constant %integer    monitor endsym = 2
%constant %integer        give times = 4
%constant %integer         merge cif = 8

==== ecsc04/m68ops.txt ====
CLIS 0 46
CREF 0 47
GEN 0 48
LOAD 0 49
LLEN 0 50
MC 0 51
MD 0 52
MEM 0 53
MEX 0 54
OBJ 0 55
REL 0 56
SEQ 0 57
SYM 0 58
UNA 0 59
LIST 0 60
ANY 0 61
COMM 0 16
BSZ 0 39
END 0 17
ENDC 0 18
ENDM 0 19

==== ecsc04/sup23wl.txt ====
PARM MAP
LINK
ECSC04.SUP23W
ECSC04.SEMA02Z
ERCC07.COM20Z
ERCC07.FAST17Z
ECSC17.OPER15Y
ERCS04.DPRINT24Z
ERCS04.TAPE58Z
ERCC35.GPC9Y
ERCC07.NDIAG06Z
ERCC20.COMMS29Z
.END
SUP23WZ
SUPFIX SUP23WZ,SUP23WT

==== ecsc04/sup23ws.txt ====

%LONGINTEGERFNSPEC RTDR(%INTEGERFN A)
%INTEGERFNSPEC REQUEST INPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%INTEGERFNSPEC REQUEST OUTPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="23G"
!-----------------------------------------------------------------------
! STORE CONFIGURATION & EPAGE SIZE DECLARATIONS
! AMENDED 24/02/78  "SMACS","TRANS" & "KMON" INCLUDED
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,KLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SPDRQ,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,%INTEGERARRAY SP(0:13), %INTEGER  %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ecsc04/stackincs.txt ====
!*******************************************************************************
%routinespec stack(%string(31) name,%integer bits,words,%integername controlx,
 controly,pushcony,popcony,phi1x,phi2x,phi3x,phi4x,%integerarrayname pushy,popy)
!*******************************************************************************
! Declarations for using ILAP included.

%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %integer %map %spec buried contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)
%external %routine %spec polygon %alias "ILAPPOLYGON" (%real x, y)

==== ecsc04/sup24ns.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) UNCOMMENT S SERIES INTERUPT SEQUENCE AFTER IST4I: AND DISCARD
!        P SERIES INTERUUPT CODE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!     3) CHANGE ALL CALL OF GPC TO DCU
!     4) UNCOMMENT ALL LINES STARTED BY !PSERIES
!

%INTEGERFNSPEC REQUEST INPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%INTEGERFNSPEC REQUEST OUTPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%INTEGERFNSPEC CHANGE CONTEXT
%LONGINTEGERFNSPEC RTDR(%INTEGERFN A)
%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="24N"
!-----------------------------------------------------------------------
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C

==== ecsc04/qput12.txt ====
!
! Contact Alan Anderson ,ERCC before modifying this code
!
!
! Dec 6  Vsn 12 - Corrections for IMP on Perq
!
!Sept 8    Vsn 11  - Handles Imp data entries and references.!
!
!August 31 Vsn 10
!                  - Uses in store work file if big memory.
!                  - Ensures old object files taken care of.
!
!August 20 Vsn 9
!                  Lasttype becomes an own - P71
!                  Diagnostic records are moved out of qcodes into
!                  the unswopped area at the back of the file.
!                  For Fortran on Perq only, not IMP.
!                  Comment out decode sections. redtapelen->0.
!
!june 24 - Vsn 7   better error messages
!june 24           watch for adjacency and repitition in data statements

==== ecsc04/message.txt ====
==== ecsc04/perqimports.txt ====
!*
%CONSTINTEGER MODCOUNT=53
!*
%CONSTSTRING(15)%ARRAY MODULES(0:MODCOUNT) = %C
   "F77INIT","F77DCTL","F77DIAG","F77IDIAG","F77FDIAG",
   "F77RMESS","F77IO","F77FMT","F77INTRIN","F77AUX",
   "F77MAP","F77CMESS","F77COMP","F77ANAL","F77ALLOC",
   "F77GEN","F77CODE","F77QPUT","IMPSUP","F77QCODE",
   "F77IOA","F77IOB","F77IOC","F77IOD","F77IOE",
   "F77IOF","F77FILE","F77COPS","F77SUP","EXTHELP",
   "F77REAL",
   "ILAP4","CONTACT","PLA","XPLA","STACK","ROUTE","PAD",
   "ANNOTATE","UTIL","DRC","PLACE","STABLE","PCOMPAT",
   "IMPIOCP","IMPIOCPI","IMPREALFN",
   "TRANSF","CPARSE","CIFSYS","CIFVIEW","PERQPIC","EDWIN","FIRST2"
!*
%CONSTINTEGER RCOUNT=394
!*
%CONSTSTRING(19)%ARRAY RNAMES(0:RCOUNT) = %C
   "F77IOA","F77IOB","F77IOC","F77IOD","F77IOE","F77IOF",
   "INITMAIN","INITGLA","f77IOCP","F77STOP","f77WRITE",

==== ecsc04/lay.txt ====
%BEGIN;  !DOCUMENT LAYOUT PROGRAM
!SYMBOLIC CONSTANTS
%OWNINTEGER   HALF=1
%OWNINTEGER    LINEEXP=0
%OWNINTEGER    EXPIND=0
%OWNINTEGER    EXPBIT=1024
%OWNINTEGER    EXPSH=0
%OWNINTEGER    LINESUB=0
%OWNINTEGER    SUBIND=0
%OWNINTEGER    SUBBIT=2048
%OWNINTEGER    SUBSHB=0
%OWNINTEGER    SUBSHE=0
! PARA HACER LO DE LAS FIGURAS
%OWNINTEGER FIGURA=0
%OWNINTEGER SIN=1;  !SOURCE INPUT STREAM
%OWNINTEGER ERR=0, DOC=2, SOUT=3;  !OUTPUT STREAMS
%OWNINTEGER LBOUND=200;  !LINE BUFF BOUND
%OWNINTEGER ABOUND=200;  !ATOM BUFF BOUND
%OWNINTEGER SBOUND=200;  !SOURCE LINE BUFF BOUND
%OWNINTEGER VBOUND=25;  !VECTOR (EG TAB) BOUND
%OWNINTEGER ESCBIT=256, UNDBIT=128, CASEBIT=32

==== ecsc04/ilap4incs.txt ====
!******************************************************************************
!******************************************************************************
! specs in same order as in perqimports file
%integer %map %spec buried contacts     { FALSE => pla & stacks with no buried contacts
%integer %map %spec ILAP control        { This allows the control over ILAP
%routine %spec warn %alias "ILAPWARNING" (%string(255) s)
%routine %spec die %alias "ILAPDISASTER" (%string (255) s)
%routine %spec update mbb %alias "ILAPUPDATEMBB" (%integer xl, yl, xu, yu)
%routine %spec dump comment (%string (255) s)
%routine %spec symbol (%string (31) name)
%routine %spec external symbol spec (%string (31) name, %integer num, xl, yl, xu, yu)
%routine %spec symbol spec (%string (31) name, %integer xl, yl, xu, yu)
%routine %spec end symbol
%routine %spec ax (%integer u)
%routine %spec ay (%integer v)
%routine %spec axy (%real x, y)
%routine %spec dx (%integer u)
%routine %spec dy (%integer v)
%routine %spec dxy (%real dx, dy)
%routine %spec wirex (%integer x, y, l)
%routine %spec wirey (%integer x, y, l)

==== ecsc04/rom11s.txt ====

  HRCSR=176510        ; HOST DEVICE NOS
  HRBUF=176512
  HXCSR=176514
  HXBUF=176516
  TRCSR=177560        ; TERMINAL DEVICE NOS
  TRBUF=177562
  TXCSR=177564
  TXBUF=177566
  MOV PC,SP        ; SET UP SP TO BE BEFORE CODE
  SUB #2,SP
  CLR @#HRCSR         ; CLEAR DEVICE CSR'S
  CLR @#HXCSR
  CLR @#TRCSR
  CLR @#TXCSR
TR:TSTB @#TRCSR        ; CHAR READY FROM TERMINAL ?
  BPL HR
HX:TSTB @#HXCSR        ; HOST TRANSMITTER READY ?
  BPL HX
  MOVB @#TRBUF,@#HXBUF ; TRANSMIT TERMINAL CHAR TO HOST
HR:TSTB @#HRCSR        ; CHAR READY FROM HOST ?

==== ecsc04/pads.txt ====
!*******************************************************************************
! specs inserted in same order as in perqimports file
%routinespec padvdd
%routinespec padgnd
%routinespec padin(%integername padinx)
%routinespec padout(%integername padoutx)
%routinespec padclout(%integername padcloutx,padcloutclx)
%routinespec padinout(%integername padinoutinx,padinoutoutx,padinoutenx)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %string (2) %fn  %spec contacts
%external %routine %spec end symbol

==== ecsc04/ilap4s.txt ====
!******************************************************************************
!******************************************************************************
! specs in same order as in perqimports file
%routine %spec buried contacts     { pla & stacks with no burried contacts
%routine %spec butting contacts
%string (2) %fn %spec contacts
%integer %map %spec ILAP control        { This allows the control over ILAP
%routine %spec warn %alias "ILAPWARNING" (%string(255) s)
%routine %spec die %alias "ILAPDISASTER" (%string (255) s)
%routine %spec update mbb %alias "ILAPUPDATEMBB" (%integer xl, yl, xu, yu)
%routine %spec dump comment (%string (255) s)
%routine %spec symbol (%string (31) name)
%routine %spec external symbol spec (%string (31) name, %integer num, xl, yl, xu, yu)
%routine %spec symbol spec (%string (31) name, %integer xl, yl, xu, yu)
%routine %spec end symbol
%routine %spec ax (%integer u)
%routine %spec ay (%integer v)
%routine %spec axy (%real x, y)
%routine %spec dx (%integer u)
%routine %spec dy (%integer v)
%routine %spec dxy (%real dx, dy)

==== ecsc04/pinrst.txt ====
AA01    #2907 BUS REC/DRVR

AA0101  GND

AA0103  DTB0 H

AA0102$ RD0 H

AA0107  DTB1 H

AA0106  BDAL1 L

AA0105  NC

AA0104  BDAL0 L

AA0109  DRTB L

AA0108$ RD1 H

AA0110  GND

==== ecsc04/macros.txt ====

$DEF,-,<$DEC,$BAR,-,$BIN,#1;,$BIN,#2;;;>;

$DEF,HANOI,<$#1,#1,#2,#3,$DEF,#1,<$HANOI,$-,#1,1;,#2,$-,$-,6,#2;,#3;;
#2 #3$HANOI,$-,#1,1;,$-,$-,6,#2;,#3;,#3;>;$DEF,0,< >;;>;

]

==== ecsc04/sema01s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%EXTERNALROUTINESPEC PTREC(%RECORDNAME P)
%EXTRINSICLONGINTEGER KMON
%EXTERNALSTRING(15)%FNSPEC STRINT(%INTEGER N)
%EXTERNALSTRING(15)%FNSPEC HTOS(%INTEGER N,M)
%EXTERNALROUTINESPEC OPMESS(%STRING(63) S)
%EXTERNALROUTINESPEC MONITOR(%STRING(63) S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)  
!-----------------------------------------------------------------------
%EXTERNALROUTINE SEMAPHORE(%RECORDNAME P)
%RECORDSPEC P(PARMF)
%OWNBYTEINTEGERARRAY HASH(0:31)=0(32)
! ARRAY DIMENSIONS ASSUME ONLY 'MAXPROCS' SEMAPHORES IN USE AT ONCE
%OWNINTEGERARRAY CELL(1:64)=0(64)    ;  ! (1:MAXPROCS)
%OWNBYTEINTEGERARRAY LINK(1:64)=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
  17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,
  40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
  63,64,1
%OWNINTEGER ASL=64
%INTEGERFNSPEC NEWCELL(%INTEGER S)
%INTEGERFNSPEC RETURN CELL(%INTEGER I)

==== ecsc04/stacks.txt ====
!*******************************************************************************
%routinespec stack(%string(31) name,%integer bits,words,%integername controlx,
 controly,pushcony,popcony,phi1x,phi2x,phi3x,phi4x,%integerarrayname pushy,popy)
!*******************************************************************************
! Declarations for using ILAP included.

%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %string (2) %fn %spec contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)
%external %routine %spec polygon %alias "ILAPPOLYGON" (%real x, y)

==== ecsc04/spls.txt ====

%EXTERNALROUTINE SPL
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC OUT(%INTEGER N)
%CONSTINTEGERARRAY PS(-1000:-906)= %C
  M'SS',-993,'X',-977,'=',-969,10,-987,'-','>',-957,-930,10,
  -983,-957,':',-1000,-981,'!',-978,'E',10,0,M'INDX',-972,'(',
  -969,')',-970,-957,0,M'EXPR',-965,-964,-946,0,M'OPD',-960,'X',
  -977,-958,-957,0,'N',-953,M'DIG',-952,0,M'RDIG',-948,M'DIG',
  -952,-947,0,M'REXP',-942,-940,-964,-941,0,M'OP',-937,'+',-935,
  '-',-933,'*',-931,'/',0,M'IF',-923,'I','F',-964,-921,-964,
  -922,0,M'COMP',-918,'=',-916,'#',-913,'>','=',-911,'>',-908,
  '<','=',-906,'<',0
%INTEGERARRAY A,PN,T(1:100)
%INTEGERARRAY CT,BTLAB,BTAD(0:100)       ;! CONSTANT & BRANCH  TABLES
%INTEGER I,J,TP,AP,CA,CTP,BTP
CA=0
CT(0)=0        ;! HOLE FOR 'X' BASE
CTP=1

==== ecsc04/temp.txt ====

0
0.0
0000.0
0001
1.0
34.3
+4735.3
-6.7
----2.5
(27)
-+-(-((+(0102.3))))

==== ecsc04/sema02s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%EXTERNALROUTINESPEC PTREC(%RECORDNAME P)
%EXTRINSICLONGINTEGER KMON
%EXTERNALSTRING(15)%FNSPEC STRINT(%INTEGER N)
%EXTERNALSTRING(15)%FNSPEC HTOS(%INTEGER N,M)
%EXTERNALROUTINESPEC OPMESS(%STRING(63) S)
%EXTERNALROUTINESPEC MONITOR(%STRING(63) S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)  
!-----------------------------------------------------------------------
%EXTERNALROUTINE SEMAPHORE(%RECORDNAME P)
%RECORDSPEC P(PARMF)
%OWNBYTEINTEGERARRAY HASH(0:31)=0(32)
! ARRAY DIMENSIONS ASSUME ONLY 'MAXPROCS' SEMAPHORES IN USE AT ONCE
%OWNINTEGERARRAY CELL(1:128)=0(128)    ;  ! (1:MAXPROCS)
%OWNBYTEINTEGERARRAY LINK(1:128)=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
  17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,
  40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
  63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,
  85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,
  105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,
  121,122,123,124,125,126,127,128,1

==== ecsc04/cgwwpps.txt ====
 1991 WIRES

A& :  0 0 0 0 0 0 1 2 2 2 2 2 1 2 0 2 2 2 1 2 2 2 2 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1

B& :  0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 2 1 2 2 2 2 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 2 1 1 1 1 1 1

C& :  0 0 0 0 0 0 1 0 0 0 2 0 2 0 2 0 0 2 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 2 1 1

D& :  0 0 0 0 0 0 1 0 0 0 2 0 2 0 2 0 0 2 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 2 1 1

E& :  0 0 0 0 0 0 1 0 0 0 2 0 2 0 2 0 0 2 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 2 1 1

F& :  0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 0 0 1 1 1 1 1 2 0 0 0 0 0 0 0 0

AA :   2 1 1 1 2 1 1 1 1 0 1 2 2 2 2 1 2 1 2 1 1 1 1 1 1 1 1 1 2 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

AB :   1 1 1 1 1 2 1 1 1 1 1 2 2 2 2 2 2 1 1 2 1 2 1 1 1 1 1 2 2 2 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

AC :   2 2 1 1 2 1 1 1 2 0 2 2 2 2 2 1 2 1 2 1 1 2 2 2 2 1 1 1 1 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

AD :   1 2 1 2 1 2 1 1 1 2 1 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 1 2 1 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

==== ecsc04/a68s.txt ====

%EXTERNALROUTINE A68(%STRING(63) SRCE)
%STRING(15) OBJ,LIST
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%CONSTINTEGER IHASH=59
%CONSTBYTEINTEGERARRAY HILINK(0: 58)= %C
   2, 0, 5, 8, 10, 11, 12, 15, 0, 17, 21, 23, 26, 30, 32, 36,
   0, 38, 41, 0, 42, 46, 50, 52, 53, 55, 57, 58, 0, 0, 60, 0,
   62, 66, 69, 73, 76, 0, 77, 0, 79, 82, 85, 88, 0, 0, 0, 91,
   92, 93, 95, 97, 100, 0, 102, 107, 110, 111, 113
%CONSTSTRING(4)%ARRAY INSTR(1:113)= %C
  "PULB","BVS","BHI","SBA","DECA","DECB","CLRA","BLE","DES",
  "CLRB","ANDA","ANDB","NOP","TAB","ORG","DEX","BITA","TPA","BSR",
  "TSTA","BITB","TSTB","FDB","SEV","INS","INCA","PSHA","JMP","INCB",
  "STS","LSRA","PSHB","LSRB","BPL","WAI","NEG","INX","BLS","STX",
  "TST","BLT","COM","NEGA","TAP","CLC","BEQ","TSX","TBA","SBCA",
  "NEGB","BMI","SBCB","ROL","RORA","ADCA","RORB","ADCB","CLI","LDS",
  "ROR","SUBA","LDAA","LSR","ORAA","SUBB","LDAB","BCC","ASRA","ORAB",
  "ASRB","END","BNE","LDX","CBA","CLR","BRA","TXS","DAA","CLV",
  "BGE","EQU","ADDA","COMA","ADDB","RTI","BVC","ASL","COMB","CPX",
  "ROLA","DEC","ROLB","ASR","BCS","CMPA","SWI","CMPB","SEC","RTS",

==== ecsc04/snoopys.txt ====

%EXTERNALROUTINE SNOOPY(%STRING(63) FILE)
%INTEGER I,J,K
%ROUTINESPEC ROWOUT(%INTEGERARRAYNAME L)
%OWNINTEGERARRAY L1(32:95)=X'00',X'18',X'36',X'14',X'3E',X'71',X'18',
   X'18',X'0C',X'18',X'00',X'00',X'00',X'00',X'00',X'01',X'3E',X'0C',
   X'3E',X'7F',X'60',X'7F',X'3E',X'7F',X'3E',X'3E',X'00',X'00',X'04',
   X'00',X'20',X'3C',X'3E',X'08',X'7E',X'3E',X'7E',X'7F',
   X'7F',X'3E',X'63',X'1E',X'07',X'63',X'60',X'41',X'43',X'3E',X'7E',
   X'3E',X'7E',X'3E',X'3F',X'63',X'63',X'63',X'41',X'42',X'7F',
   X'3C',X'00',X'3C',X'08',X'00'
%OWNINTEGERARRAY L2(32:95)=X'00',X'18',X'36',X'14',X'49',X'52',X'24',
   X'18',X'18',X'0C',X'22',X'08',X'00',X'00',X'00',X'02',X'63',X'1C',
   X'43',X'06',X'60',X'60',X'63',X'03',X'63',X'63',X'00',X'18',X'08',
   X'00',X'10',X'66',X'41',X'14',X'63',X'63',X'63',X'60',
   X'60',X'63',X'63',X'0C',X'03',X'66',X'60',X'63',X'63',X'63',X'63',
   X'63',X'63',X'63',X'0C',X'63',X'63',X'63',X'63',X'42',X'02',
   X'30',X'00',X'0C',X'1C',X'00'
%OWNINTEGERARRAY L3(32:95)=X'00',X'18',X'36',X'7F',X'48',X'74',X'18',
   X'18',X'18',X'0C',X'14',X'08',X'00',X'00',X'00',X'04',X'63',X'0C',
   X'06',X'0C',X'6C',X'60',X'60',X'06',X'63',X'63',X'18',X'18',X'10',

==== ecsc04/a68t.txt ====

JOE STAA FRED
FRED EQU $123
 ORG 234
HARRY EQU FRED+*
 EQU 999
ALEX EQU SID
 ORG WHO
* COMMENT
 STAB FRED WHAT WHAT WHAT ?
 ZYX
 BRA FRED
 BEQ *+99
 CLRA
 TAB
 ADDA JOE
 STAA FRED
 ADDB JOE,X
PETE EQU $ABCD
 ADDA PETE
 FCB 300

==== ecsc04/stables.txt ====
!***************************************************************************
%routinespec stable(%string(255) filespec,%integer diags)
%routinespec table(%string(255) filespec)
%routinespec table with diags(%string(255) filespec)
!***************************************************************************
!--------------------------------------------------------------------------!
!  sTABLE: Routine to Convert Boolean Equations to TRUTH Table             !
!                                                                          !
!   This routine is called by two ILAP utilities : TABLE as ILAP routine,  !
! TABLE as a program. The program version gives more feedback to the user, !
! while the external routine only gives feedback on a fatal error.         !
!                                                                          !
! George A. McCaskill 20th August 1982                                     !
!--------------------------------------------------------------------------!
!%include "$ilap:.inc"
%constinteger true=0,false=1
!%include "plautils.inc"
%externalroutinespec fault %alias "ILAPDISASTER" (%string(255) s)
!*******************************************************************************
! specs for external routines in file IMPIOCPI
%externalroutinespec openinput(%integer stream,%string(100) filename)

==== ecsc04/rufc.txt ====



                          O
                        DD
                       D  D
                      O    OO
                       D   O D
                        D O   DD
                        OO        D  OOOO
                        D     9  D  OO   O
       MMM             D      9 OOOOO     O
      MMMMM         MMM D       OOOO
     MM   MM     MOO           D   OO     O
    MM     MM   M OO          D     OOO   O
   MM      MMM M  OO         D       OOO   OO
  MM        MMM   OO        D          OOOOO
      MMMMMMM     OO       D
    MMMMMMMMM     OO      D
   MMM       D    OO     D
   MM       D     OO    D

==== ecsc04/csd083ds.txt ====

%EXTERNALREALFN DISTANCE(%STRING(8) NAM1,%INTEGER ROW1,COL1,PIN1,NOP1,%C
  %REAL X1,Y1,%STRING(8) NAM2,%INTEGER ROW2,COL2,PIN2,NOP2,%REAL X2,Y2)
  %RESULT=SQRT((X1-X2)**2+(Y1-Y2)**2)
%END
%EXTERNALROUTINE POSITION(%STRING(8) NAM,%INTEGER ROW,COL,PIN,NOP, %C
  %REALNAME X,Y)
%CONSTREALARRAY CX(1:7)=0.6,1.5,2.4,3.3,4.2,5.1,6.0
%CONSTREALARRAY CY(1:8)=4.8,4.2,3.6,3.0,2.5,1.6,1.0,0.4
  %IF NAM="C" %THEN %START
    %IF PIN<=NOP//2 %THEN %START
      X=CX(COL)+PIN/10
      Y=CY(ROW)
    %FINISH %ELSE %START
      X=CX(COL)+(NOP-PIN+1)/10
      %IF NOP>=24 %THEN Y=CY(ROW)-0.6 %ELSE Y=CY(ROW)-0.3
    %FINISH
    %RETURN
  %FINISH
  %IF NAM="A1" %THEN X=0 %AND Y=5.0-ROW/8 %AND %RETURN
  %IF NAM="B1" %THEN X=0 %AND Y=2.25-ROW/8 %AND %RETURN

==== ecsc04/figs.txt ====
$A NLS=1
$A TAB=0,3,6,9,12,15,18,21,24,27,30
$B0
%SEMAPHORE MANAGERSEM
$B0
%CYCLING %SEMAPHORE MUTEX1, MUTEX3,R,W
$B2
%BEGIN %PROCESS
$B0
%CAPABILITY .PROCESS
$B0
%CYCLING %SEMAPHORE THE STATUS
$B0
%CYCLE
$B0
$A INDENT=2
READER ENTRY
$B0
%CYCLE
$A INDENT=3
.PROCESS = NEXT PROCESS( .PROCESS .LIST)

==== ecsc04/max86.txt ====

%ELEMENTDEF I8086(%INPUT RESET,READY,CLK,NMI,MX,TEST,XGND,GT0,GT1,INTR,&
  %INOUTARRAY AD(0:15),%OUTPUT BHE,%OUTPUTARRAY S(0:2))
%ELEMENTDEF I8284(%INPUT RES,AEN1,AEN2,RDY1,RDY2,CSYNC,FC, &
  %OUTPUT READY,CLK,PCLK,OSC,RESET,%INOUT X1,X2)
%ELEMENTDEF I8288(%INPUT CLK,AEN,CEN,IOB,%INPUTARRAY S(0:2), &
  %OUTPUT ALE,DEN,DTR,AIOWC,IORC,AMWC,MRDC,INTA)
%ELEMENTDEF I8259(%INPUT CS,RD,WR,INTA,A0,%INPUTARRAY IR(0:7), &
  %OUTPUT INT,EN,%INOUTARRAY D(0:7))
%ELEMENTDEF I8282(%INPUT STB,OE,%INPUTARRAY DI(0:7), &
  %OUTPUTARRAY DO(0:7))
%ELEMENTDEF I8286(%INPUT T,OE,%INOUTARRAY A,B(0:7))
%ELEMENTDEF I2616(%INPUT CE,OE,VPP,%INPUTARRAY A(0:10), &
  %OUTPUTARRAY O(0:7))
%ELEMENTDEF I2142(%INPUT CS1,CS2,WE,OD,%INPUTARRAY A(0:9), &
  %INOUTARRAY IO(1:4))
%ELEMENTDEF I8205(%INPUT E1,E2,E3,A0,A1,A2,%OUTPUTARRAY O(0:7))
%ELEMENTDEF I8251(%INPUT CLK,RESET,CD,WR,RD,CS,TXC,RXC,CTS,RXD, &
  %INPUTARRAY D(0:7),%OUTPUT TXD)
%ELEMENTDEF LDRIV(%INPUT A,B,C,D,VP12,VM12,%OUTPUT Y)
%ELEMENTDEF LREC(%INPUT EIA,MILP,MILM,HYST,STR,%OUTPUT Y)

==== ecsc04/skimps.txt ====

%BEGIN
%ROUTINESPEC READ SYM(%INTEGERNAME I)
%ROUTINESPEC READ PS
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC FAULT(%INTEGER A,B,C,D)
%ROUTINESPEC OUT(%INTEGER I)
%INTEGERFNSPEC CHNEXT
%INTEGERFNSPEC NEWCELL
%INTEGERFNSPEC RETURN CELL(%INTEGER I)
%ROUTINESPEC PRINT NAME(%INTEGER I)
%ROUTINESPEC PRINT LABEL(%INTEGER I)
%ROUTINESPEC SHOW TAGS
%INTEGER I,J,AP,APP,TP,ASL,BTN,CTN,CHP,FAULTS,NL,LEVEL,CA,COMP,SCF,PARS
%INTEGERARRAY PS(-1000:-620)                 ;! REDUCED PHRASE STRUCTURE
%INTEGERARRAY CHL,TAGL(0:255)
%INTEGERARRAY TAG,LINK(1:1000)               ;! TAGS LISTS
%INTEGERARRAY A,PN,NP(1:200)                 ;! ANALYSIS RECORD
%INTEGERARRAY T(1:300)                       ;! SOURCE TEXT

==== ecsc04/max86ww.txt ====

%ELEMENTDEF I8086(%INPUT RESET,READY,CLK,NMI,MX,TEST,XGND,GT0,GT1,INTR,&
  %INOUTARRAY AD(0:15),%OUTPUT GND,BHE,%OUTPUTARRAY S(0:2))
%ELEMENTDEF I8284(%INPUT RES,AEN1,AEN2,RDY1,RDY2,CSYNC,FC, &
  %OUTPUT GND,READY,CLK,PCLK,OSC,RESET,%INOUT X1,X2)
%ELEMENTDEF I8288(%INPUT CLK,AEN,CEN,IOB,%INPUTARRAY S(0:2), &
  %OUTPUT GND,ALE,DEN,DTR,AIOWC,IORC,AMWC,MRDC,INTA)
%ELEMENTDEF I8259(%INPUT CS,RD,WR,INTA,A0,%INPUTARRAY IR(0:7), &
  %OUTPUT GND,INT,EN,%INOUTARRAY D(0:7))
%ELEMENTDEF I8282(%INPUT STB,OE,%INPUTARRAY DI(0:7), &
  %OUTPUT GND,%OUTPUTARRAY DO(0:7))
%ELEMENTDEF I8286(%INPUT T,OE,%INOUTARRAY A,B(0:7))
%ELEMENTDEF I2616(%INPUT CE,OE,VPP,%INPUTARRAY A(0:10), &
  %OUTPUT VCC,%OUTPUTARRAY O(0:7))
%ELEMENTDEF I2142(%INPUT CS1,CS2,WE,OD,%INPUTARRAY A(0:9), &
  %INOUTARRAY IO(1:4))
%ELEMENTDEF I8205(%INPUT E1,E2,E3,A0,A1,A2,%OUTPUT GND, &
  %OUTPUTARRAY O(0:7))
%ELEMENTDEF I8251(%INPUT CLK,RESET,CD,WR,RD,CS,TXC,RXC,CTS,RXD, &
  %INPUTARRAY D(0:7),%OUTPUT GND,TXD)
%ELEMENTDEF LDRIV(%INPUT A,B,C,D,VP12,VM12,%OUTPUT Y)

==== ecsc04/ptests.txt ====
program test(input,output);
imports r123 from r123;
var i:long;
begin
  r1(1234);
  i:=999 ; r2(i) ; writeln(i) ;
  r3('hi there!')
end.

==== ecsc04/three.txt ====
$A MARK=1
$A PAGENO=102

$A LEFT=0; LINE=69; PAGE=57
$A TOP=4; BOTTOM=9
$A NLS=2
$A TAB=1,7,13,19,25
$B5
$L1 CM
CHAPTER 3
$B5
$L1 CM
A FUNCTIONAL CAPABILITY SYSTEM.
$N
$L1 C
3.0.- INTRODUCTION.
$P3
@THE KERNEL ATTEMPTS TO PROVIDE A SYSTEM WIDE PROTECTION AND NAMING
MECHANISM BY OFFERING OPERATIONS TO CREATE CAPABILITIES FOR EXTENDED
TYPES OF OBJECTS. @HOWEVER, A COMMON PROPERTY OF CAPABILITY SYSTEMS
IS THE RELATIVE INDEPENDENCY OF THE DEFINITION OF A TYPE WITH RESPECT

==== ecsc04/four.txt ====
$A MARK=1
$A PAGENO=144


$A LEFT=0; LINE=69; PAGE=57
$A TOP=4; BOTTOM=9
$A NLS=2
$A TAB=1,7,13,19,25
$B5
$L1   CM
CHAPTER 4
$B5
$L1 CM
PROTECTED INTER-PROCESS SYNCHRONISATION.
$N
$L1 C
4.0- INTRODUCTION.
$P3
@THE COMMUNICATION BETWEEN PROCESSES CAN TAKE PLACE VIA THE
INTERCHANGE OF MESSAGES DEPOSITED WITHIN SHARED OPERAND OBJECTS. @THE
SYNCHRONISATION ACTIVITIES REQUIRED TO EFFECT THE COMMUNICATIONS CAN

==== ecsc04/drcs.txt ====
!*********************************************************************
! spec for routine in this file DRC
%routinespec check(%string(31) s,%byteintegerarrayname data, %c
  %shortintegerarrayname tranids,%integer xmax,ymax,xorigin,yorigin)
!*********************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %routine %spec first cell number (%integer num)
%external %routine %spec set lambda (%integer l)
%external %string (2) %fn %spec contacts
%external %integer %map %spec ILAP control
%constant %integer       no warnings = 1
%constant %integer    monitor endsym = 2

==== ecsc04/routeincs.txt ====
!*******************************************************************************1
%recordformat port(%integer x,w)
%integerfnspec route(%string(31) name,%record(port)%arrayname a,b,
  %integer n,%string(4) lay,%integer twid,tsep,sepn)
%routinespec croute(%string(31) name,%record(port)%arrayname a,b,
  %integer n,ya,xb,%string(4) lay,%integer twid,tsep)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %integer %map %spec buried contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)

==== ecsc04/iskimpps.txt ====


B<NAME>=1
B<CNST>=2
B<ASSI>=3
B<ASSR>=4
B<ASSX>=5

P<SS>=  <UI><SEP>,
        '%IF'<SC><COND>'%THEN'<UI><UIS><ELSE><SEP>,
        <CNST>':'<SS>,
        '%FINISH'<ELSE><SEP>,
        '%INTEGER'<ARR><SEP>,
        <RT><SPEC><NAME><FPP><SEP>,
        '%END'<SEP>,
        '%BEGIN'<SEP>,
        '%ENDOFPROGRAM'<SEP>,
        '*'<ASSI><FORM><SEP>,
        '*'<+-\><CNST><BASE><SEP>,
        '**'<CNST><SEP>,
        <SEP>;

==== ecsc04/padincs.txt ====
!*******************************************************************************
! specs inserted in same order as in perqimports file
%routinespec padvdd
%routinespec padgnd
%routinespec padin(%integername padinx)
%routinespec padout(%integername padoutx)
%routinespec padclout(%integername padcloutx,padcloutclx)
%routinespec padinout(%integername padinoutinx,padinoutoutx,padinoutenx)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %integer %map %spec buried contacts
%external %routine %spec end symbol

==== ecsc04/annotincs.txt ====
!*******************************************************************************
%routine %spec crest (%integer xsize, ysize)
%routine %spec text %alias "ILAPTEXT" (%string (31) name,
   %string (255) text, %integer xsize, ysize)
!*******************************************************************************
! Declarations for using ILAP included.

%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %routine %spec first cell number (%integer num)
%external %routine %spec set lambda (%integer l)
%external %integer %map %spec buried contacts
%external %integer %map %spec ILAP control

==== ecsc04/splstemp.txt ====

%EXTERNALROUTINE SPL
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC OUT(%INTEGER N)
%CONSTINTEGERARRAY PS(-1000:-906)= %C
  M'SS',-993,'X',-977,'=',-969,10,-987,'-','>',-957,-930,10,
  -983,-957,':',-1000,-981,'!',-978,'E',10,0,M'INDX',-972,'(',
  -969,')',-970,-957,0,M'EXPR',-965,-964,-946,0,M'OPD',-960,'X',
  -977,-958,-957,0,'N',-953,M'DIG',-952,0,M'RDIG',-948,M'DIG',
  -952,-947,0,M'REXP',-942,-940,-964,-941,0,M'OP',-937,'+',-935,
  '-',-933,'*',-931,'/',0,M'IF',-923,'I','F',-964,-921,-964,
  -922,0,M'COMP',-918,'=',-916,'#',-913,'>','=',-911,'>',-908,
  '<','=',-906,'<',0
%INTEGERARRAY A,PN,T(1:100)
%INTEGERARRAY CT,BTLAB,BTAD(0:100)       ;! CONSTANT & BRANCH  TABLES
%INTEGER I,J,TP,AP,CA,CTP,BTP
CA=0
CT(0)=0        ;! HOLE FOR 'X' BASE
CTP=1

==== ecsc04/figs.html ====
<html><head></head><body><pre>


<em>semaphore</em> managersem
<em>cycling</em> <em>semaphore</em> mutex1, mutex3,r,w


<em>begin</em> <em>process</em>
<em>capability</em> PROCESS
<em>cycling</em> <em>semaphore</em> the status
<em>cycle</em>
  reader entry
  <em>cycle</em>
     PROCESS = next process( PROCESS LIST)
     <em>if</em> PROCESS # NULL <em>then</em> <em>start</em>
        <em></em>p (the status)
           <em>if</em> PROCESS_STATUS = 'ready' <em>then</em> <em>start</em>
              PROCESS_STATUS = 'running'
           <em>finish</em> <em>else</em> <em>start</em>
              PROCESS = DUMMY
           <em>finish</em>

==== ecsc04/plaincs.txt ====
!*******************************************************************************
%routine %spec pla (%string (31) name,%integer ins,outs,feeds,prods,
  %integerarrayname and,or,%integername phi1y,phi2y, %integerarrayname inx,outx)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %integer %map %spec buried contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)
%external %routine %spec polygon %alias "ILAPPOLYGON" (%real x, y)
%external %routine %spec wirex   (%integer x, y, l)
%external %routine %spec wirey   (%integer x, y, l)

==== ecsc04/ilaps_ilap4.txt ====
%const %string (31) VERSION = "Imp LAP Version 4.1 17-Sep-82"
!******************************************************************************
!******************************************************************************
!***                                                                        ***
!***                        This is ILAP                                    ***
!***                             or                                         ***
!***                          Imp LAP                                       ***
!***                                                                        ***
!******************************************************************************
!******************************************************************************
! 
! 
! INTRODUCTION:
! 
!    ILAP is a  series  of  external  Imp77  procedures  which  allow  the
! creation  of  syntactically correct CIF2.0 representations of integrated
! circuit layouts.   By embedding a graphics capability into a high  level
! language,  the  use  of  control structures and parameterised symbols is
! made available to the designer.
! 
! 

==== ecsc04/dcapdoc.txt ====

$A INVERT=0; JUST=1; UNDSH='|'; PAGENO=1; UND='~'; CAPSH='|'; CAPSHO='|'
$A MARK=2
$L5UM


DCAP : David's Circuit Assignment Program


$P
DCAP provides a method of description of circuits, the assignment of
functional elements to integrated circuit chips and their layout on
circuit boards. It creates data structures corresponding to the
descriptions in a file which can then be used for further processing.
At the present state of development of the system, this
consists of producing a wire-wrap schedule for the circuit but
it is also intended that it should be used for other stages in the
design and construction process such as printed circuit board design,
production of circuit schematics by plotter etc.
$P
Rather than use a description of the circuit in terms of functional

==== ecsc04/dcapas.txt ====

%EXTERNALROUTINE DCAPA(%STRING(63) PAR)
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC FILL(%SHORTINTEGERARRAYNAME D,%INTEGER FROM,TO,VAL)
%SHORTINTEGERARRAYFORMAT SF(0:32759)
%SHORTINTEGERARRAYNAME S,ED,AD,BD,CD
%SHORTINTEGERNAME SP,EDP,ADP,BDP
%SHORTINTEGERARRAY A,NP(1:1004)
%BYTEINTEGERARRAY T(1:1000)
%SHORTINTEGERARRAY IV(0:72)   ;! ALLOWS 8 NESTING LEVELS
%SHORTINTEGER IVP
%INTEGER AP,TP,I,J,DEF,FIRSTINFO,FAULTS,ELNUM,DUMMY,DCAPFAD
%OWNINTEGER LASTLINK=11
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%SYSTEMROUTINESPEC OUTFILE(%STRING(15) S,%INTEGER LENGTH,MAX,PROT, %C
 %INTEGERNAME CONAD,FLAG)
%STRING(63) P,Q,R,TAPE
%OWNSHORTINTEGERARRAY PS(-1000:-518)= %C
-997,-933,-522,-993,-678,-811,-522,-988,   1,  58,-852,-522,

==== ecsc04/impiospecs.txt ====
!*******************************************************************************
! specs for external routines in file IMPIOCPI
%externalroutinespec openinput(%integer stream,%string(100) filename)
%externalintegerfnspec instream
%externalstring(100)%fnspec infilename(%integer stream)
%externalroutinespec closeinput(%integer stream)
%externalroutinespec openoutput(%integer stream,%string(100) filename)
%externalintegerfnspec outstream
%externalstring(100)%fnspec outfilename(%integer stream)
%externalroutinespec closeoutput(%integer stream)
!*******************************************************************************

==== ecsc04/ilaps_route.txt ====
%include "ilap_inc"
%externalintegerfn route(%string(31) name,%record(port)%arrayname a,b,
  %integer n,%string(4) lay,%integer twid,tsep,sepn)
%externalstring(63)%fnspec itos(%integer n,p)
%external %routine %spec die %alias "ILAPDISASTER" (%string (255) mess)

%routine %spec fault (%string (255) mess)
%integerarray ap(1:n,1:n)
%integerarray apl(1:n)
%integer i,j,k,l,p,q,x,sep,tws,sx
  %for p=1,1,n %cycle
    %if a(p)_w<twid %then fault("A port ".itos(p,0)." too narrow")
    %if b(p)_w<twid %then fault("B port ".itos(p,0)." too narrow")
  %repeat
  %for p=1,1,n-1 %cycle
    %if a(p)_x+a(p)_w+tsep>a(p+1)_x %then fault("A ports ".itos(p,0). %c
      " and ".itos(p+1,0)." too close")
    %if b(p)_x+b(p)_w+tsep>b(p+1)_x %then fault("B ports ".itos(p,0). %c
      " and ".itos(p+1,0)." too close")
  %repeat
  tws=twid+tsep

==== ecsc04/hashs.txt ====

%EXTERNALROUTINE HASH(%STRING(63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%STRING(4)%ARRAY INSTR(1:171)
%BYTEINTEGERARRAY ITYPE(1:171)
%BYTEINTEGERARRAY ICODE(1:171)
%BYTEINTEGERARRAY ILINK(1:171)
%CONSTINTEGER HASHSIZE=63
%BYTEINTEGERARRAY HILINK(0:HASHSIZE)
%INTEGER I,J,K,L,TYPE,CODE
%STRING(15) T,U
%CONSTSTRING(1)%ARRAY H(0:15)="0","1","2","3","4","5","6","7",
  "8","9","A","B","C","D","E","F"
  S->T.(",").U
  DEFINE("STREAM01,".T)
  SELECT INPUT(1)
  DEFINE("STREAM02,".U)
  %CYCLE I=0,1,HASHSIZE
    HILINK(I)=0
  %REPEAT
  %CYCLE L=1,1,171

==== ecsc04/pins.txt ====
AA01	#2907 BUS REC/DRVR

AA0101	GND

AA0103	DTB0 H

AA0102$ RD0 H

AA0107	DTB1 H

AA0106	BDAL1 L

AA0105	NC

AA0104	BDAL0 L

AA0109	DRTB L

AA0108$ RD1 H

AA0110	GND

==== ecsc04/ilaptests.txt ====
%include "ilapincs"
%begin
  initialise("ilaptest")
  symbol("sym1")
    etpx("pd",1,2,3)
  endsymbol
  drcon
  symbol("sym2")
    dtdy("pu",4,5,6)
  endsymbol
%endofprogram

==== ecsc04/routes.txt ====
!*******************************************************************************1
%recordformat port(%integer x,w)
%integerfnspec route(%string(31) name,%record(port)%arrayname a,b,
  %integer n,%string(4) lay,%integer twid,tsep,sepn)
%routinespec croute(%string(31) name,%record(port)%arrayname a,b,
  %integer n,ya,xb,%string(4) lay,%integer twid,tsep)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %string (2) %fn %spec contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)

==== ecsc04/xtalk.txt ====


Pascal Compiler IV.13 c6t-4      2/ 5/85                                              Page   1 


    1   0    0:d    1  { $L WORK:TTY.A.LIST.TEXT}
    2   0    0:d    1  {$S+} {SWAPPING MODE FOR MORE SYMBOL TABLE SPACE}
    3   0    0:d    1  
    4   2    1:d    1  PROGRAM TTY;
    5   2    1:d    1  
    6   2    1:d    1  {PROGRAM TO ALLOW MICRO TO ACT AS A TERMINAL TO A REMOTE}
    7   2    1:d    1  {AND TO TRANSFER FILES BETWEEN THE MICRO AND THE REMOTE }
    8   2    1:d    1  
    9   2    1:d    1  Uses 
   10   2    1:d    1  {-----------------------------------------------------------------------------}
   11   2    1:d    1              {TTY.UNIT.G - unit include file for general - 1-Feb-83 }
   12   2    1:d    1  {-----------------------------------------------------------------------------}
   13   2    1:d    1  
   14   2    1:d    1   {$U *system.library  } ScreenOps
   15   2    1:d    1  
   16   2    1:d    1  {-----------------------------------------------------------------------------}

==== ecsc04/pr123s.txt ====
module r123;
exports
procedure r1(i:integer);
procedure r2(var i:integer);
procedure r3(s:string[31]);
private
procedure r1(i:integer);
begin ; end.
procedure r2(var i:integer);
begin ; end.
procedure r3(s:string);
begin ; end.

==== ecsc04/splits.txt ====
%EXTERNALROUTINE SPLIT (%STRING(63) CMD)
!
!
!***************************************************
!*  SIMPLE PRECEDENCE LANGUAGE INTERACTIVE TESTER  *
!*                 S  P  L  I  T                   *
!*                                                 *
!*           NIGEL A CONLIFFE  JUNE 1974           *
!*                          OCTOBER 1975           *
!***************************************************
!
!
!
%CONSTSTRING (40) TITLE='S P L I T : V1 R4'
!
%RECORDFORMAT F1 (%STRING(20) NAME,%BYTEINTEGER TYPE)
%RECORDARRAY SYMTAB (-100:-1) (F1)  ;! SYMBOL TABLE
                                    ;! TYPE=0 FOR NON TERMINAL
                                    ;! TYPE=1 FOR TERMINAL
                                    ;! TYPE=2 FOR DISTINGUISHED SYMBOL
%INTEGERARRAY PS(1:1000)            ;! PHRASE STRUCTURE

==== ecsc04/annotates.txt ====
!*******************************************************************************
%routine %spec crest (%integer xsize, ysize)
%routine %spec text %alias "ILAPTEXT" (%string (31) name,
   %string (255) text, %integer xsize, ysize)
%routine %spec TEXT LAYER (%string (7) LAYER)
!*******************************************************************************
! Declarations for using ILAP included.

%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %routine %spec first cell number (%integer num)
%external %routine %spec set lambda (%integer l)
%external %string (2) %fn  %spec contacts

==== ecsc04/xplas.txt ====
!***********************************************************************
! specs for externalroutines in this file
%routine %spec tpla ( %string (31) symbol name, %string (127) file,
          %integer %name phi1y, phi2y, %integer %array %name inx, outx )
%routine %spec epla ( %string(31) symbol name, %string(127) file,
          %integer %name phi1y, phi2y, %integer %array %name inx, outx )
%routine %spec rom ( %string(31) symbol name,  %string(127) file, 
          %integer %name phi1y, phi2y, %integer %array %name inx, outx )
!***********************************************************************
%external %routine %spec fault %alias "ILAPDISASTER" (%string (255) mess)
%externalroutinespec prompt(%string(63) s)
!*******************************************************************************
! specs for external routines in file IMPIOCPI
%externalroutinespec openinput(%integer stream,%string(100) filename)
%externalintegerfnspec instream
%externalstring(100)%fnspec infilename(%integer stream)
%externalroutinespec closeinput(%integer stream)
%externalroutinespec openoutput(%integer stream,%string(100) filename)
%externalintegerfnspec outstream
%externalstring(100)%fnspec outfilename(%integer stream)
%externalroutinespec closeoutput(%integer stream)

==== ecsc04/ilaps_contacts.txt ====
! The ILAP contact symbols

%include "ilap_inc"

! There now follows some tables which define the symbols -
! The max length of each contact symbol is -
%const %integer sym len = 4

%const %integer  subc start = 1
%const %integer    dm start = subc start + sym len * 5
%const %integer    pm start = dm start + sym len * 5
%const %integer  pdms start = pm start + sym len * 5
%const %integer  pdmn start = pdms start + sym len * 5
%const %integer  pdmw start = pdmn start + sym len * 5
%const %integer  pdme start = pdmw start + sym len * 5
%const %integer pdbns start = pdme start + sym len * 5
%const %integer pdbew start = pdbns start + sym len * 5
%const %integer  pdcn start = pdbew start + sym len * 5
%const %integer  pdcs start = pdcn start + sym len * 5
%const %integer  pdce start = pdcs start + sym len * 5
%const %integer  pdcw start = pdce start + sym len * 5

==== ecsc04/skimpais.txt ====

%CONTROL 0
%BEGIN
%INTEGERARRAY RMN,REG(0:15)
%INTEGERARRAY IMN(1:31)
%INTEGERARRAY LMN,LAD(1:20)
%INTEGERARRAY R(1:4000)
%INTEGERARRAY S(0:16383)
%INTEGER LP,RP,SP,I,J,K,L,M,N,F,MR,TR,ST,CT
%ROUTINESPEC READMN(%INTEGERNAME MN,NEXT)
%ROUTINESPEC FAULT(%INTEGER I,J,K,L)
%ROUTINESPEC OUT(%INTEGER I)
%ROUTINESPEC DUMP
%SWITCH INS(1:31)
%SWITCH IOR(0:10)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
     RMN(0)=M'BR0'  ;  RMN(1)=M'BR1'  ;  RMN(2)=M'BR2'
     RMN(3)=M'BR3'  ;  RMN(4)=M'BR4'  ;  RMN(5)=M'BR5'
     RMN(6)=M'BR6'  ;  RMN(7)=M'BR7'  ;  RMN(8)=M'BR8'
     RMN(9)=M'BR9'  ;  RMN(10)=M'BR10';  RMN(11)=M'BR11'
     RMN(12)=M'BR12';  RMN(13)=M'WK'  ;  RMN(14)=M'STP'

==== ecsc04/spice1.txt ====
.TITLE INVERTER + PASS TRANSISTOR + LOAD
MPD 4 3 0 2 MEHN L=6U W=12U
MPU 1 4 4 2 MDEP L=24U W=6U
MPA 4 5 6 2 MEHN L=6U W=36U
R1 6 7 2.5K
C1 7 0 0.9P
VDD 1 0 5
VBULK 2 0 -3
VIN 3 0 0
VPASS 5 0 PWL(0N 0V 5N 5V)
.TRAN 1N 100N
.PRINT TRAN V(4) V(5) V(6) V(7)
.PLOT TRAN V(4) V(5) V(6) V(7)
.MODEL MEHN NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=-1.882E11 XJ=0.75U LD=0.8 NGATE=1E23 GAMMA=0.43
+NFS=1E11 UO=825 UCRIT=6E4 UEXP=0.25 UTRA=0.5
+CBD=12.33E-5 CBS=12.33E-5 JS=2E-5)
.MODEL MDEP NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=7.72E11 NGATE=1E23 XJ=0.75U LD=0.8
+UO=825 CBD=12.33E-5 CBS=12.33E-5 JS=2E-5)
.END

==== ecsc04/spice2.txt ====
.TITLE INVERTER + PASS TRANSISTOR + LOAD
MPD 4 3 0 2 MEHN L=6U W=48U
MPU 1 4 4 2 MDEP L=6U W=6U
MPA 4 5 6 2 MEHN L=6U W=36U
R1 6 7 1.25K
C1 7 0 0.45P
R2 7 8 1.25K
C2 8 0 0.45P
VDD 1 0 5
VBULK 2 0 -3
VIN 3 0 0
VPASS 5 0 PWL(0N 0V 5N 5V)
.TRAN 5N 500N
.PRINT TRAN V(5) V(8)
.PLOT TRAN V(5) V(8)
.MODEL MEHN NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=-1.882E11 XJ=0.75U LD=0.8 NGATE=1E23 GAMMA=0.43
+NFS=1E11 UO=825 UCRIT=6E4 UEXP=0.25 UTRA=0.5
+CBD=12.33E-5 CBS=12.33E-5 JS=2E-5)
.MODEL MDEP NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=7.72E11 NGATE=1E23 XJ=0.75U LD=0.8

==== ecsc04/skimpas.txt ====

%EXTERNALINTEGERARRAY A(1:255)
! INITIALISATION FOR I/O ROUTINES
%EXTERNALBYTEINTEGERARRAY NAMED(1:1024)=10,'R','E','A','D','S','Y','M',
  'B','O','L',10,'N','E','X','T','S','Y','M','B','O','L',10,'S','K',
  'I','P','S','Y','M','B','O','L',11,'P','R','I','N','T','S','Y','M',
  'B','O','L',5,'S','P','A','C','E',6,'S','P','A','C','E','S',7,'N',
  'E','W','L','I','N','E',8,'N','E','W','L','I','N','E','S',7,'N','E',
  'W','P','A','G','E',4,'R','E','A','D',5,'W','R','I','T','E',0(930)
%EXTERNALINTEGERARRAY NAMEDLINK(0:255)=0,76,0(12),89,0(54),84,0(118),
  52,0(11),1,12,23,34,0(4),67,0(23),46,0(5),59,0(17)
%EXTERNALINTEGERARRAY TAGLINK(0:255)=0,13,0(12),16,0(54),14,0(118),8,
  0(11),1,3,4,5,0(4),11,0(23),7,0(5),10,0(17)
%EXTERNALINTEGERARRAY TAG(1:512)=X'40100001',X'01010002',X'41000002',
  X'40000003',X'40100004',X'01010002',X'40000005',X'40100006',
  X'01010002',X'40000007',X'40100008',X'01010002',X'40000009',
  X'4010000A',X'11010002',X'4020000B',X'01010002',X'01010003',0(494)
%EXTERNALINTEGERARRAY LINK(1:512)=2,0,0,0,6,0,0,9,0,0,12,0,0,
  15,0,17,18,0,0(494)
%EXTERNALINTEGER NAMEDP=95
%EXTERNALINTEGER TAGASL=19

==== ecsc04/spice3.txt ====
.TITLE INVERTER + PASS TRANSISTOR + LOAD
MPD 4 3 0 2 MEHN L=6U W=12U
MPU 1 4 4 2 MDEP L=24U W=6U
MPA 4 5 6 2 MEHN L=6U W=36U
R1 6 7 1.25K
C1 7 0 0.45P
R2 7 8 1.25K
C2 8 0 0.45P
VDD 1 0 5
VBULK 2 0 -3
VIN 3 0 PWL(0N 0V 225N 0V 230N 4V)
VPASS 5 0 PWL(0N 0V 5N 5V 195N 5V 200N 0V 245N 0V 250N 5V)
.TRAN 5N 500N
.PRINT TRAN V(5) V(8)
.PLOT TRAN V(5) V(8)
.MODEL MEHN NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=-1.882E11 XJ=0.75U LD=0.8 NGATE=1E23 GAMMA=0.43
+NFS=1E11 UO=825 UCRIT=6E4 UEXP=0.25 UTRA=0.5
+CBD=12.33E-5 CBS=12.33E-5 JS=2E-5)
.MODEL MDEP NMOS (LEVEL=2 TOX=7E-8 NSUB=3.5E14
+NSS=7.72E11 NGATE=1E23 XJ=0.75U LD=0.8

==== ecsc04/hanoi#cif.txt ====
(CIF 2.0);
(Produced by Imp LAP V1.11 on 22-DEC-1980 at 15:06:51);
(FAB nMOS, Lambda = 300 hundredths of a micron);
DS 100 300 10;    9 gb;
L NM;
B 40 40 0 0;
L ND;
B 40 40 0 0;
L NC;
B 20 20 0 0;
DF;

DS 101 300 10;    9 rb;
L NM;
B 40 40 0 0;
L NP;
B 40 40 0 0;
L NC;
B 20 20 0 0;
DF;


==== ecsc04/skimpbs.txt ====

%EXTRINSICINTEGERARRAY A(1:255)
%EXTRINSICINTEGERARRAY TAGLINK(0:255)
%EXTRINSICINTEGERARRAY TAG(1:512)
%EXTRINSICINTEGERARRAY LINK(1:512)
!-----------------------------------------------------------------------
%EXTERNALROUTINESPEC EXPR(%INTEGER EXPRP)
%EXTERNALINTEGERFNSPEC COND(%INTEGER CONDP,TLABEL,FLABEL)
%EXTERNALSTRING(255)%FNSPEC STRINT(%INTEGER N,P)
%EXTERNALINTEGERFNSPEC GETWORK
%EXTERNALROUTINESPEC RETURNWORK(%INTEGER WORK)
%EXTERNALROUTINESPEC CLEARWORK
%EXTERNALINTEGERFNSPEC NEWTAG
%EXTERNALROUTINESPEC PUSHTAG(%INTEGER IDENT,FORM,TYPE,DIM,LEVEL,RAD)
%EXTERNALROUTINESPEC POPTAGS
%EXTERNALINTEGERFNSPEC GETLABEL(%INTEGER CONSTP)
%EXTERNALROUTINESPEC FILLLABEL(%INTEGER LABEL)
%EXTERNALINTEGERFNSPEC FILLBRANCH(%INTEGER LABEL)
%EXTERNALROUTINESPEC POPLABELS
%EXTERNALINTEGERFNSPEC NEXTPLABEL
%EXTERNALROUTINESPEC DUMP(%STRING(7) OPN,REG,BASE,%INTEGER DISP)

==== ecsc04/pg7879.txt ====

          




















==== ecsc04/two.txt ====
$A MARK=1
$A PAGENO=42


$A LEFT=0; LINE=69; PAGE=57
$A TOP=4; BOTTOM=9
$A NLS=2
$A TAB=1,7,13,19,25
$B5
$L1 CM
CHAPTER 2.
$B5
$L1 CM
OVERVIEW OF CAPABILITY BASED PROTECTION.
$N
2.0.- .INTRODUCTION.
$P2
@IN THE PRESENT WORK WE ARE CONCERNED WITH PROTECTION MECHANISMS
WITH SPECIAL EMPHASIS ON THE PROVISION OF A SUITABLE SKELETON FOR THE
SUPPORT OF USER AVAILABLE SYNCHRONISING PRIMITIVES.
$P

==== ecsc04/iotests.txt ====
!*******************************************************************************
! specs for external routines in file IMPIOCPI
%externalroutinespec openinput(%integer stream,%string(100) filename)
%externalintegerfnspec instream
%externalstring(100)%fnspec infilename(%integer stream)
%externalroutinespec closeinput(%integer stream)
%externalroutinespec openoutput(%integer stream,%string(100) filename)
%externalintegerfnspec outstream
%externalstring(100)%fnspec outfilename(%integer stream)
%externalroutinespec closeoutput(%integer stream)
!*******************************************************************************
%begin
%integer i
  openoutput(1,"out1")
  select output(1)
  %cycle
    read symbol(i)
    print symbol(i)
  %repeat %until i='*'
  close output(1)
  open input(2,"in2")

==== ecsc04/imcs.txt ====

* 05-039 R05 (+ JJ MODS)
* MODEL 70 MICRO-PROGRAM
* NOV 2, 1971
*
INITAL  DC     0                TRAP
        L      RAL,L(INTENT)    POWER UP
*
*
*PHASE 1 ENTRY POINT, INDEXED RS
AMODRS  A      MDR,MDR          FORM EFFECTIVE OPERAND
        D      PC+CLR           GO TO PHASE 2
*
*
*PHASE 1 ENTRY POINT, UNINDEXED RX
NMODRX  L      MAR,MDR          'A' TO MAR
        D      PC+MR+CLR        FETCH OP, GO TO PHASE 2
*
*
*PHASE 1 ENTRY POINT, INDEXED RX
AMODRX  A      MAR,MDR          'A+(X2)' TO MAR

==== ecsc04/skimpcs.txt ====

%EXTRINSICINTEGERARRAY A(1:255)
%EXTRINSICINTEGER CONDOPT
!-----------------------------------------------------------------------
%EXTERNALROUTINESPEC EXPR(%INTEGER EXPRP)
%EXTERNALROUTINESPEC DUMP(%STRING(7) OPN,REG,BASE,%INTEGER DISP)
%EXTERNALROUTINESPEC FILLLABEL(%INTEGER LABEL)
%EXTERNALINTEGERFNSPEC FILLBRANCH(%INTEGER LABEL)
%EXTERNALINTEGERFNSPEC NEXTPLABEL
%EXTERNALROUTINESPEC FAULT(%STRING(63) MESS)
!-----------------------------------------------------------------------
%EXTERNALINTEGER CONDFLAG=0
!-----------------------------------------------------------------------
%EXTERNALINTEGERFN COND(%INTEGER CONDP,TLABEL,FLABEL)
%ROUTINESPEC PROCESSCOND(%INTEGER CONDP)
%ROUTINESPEC TEST(%INTEGER LTESTP)
%ROUTINESPEC CONDREST(%INTEGER CONDRESTP)
%ROUTINESPEC STORE(%INTEGER TESTP,LEVEL,ANDOR)
%ROUTINESPEC SHOW(%STRING(7) AN,%INTEGERARRAYNAME A,%INTEGER P)
%CONSTSTRING(3)%ARRAY TRUE(1:6)="BZ","BNZ","BNG","BL","BNL","BG"
%CONSTSTRING(3)%ARRAY FALSE(1:6)="BNZ","BZ","BG","BNL","BL","BNG"

==== ecsc04/cs3os2.txt ====

                         Computer Science 3

                    Operating Systems Exercise 2


Task :  To simulate and monitor the behaviour of a single process using
        the EMAS scheduling strategies.  The time-slice reference string
        of a typical process is given in file ECSC04.MOND100.  A category
        table might be:

              1    2    3    4    5    6    7    8    9
pages        24   24   24   48   48   48   72   72   72
time-slices  10   20   40   10   20   40   10   20   40
priority      1    2    3    2    3    4    3    4    5
more pages    4    5    6    7    8    9    7    8    9
less pages    1    2    3    1    2    3    4    5    6
more time     2    3    3    5    6    6    8    9    9
less time     1    1    2    4    4    5    7    7    8

    Output monitoring information during the course of the simulation

==== ecsc04/skimpds.txt ====

%EXTRINSICINTEGERARRAY A(1:255)
%EXTRINSICBYTEINTEGERARRAY NAMED(1:1024)
%EXTRINSICINTEGERARRAY NAMEDLINK(0:255)
%EXTRINSICINTEGERARRAY TAGLINK(0:255)
%EXTRINSICINTEGERARRAY TAG(1:512)
%EXTRINSICINTEGERARRAY LINK(1:512)
%EXTRINSICINTEGERARRAY NEXTRAD(0:15)
%EXTRINSICSTRING(4)%ARRAY DISPLAY(0:15)
%EXTRINSICINTEGER TAGASL,LEVEL,TAGSOPT,NEXTCAD,NAMEDP
!-----------------------------------------------------------------------
%EXTERNALROUTINESPEC EXPR(%INTEGER EXPRP)
!-----------------------------------------------------------------------
%OWNINTEGERARRAY WORKLIST(0:15)=0(16)
%OWNINTEGERARRAY NAMELIST(0:15)=0(16)
%OWNINTEGERARRAY BRANCHLIST(0:15)=0(16)
%OWNINTEGERARRAY STARTLIST(0:15)=0(16)
%OWNINTEGERARRAY COT(0:127)
%OWNINTEGER COTP,FAULTS,PARAMS
!-----------------------------------------------------------------------
%EXTERNALSTRING(255)%FN STRINT(%INTEGER N,P)

==== ecsc04/dcapps.txt ====

P<SS>   = <LI><SEP>,
          <ELAS><DEF><SEP>,
          <NAME>':'<NIS><SEP>,
          '%CHIPDEF'<NAME>'('<CFP><RCFP>')='<CT><RCT><SEP>,
          '%BOARDDEF'<NAME>'('<BFP><RBFP>')<-%ASSEMBLY('<NAME>')'<SEP>,
          '%END'<%DEF><SEP>,
          <TEXT><SEP>;
P<LI>   = <TLST>'->'<TLST>,
          '%FOR'<NAME>'='<EXPR>','<EXPR>','<EXPR>'%DO['<LIN><RLIN>']',
          <NAME>'('<EXPL>','<EXPL>')<-%CHIP('<NAME>')<-'<ELT><RELT>,
          <NAME>'('<EXPL>')<-'<NAME><INDX>,
          '!'<TEXT>;
P<TLST> = <NIS><RNIS>,'%N','%GND','%VCC';
P<INDX> = '('<EXPR>')',;
P<SNAM> = '.'<NAME><INDX>,;
P<NIS>  = <NAME><INDX><SNAM>;
P<RNIS> = ','<NIS><RNIS>,;
P<ELT>  = <NAME><INDX><ENAM>,'%N';
P<ENAM> = '.'<NAME><INDX><ENAM>,;
P<RELT> = ','<ELT><RELT>,;

==== ecsc04/skimpes.txt ====

%EXTRINSICINTEGERARRAY A(1:255)
%EXTRINSICINTEGERARRAY TAGLINK(0:255)
%EXTRINSICINTEGERARRAY TAG(1:512)
%EXTRINSICSTRING(4)%ARRAY DISPLAY(0:15)
%EXTRINSICINTEGER LEVEL,CONDFLAG,EXPROPT
!-----------------------------------------------------------------------
%EXTERNALSTRING(255)%FNSPEC STRINT(%INTEGER N,P)
%EXTERNALSTRING(8)%FNSPEC STRHEX(%INTEGER N)
%EXTERNALROUTINESPEC FAULT(%STRING(63) S)
%EXTERNALSTRING(255)%FNSPEC NAME(%INTEGER IDENT)
%EXTERNALROUTINESPEC DUMP(%STRING(7) OPN,REG,BASE,%INTEGER DISP)
%EXTERNALINTEGERFNSPEC GETWORK
%EXTERNALROUTINESPEC RETURNWORK(%INTEGER WORK)
%EXTERNALROUTINESPEC PROC(%INTEGER AP)
%EXTERNALROUTINESPEC ARRAY(%INTEGER AP)
%EXTERNALINTEGERFNSPEC GETCOTI(%INTEGER CONST)
!-----------------------------------------------------------------------
%EXTERNALROUTINE EXPR(%INTEGER EXPRP)
%INTEGERFNSPEC TOTREE(%INTEGER EXPRP)
%ROUTINESPEC EVALUATE(%INTEGER NODEP)

==== ecsc04/csd083s.txt ====

%EXTERNALREALFN DISTANCE(%STRING(8) NAM1,%INTEGER ROW1,COL1,PIN1,NOP1,%C
  %REAL X1,Y1,%STRING(8) NAM2,%INTEGER ROW2,COL2,PIN2,NOP2,%REAL X2,Y2)
  %RESULT=SQRT((X1-X2)**2+(Y1-Y2)**2)
%END
%EXTERNALROUTINE POSITION(%STRING(8) NAM,%INTEGER ROW,COL,PIN,NOP, %C
  %REALNAME X,Y)
%CONSTREALARRAY CY(1:7)=-0.6,-1.5,-2.4,-3.3,-4.2,-5.1,-6.0
%CONSTREALARRAY CX(1:8)=4.8,4.2,3.6,3.0,2.5,1.6,1.0,0.4
  %IF NAM="C" %THEN %START
    %IF PIN<=NOP//2 %THEN %START
      Y=CY(COL)-PIN/10
      X=CX(ROW)
    %FINISH %ELSE %START
      Y=CY(COL)-(NOP-PIN+1)/10
      %IF NOP>=24 %THEN X=CX(ROW)-0.6 %ELSE X=CX(ROW)-0.3
    %FINISH
    %RETURN
  %FINISH
  %IF NAM="A1" %THEN Y=0 %AND X=5.0-ROW/8 %AND %RETURN
  %IF NAM="B1" %THEN Y=0 %AND X=2.25-ROW/8 %AND %RETURN

==== ecsc04/wires.txt ====
BE41    #25LS2519

......

DC33    #25LS2539

......

CG17    #25LS2569

CG27    #25LS2569

DA41    #25LS2569

......

AA01    #2907 BUS REC/DRVR

AC01    #2907 BUS REC/DRVR

AE01    #2907 BUS REC/DRVR

==== ecsc04/cgpins.txt ====

A&07  GND
A&08  GND
A&09  GND
A&10  GND
A&11  GND
A&12  GND
A&13  GND
A&14  GND
A&16  GND
A&17  GND
A&18  GND
A&19  GND
A&20  GND
A&21  GND
A&22  GND
A&23  GND
A&30  BDAL15 L
A&31  BDAL14 L
A&32  BDAL13 L
A&33  BDAL12 L

==== ecsc04/ilaps_pla.txt ====
%include "ilap_inc"
%external %routine pla (%string (31) name,%integer ins,outs,feeds,prods,
  %integerarrayname and,or,%integername phi1y,phi2y, %integerarrayname inx,outx)
%integer infs,outfs    ;! ins & outs plus feeds
%routinespec define plain
%integer plainmaxy,plainphi1y,plainvddy,plaingndy, plax, play
%routinespec define plaout
%integer plaoutmaxy,plaoutphi2y,plaoutvddy,plaoutgndy
%routinespec define pdp (%string(11)%name name,%integer n)
%routinespec define pup (%string(11)%name name,%integer l)
%integer plapupmaxy
%integer plainxb,plainyb      ;! bases of input buffers
%integer plaoutxb,plaoutyb    ;! bases of output buffers
%integer andpdpyb    ;! y-base of and-plane poly/diff/poly lines
%integer orpdpxb     ;! x-base of or-plane poly/diff/poly lines
%integer orpupyb    ;! y-base of or-plane pull-up pairs
%integer eprods,eoutfs    ;! prods and outfs evened up
%string(11) andpdp,orpdp    ;! for poly/diff/poly symbol names
%string(11) andpup,orpup    ;! for pullup+metal symbol names
%constinteger extragnd=8
%externalstring(11)%fnspec itos(%integer n,m)

==== ecsc04/contactincs.txt ====
!******************************************************************************
! specs in same order as in perqimports file
%routine %spec subc (%integer x, y)
%routine %spec dm (%integer x,y)
%routine %spec pm (%integer x,y)
%routine %spec pdms (%integer x, y)
%routine %spec pdmn (%integer x, y)
%routine %spec pdmw (%integer x, y)
%routine %spec pdme (%integer x, y)
%routine %spec pdbns (%integer x, y)
%routine %spec pdbew (%integer x, y)
%routine %spec pdcn (%integer x, y)
%routine %spec pdcs (%integer x, y)
%routine %spec pdce (%integer x, y)
%routine %spec pdcw (%integer x, y)
%routine %spec pdbn (%integer x, y)
%routine %spec pdbs (%integer x, y)
%routine %spec pdbe (%integer x, y)
%routine %spec pdbw (%integer x, y)
!******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"

==== ecsc04/ilaps_inc.txt ====
! Declarations for using ILAP included.
%end %of %list

%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %routine %spec first cell number (%integer num)
%external %routine %spec set lambda (%real lambda)
%external %integer %map %spec buried contacts
%external %integer %map %spec ILAP control
%constant %integer       no warnings = 1
%constant %integer    monitor endsym = 2
%constant %integer        give times = 4
%constant %integer         merge cif = 8

==== ecsc04/results.txt ====

    USER BALLOT RESULTS
    ===================                     Votes Cast ( Rank in Column 

                                Medicine    Science     Social      Others      ERCC        Under-      Staff &     Overall
                               & Vet Med                Science                             grads        PGs

L1 : ADA                  :     11 (27)    127 (11)     18 (19)     33 (17)     81 (1)      55 (3)     215 (12)    270 (7) 
L2 : ALGOL 68             :     17 (20)     28 (34)      6 (33)      4 (40)     17 (29)      5 (28)     67 (37)     72 (36)
L3 : APL                  :     11 (28)     21 (38)      5 (34)     13 (35)     14 (31)      3 (34)     61 (38)     64 (38)
L4 : LISP                 :      1 (40)     32 (33)      6 (32)      1 (43)      2 (44)     13 (18)     29 (39)     42 (39)
L5 : UCSD PASCAL          :     35 (6)     134 (9)      31 (9)      59 (7)      35 (14)     36 (8)     258 (6)     294 (6) 
L6 : POP-2                :      0 (44)      5 (43)      0 (41)      7 (37)      6 (39)      2 (37)     16 (42)     18 (42)
L7 : PROLOG               :      0 (45)     15 (40)      0 (45)      3 (41)      4 (41)      5 (29)     17 (41)     22 (40)

S1 : BASIC                :     25 (10)     63 (23)     17 (21)     37 (13)      9 (36)     12 (21)    139 (23)    151 (23)
S2 : BCPL                 :      2 (36)      4 (44)      0 (40)      2 (42)      4 (42)      2 (35)     10 (44)     12 (43)
S3 : COBOL                :      2 (38)     28 (35)      3 (36)     28 (20)     25 (21)     17 (15)     69 (35)     86 (34)
S4 : LOGO                 :      1 (43)      6 (42)      0 (43)      0 (44)      0 (45)      4 (33)      3 (45)      7 (45)
S5 : PASCAL               :     17 (18)     96 (18)     39 (7)      36 (14)     22 (23)     37 (5)     173 (20)    210 (16)
S6 : SIMULA               :      2 (39)      7 (41)      0 (44)      0 (45)     11 (34)      1 (40)     19 (40)     20 (41)

==== ecsc04/arrays.txt ====
%end%of%list
    %const%byte%array tbox (0:63)=
           223,   139,   219,   138,   209,   128,   208,   128,
             1,   139,     1,   139,     0,   128,     0,   128,
             1,     0,     0,     0,     0,     0,     0,     0,
             1,   139,     1,   139,     0,   128,     0,   128,
             1,     0,     1,     0,   209,   128,   209,   128,
             0,     0,     0,     0,     0,   128,     0,   128,
             1,     0,     1,     0,   209,   128,   209,   128,
             1,   139,     1,   139,   209,   251,   209,   251
    %const%short%array fbox (0:8191)=
         -11809, -32629,      0,      0,      0,      0,      0,      0,
         -12031, -32768,      0,      0,      0,      0,      0,      0,
              1, -32629,      0,      0,      0,      0,      0,      0,
              0, -32768,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,
              0,      0,      0,      0,      0,      0,      0,      0,

==== ecsc04/serc.txt ====
 $A just=1;invert=0;dcpi=12;und='~';undsh='~';cap='~';capsh='~';line=84
 $a left=6;page=63
 $L1uM
Proposal for a Research Grant
 $l9m

"Investigations into an Environment for the
Design of Very Large Scale Integrated Circuits"


D. J. Rees
December 1981


 $L1U
Introduction
 $P
Integrated circuit fabrication technology now allows very large scale designs to
be manufactured. This is the so-called VLSI technology that has provided a
quantitative leap in complexity from LSI. Integrated circuits have recently been
announced that contain many tens of thousands of transistors and the next decade

==== ecsc04/impiocps.txt ====
module impiocp;

exports
imports stream from stream;
 procedure ioinit;
 procedure openin(s:integer;var filename:pathname);
 function instrm:integer;
 procedure closein(s:integer);
 procedure openout(s:integer;var filename:pathname);
 function outstrm:integer;
 procedure closeout(s:integer);
 function iocpp(ep,n,x:integer):integer;
 exception streamerror(s:integer);
 exception openerror(s:integer);
 exception closeerror(s:integer);
 exception eoferror(s:integer);
 exception iocperror(ep:integer);
private

const
 maxstreams=3;

==== ecsc04/plas.txt ====
!*******************************************************************************
%routine %spec pla (%string (31) name,%integer ins,outs,feeds,prods,
  %integerarrayname and,or,%integername phi1y,phi2y, %integerarrayname inx,outx)
!*******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"
%constant %string (2)             contact  ="C",  nc="C"
%constant %string (2)             buried   ="B",  nb="B"

%constant %integer true = 0,   false = 1

%external %string (2) %fn %spec  contacts
%external %routine %spec end symbol
%external %routine %spec symbol (%string (31) name)
%external %routine %spec box     %alias "ILAPBOX"     (%integer xl, yl, xu, yu)
%external %routine %spec polygon %alias "ILAPPOLYGON" (%real x, y)
%external %routine %spec wirex   (%integer x, y, l)
%external %routine %spec wirey   (%integer x, y, l)

==== ecsc04/ilaps_noca.txt ====
%external %routine analyse circuit (%integer a, b, c)
   select output (0)
   print string ("No Circuit analysis available at present")
   newline
   %stop
%end

%end %of %file

==== ecsc04/one.txt ====
$A MARK=1
$A PAGENO=12


$A LEFT=0; LINE=69; PAGE=57
$A TOP=4; BOTTOM=9
$A NLS=2
$A TAB=1,7,13,19,25
$A TAB=4,7,10,13,16,19
$B5
$L1 CM
CHAPTER 1
$B5
$L1 CM
THE SYNCHRONISATION PROBLEM.
$N
$L1 C
1.0.- INTRODUCTION.
$P3
@THE PURPOSE OF THIS CHAPTER IS TO ANALIZE THE INTRICACIES ARISING
IN THE DESIGN AND IMPLEMENTATION OF FREELY AVAILABLE @INTER-PROCESS

==== ecsc04/qlformats.txt ====
!* l2fm - code offset became rt 25/mar/82
!------------------------------------------------
!    PERQ OBJECT  RECORD FORMATS
!----------------------------------------------

!                          RED TAPE AT START OF CODE SEGMENT

%RECORDFORMAT CHFM (%HALFINTEGER DICT,RTS,LDATA,MAP)
%RECORD(CHFM) %NAME CH

!                         LDATA LISTHEADS

%HALFINTEGERARRAYFORMAT LDATAFM(0:10)
%HALFINTEGERARRAYNAME LDATA



!                    PROCEDURE ENTRY POINT

%RECORDFORMAT L1FM (%HALFINTEGER LINK,PROPS,RTNO,DIAGDISP,%STRING(31) NAME)


==== ecsc04/app.txt ====

$L1 CM
APPENDIX 1
$B5
$L1 C
A HIGHLY CONCURRENT SHEDULING ALGORITHM.
$P3
@AS MENTIONED IN SECTION 4.2, THE STATUS MARK OF A PROCESS IS
INTERPRETED AS:
$A INDENT=2
.PROCESS$_STATUS = 1 MEANS 'READY'
$B0
.PROCESS$_STATUS = 0 MEANS 'RUNNING'
$A INDENT=0
@FURTHER VALUES OF THE STATUS MARK AND THEIR INTERPRETATION ARE GIVEN
IN THE SEQUEL.
$P
@IN THE FOLLOWING, WE EMPLOY THE NOTATION:
$A INDENT=2
.ITS S,LABEL $C+3 [S=S-1 ; %IF S<0 %THEN -> LABEL]
$B0

==== ecsc04/asst11g.txt ====



%EXTERNALROUTINE ASS11(%STRING (63)FILES)
      %DYNAMICINTEGERFNSPEC TIME40(%INTEGER IN)
      %DYNAMICINTEGERFNSPEC TIME03(%INTEGER IN)
      %EXTERNALINTEGERFNSPEC SMADDR(%INTEGER CHAN, %INTEGERNAME LENGTH)
      %EXTERNALROUTINESPEC DEFINE(%STRING (63)S)
      %DYNAMICSTRING (8) %FN %SPEC DATE
      %EXTERNALROUTINESPEC DUMP BIN(%HALFINTEGERARRAYNAME CODE, %C
        %INTEGER START, FINISH, %STRINGNAME T, %INTEGERNAME FLAG)
      !!
      %INTEGERFNSPEC BREAK UP(%BYTEINTEGERARRAYNAME LNE)
      %ROUTINESPEC OCTAL(%INTEGER N)
      %ROUTINESPEC CODE
      %INTEGERFNSPEC AN OPND(%INTEGER TYPE, %STRING (80)OPND)
      %ROUTINESPEC SET DEF(%INTEGER DEF, OPN)
      %ROUTINESPEC USER DEF(%STRINGNAME OPND)
      %ROUTINESPEC LIST LINE(%INTEGER LEN)
      %INTEGERFNSPEC TEST REG(%STRING (80)REG)
      %INTEGERFNSPEC VALUE(%STRINGNAME OPND)

==== ecsc04/pmons.txt ====

%EXTERNALROUTINE PMONENABLE(%STRING(63) S)
%EXTERNALINTEGERFNSPEC DMONENABLE(%STRING(11) FILE,%INTEGER KB)
%STRING(11) FILE
%INTEGER KB
  S->FILE.(",").S
  KB=0
  %UNTIL S="" %THEN KB=10*KB+CHARNO(S,1)-'0' %AND %C
    S->(FROMSTRING(S,1,1)).S
  WRITE(DMONENABLE(FILE,KB),1)
%END
!-----------------------------------------------------------------------
%EXTERNALROUTINE PMONDISABLE(%STRING(255) S)
%EXTERNALROUTINESPEC DMONDISABLE
  DMONDISABLE
%END
!-----------------------------------------------------------------------
%EXTERNALROUTINE PMONON(%STRING(255) S)
%EXTERNALROUTINESPEC DMONON
  DMONON
%END

==== ecsc04/start.txt ====
SETMODE V=ON

==== ecsc04/places.txt ====
!******************************************************************
! spec for external routine in this file
%recordformat connf(%integer type,side,c,w,%string(4) layer)
%routine %spec place pads ( %string(31) chipname ,cellname,
                    %record(connf)%array %name ports, %integer n )
!******************************************************************
!-----------------------------------------------------------------!
!                                                                 !
! PLACE PADS: an ILAP routine to distribute pads around a design. !
!                                                                 !
! George A. McCaskill                 26th August    1982         !
!        ""                Revised:   10th September 1982         !
!        ""                Revisited: 22nd September 1982         !
!-----------------------------------------------------------------!

!*********************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"
%constant %string (2) green ="D", diffusion="D",  nd="D"
%constant %string (2) red   ="P", poly     ="P",  np="P"
%constant %string (2)             implant  ="I",  ni="I"
%constant %string (2)             glass    ="G",  ng="G"

==== ecsc04/ilapcomp.txt ====
perqimp ilap4s,ilap4,ilap4l
perqimp contacts,contact,contactl
perqimp plas,pla,plal
perqimp stacks,stack,stackl
perqimp routes,route,routel
perqimp pads,pad,padl
perqimp annotates,annotate,annotatel
perqimp utils,util,utill
perqimp impiocpis,impiocpi,impiocpil
perqimp imprealfns,imprealfn,imprealfnl
perqimp drcs,drc,drcl
perqimp places,place,placel
perqimp stables,stable,stablel
perqimp pcompats,pcompat,pcompatl
perqimp xplas,xpla,xplal

==== ecsc04/bib.txt ====
$A JUST=0
$A NLS=1; SGAP=1
$A PAGENO=0; TAB=1,10; INDENT=2
$L1 CM
BIBLIOGRAPHY.
$B5

$C-9 [@BE74] @BELPAIRE , .G. @WILMOTTE , .J. .P.
$B0
.'A SEMANTIC APPROACH TO THE THEORY OF PARALLEL PROCESSES.',
@PROC. @INTERNATIONAL @COMPUTING @SYMP., 1973, @DAVOS, @NORTH
@HOLLAND @PUB. @CO., @JAN. 1974.
$B1 $C-9 [@BE74] @BELPAIRE , .G. @WILMOTTE , .J. .P.
$B0
'@AN IMPLEMENTATION OF THE @D-OPERATIONS.', @SEMINAIRE .IRIA,
STRUCTURE ET PROGRAMMATION DES CALCULATEURS, 1974, PP.
13-17.
$B1
$C-9 [@BL67] @BLACKNEY , .G. .R. @CUDNEY , .L. .F. @EICKHOLM , .C. .R.
$B0
' .IBM 9020 MULTIPROCESSOR SYSTEM.', .IBM @SYSTEMS @JOURNAL,

==== ecsc04/skimpps.txt ====


B<NAME>=1
B<CNST>=2

P<SS>=  <UI><SEP>,
        '%IF'<SC><COND>'%THEN'<UI><ELSE><SEP>,
        <CNST>':'<SS>,
        '%FINISH'<ELSE><SEP>,
        '%INTEGER'<ARR><SEP>,
        <RT><SPEC><NAME><FPP><SEP>,
        '%END'<SEP>,
        '%BEGIN'<SEP>,
        '%ENDOFPROGRAM'<SEP>,
        <SEP>;

P<UI>=  <NAME><APP><ASS>,
        '->'<CNST>,
        '%START',
        '%RETURN',
        '%RESULT='<+-\><OPD><EXPR>,

==== ecsc04/nocas.txt ====
%external %routine analyse circuit (%integer a, b, c)
   select output (0)
   print string ("No Circuit analysis available at present")
   newline
   %stop
%end

%end %of %file

==== ecsc04/m68decs.txt ====
%CONSTBYTEINTEGERARRAY HASHLINK(0: 58)= %C
   2, 0, 5, 8, 10, 11, 12, 15, 0, 17, 21, 23, 26, 30, 32, 36,
   0, 38, 41, 0, 42, 46, 50, 52, 53, 55, 57, 58, 0, 0, 60, 0,
   62, 66, 69, 73, 76, 0, 77, 0, 79, 82, 85, 88, 0, 0, 0, 91,
   92, 93, 95, 97, 100, 0, 102, 107, 110, 111, 113
%CONSTSTRING(4)%ARRAY INSTR(1:113)= %C
  "PULB","BVS","BHI","SBA","DECA","DECB","CLRA","BLE","DES",
  "CLRB","ANDA","ANDB","NOP","TAB","ORG","DEX","BITA","TPA","BSR",
  "TSTA","BITB","TSTB","FDB","SEV","INS","INCA","PSHA","JMP","INCB",
  "STS","LSRA","PSHB","LSRB","BPL","WAI","NEG","INX","BLS","STX",
  "TST","BLT","COM","NEGA","TAP","CLC","BEQ","TSX","TBA","SBCA",
  "NEGB","BMI","SBCB","ROL","RORA","ADCA","RORB","ADCB","CLI","LDS",
  "ROR","SUBA","LDAA","LSR","ORAA","SUBB","LDAB","BCC","ASRA","ORAB",
  "ASRB","END","BNE","LDX","CBA","CLR","BRA","TXS","DAA","CLV",
  "BGE","EQU","ADDA","COMA","ADDB","RTI","BVC","ASL","COMB","CPX",
  "ROLA","DEC","ROLB","ASR","BCS","CMPA","SWI","CMPB","SEC","RTS",
  "JSR","EORA","FCB","EORB","FCC","INC","ABA","STAA","ASLA","BGT",
  "STAB","ASLB","SEI","PULA"
%CONSTBYTEINTEGERARRAY ICODE(1:113)= %C
  X'33',X'29',X'22',X'10',X'4A',X'5A',X'4F',X'2F',X'34',
  X'5F',X'84',X'C4',X'01',X'16',X'00',X'09',X'85',X'07',X'8D',

==== ecsc04/sup23al.txt ====
LINK
ECSC04.SUP23A
ECSC04.SEMA02Z
ERCC07.COM18Z
ERCC07.FAST13Z
ERCC07.PPROF01Y
ERCC07.OPER14Z
ERCS04.DPRINT21Z
ERCS04.TAPE58Z
ERCC35.GPC6Y
ERCC07.NDIAG06Z
ERCC20.COMMS24Z
.END
SUP23AZ
SUPFIX SUP23AZ,SUP23AT

==== ecsc04/cgplaces.txt ====

A&07    #CONNECTOR/16
A&0701  GND
A&0702  GND
A&0703  GND
A&0704  GND
A&0705  GND
A&0706  GND
A&0707  GND
A&0708  GND
A&0709  BDAL8 L
A&0710  BDAL9 L
A&0711  BDAL10 L
A&0712  BDAL11 L
A&0713  BDAL12 L
A&0714  BDAL13 L
A&0715  BDAL14 L
A&0716  BDAL15 L

A&16    #CONNECTOR/16
A&1601  GND

==== ecsc04/sup23as.txt ====

%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="23A"
!-----------------------------------------------------------------------
! STORE CONFIGURATION & EPAGE SIZE DECLARATIONS
! AMENDED 24/02/78  "SMACS","TRANS" & "KMON" INCLUDED
! COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18A ONWARDS 
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,KLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SPDRQ,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,  %C
         %INTEGERARRAY SP(0:15), %INTEGER  %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,S1,S2,S3,S4,END)
%RECORDNAME COM(COMF)

==== ecsc04/cgposns.txt ====
ADR MAP TO DTB L/ 3
BA38     13.2    1.2
AE20     14.7    3.0
AC20     15.3    3.0

ADS1/ 3
AA22     15.9    2.8
AC19     15.3    3.1
AE19     14.7    3.1

ADS2/ 3
AF20     14.4    3.0
AD20     15.0    3.0
AA25     15.9    2.5

ADS3/ 3
AB26     15.6    2.4
AD21     15.0    2.9
AF21     14.4    2.9

ADS4/ 3

==== ecsc04/ocgplaces.txt ====

A&07    #CONNECTOR/16
A&0701  GND
A&0702  GND
A&0703  GND
A&0704  GND
A&0705  GND
A&0706  GND
A&0707  GND
A&0708  GND
A&0709  BDAL8 L
A&0710  BDAL9 L
A&0711  BDAL10 L
A&0712  BDAL11 L
A&0713  BDAL12 L
A&0714  BDAL13 L
A&0715  BDAL14 L
A&0716  BDAL15 L

A&16    #CONNECTOR/16
A&1601  GND

==== ecsc04/ilaps_annotate.txt ====
! ILAP routines for annotation

! System specifics (for 4 lines)
%const %string (1) SNL = "
"
%external %string (63) %fn %spec ITOS (%integer N, P)
%external %integer %fn %spec OUT STREAM

%include "ilap_inc"

%external %routine %spec warn %alias "ILAPWARNING" (%string(225) ST)
%external %routine %spec update bb %alias "ILAPUPDATEMBB" (%integer xl, yb, xr, yt)
%const %integer no drc = 7

%external %routine crest (%integer bwidth, bheight)
   %const %integer swidth = 34
   %const %integer sheight = 43
   %const %integer cy = 24 {extent of crest in -ve y direction}
   %integer widthscale, heightscale, s, a, b
   %integer x, y {origin of crest in box)
   %integer i, old control

==== ecsc04/proms.txt ====

                                  288 PROM SPECIFICATION


                                         AD                            DO

                                 E   D   C   B   A       8   7   6   5   4   3   2   1
                               (14)(13)(12)(11)(10)     (9) (7) (6) (5) (4) (3) (2) (1)

                                 0   0   0   0   0

                                 0   0   0   0   1

                                 0   0   0   1   0

                                 0   0   0   1   1

                                 0   0   1   0   0

                                 0   0   1   0   1


==== ecsc04/load11s.txt ====

%EXTERNALROUTINE LOAD(%STRING(63) S)
%INTEGER CHS,I,J,K,L
%ROUTINE PB(%INTEGER B)
  CHS=CHS+B
  PRINTCH(B&15+'A')
  PRINTCH(B>>4&15+'A')
%END
%ROUTINE PW(%INTEGER W)
  PB(W&255)
  PB(W>>8&255)
%END
  PRINTCH(1)
  CHS=0
  PW(LENGTH(S))
  READ(I)    ;! LOAD ADDRESS
  PW(I)
  READ(I)    ;! START ADDRESS
  PW(I)
  %CYCLE I=1,1,LENGTH(S)
    PB(CHARNO(S,I))

==== ecsc04/mtest.txt ====

DESTROY MON1,MOND1
PMONENABLE MON1,64
PMONON
EDIT TESTS
D*I/
%BEGIN
%ROUTINE HANOI(%INTEGER N,I,J)
%IF N>0 %THEN %START
HANOI(N-1,I,6-I-J)
WRITE(I,1)
PRINT STRING(" ??")
WRITE(J,1)
HANOI(N-1,6-I-J,J)
%FINISH
%END
HANOI(4,1,2
%ENDOFPROGRAM
/
T
M/??/R2I/->/

==== ecsc04/imcforms.txt ====

%EXTERNALROUTINE FORMAT(%STRING(63) PAR)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%STRING(63) S1,S2
%INTEGER I,J
%UNLESS PAR->S1.(',').S2 %THEN S1=PAR %AND S2=''
%IF S1='' %THEN S1='.TT'
%IF S2='' %THEN S2='SS#IMCS'
DEFINE('STREAM01,'.S1)
SELECT INPUT(1)
DEFINE('STREAM02,'.S2)
SELECT OUTPUT(2)
%CYCLE
 READ CH(I)
 %IF I=25 %THEN %STOP
 %IF I#NL %THEN %START
  PRINT SYMBOL(I)
  %IF I=' ' %OR 'A'<=I<='Z' %THEN %START
   J=0
   %IF I#' ' %THEN %START
    READ SYMBOL(I) %AND PRINT SYMBOL(I) %AND J=J+1 %UNTIL I=' ' %OR I=NL

==== ecsc04/rcc2007s.txt ====

!
! ERCC DOUBLE HEIGHT BOARD 2000/00/07
! %BOARDDEF RCC2007(%CHIPARRAY IC16(1:7/'ABCDXFG',1:8), &
!  %CHIPARRAY IC40(5:5/'E',1:5), &
!  %EDGEARRAY A1,A2,B1,B2(1:18/'ABCDEFHJKLMNPRSTUV')
!
%EXTERNALREALFN DISTANCE(%STRING(8) NAM1,%INTEGER COL1,ROW1,PIN1, %C
  NOP1,%REAL X1,Y1,%STRING(8) NAM2,%INTEGER COL2,ROW2,PIN2,NOP2, %C
  %REAL X2,Y2)
%RESULT=SQRT((X1-X2)**2+(Y1-Y2)**2)
%END
%EXTERNALROUTINE POSITION(%STRING(8) NAM,%INTEGER COL,ROW,PIN,NOP, %C
  %REALNAME X,Y)
%CONSTREALARRAY IC16Y(1:7)=-1.1,-2.0,-3.1,-4.0,1,-5.1,-6.1
%CONSTREALARRAY ABCDX(1:8)=4.75,4.15,3.55,2.95,2.35,1.75,1.15,0.55
%CONSTREALARRAY EFX(1:4)=4.15,3.25,2.35,1.45
%CONSTREALARRAY ABY(1:18)=-0.25,0,-0.25,0,-0.25,0,-0.25,0,-0.25,0,-0.25,
  0,-0.25,0,-0.25,0,-0.25,0
%CONSTREALARRAY ABX(1:18)=2.25,2.0(2),1.75(2),1.5(2),1.25(2),1.0(2),
  0.75(2),0.5(2),0.25(2),0

==== ecsc04/mond100.txt ====

8269E1027R8255E8448R8456W8455W8303R14592R2048R769R523E576R1028R4152R8263E11264W8264E8299R8257E8304R8462R
8261E1028W8303R8462R8450R8304R8299R
8261E1028W8303R8463R8450R8304R8464R
8261E1028W8303R8464R8304R8450R8299R
8261E1028W8303R8465R8304R8450R
8261E1028W8303R8466R8304R8450R8299R
8261E1028R8304R8303R8467R8450R8468R8299R
8261E8303R8469R1028R8304R8450R
8261E1028R8304R8303R8470R8450R8299R
8261E1028W8303R8471R8304R8450R8299R8472R
8261E1028W8303R8472R8450R8304R
8261E1028R8304R8303R8473R8450R
8261E1028R8474R8450R8304R8303R
8261E1028R8304R8303R8475R8450R8476R8299R8268E1027R8455W8254E
8254E8449R1027W8208E8205E1028R8457R8299R8301R2048R769R543E544E523E576R575R4152R773R525E
573E1028R525E768R773R576R4152R544E523E8204E1027W8254E8449R8456R8299E2048R543E
544E576R1028R768R525E573E773R4152R1027W523E8204E8448R8254E8303R8208E8458R9728R8330R8299E
8299E1028R1027R8254E8303R8449R8205E8458R9728R8330R
8254E1027R8299E1028W8303R8449R8205E8458R9728R8330R8209E
8206E1028R8449R8330R8457R8303R8208E8254E1027R8299E

==== ecsc04/rcc2008s.txt ====

!
! ERCC QUAD HEIGHT BOARD 2000/00/08
! %BOARDDEF RCC2008(%CHIPARRAY IC16(1:7/'ABCDXFG',1:16), &
!  %CHIPARRAY IC40(5:5/'E',1:11), &
!  %EDGEARRAY A1,A2,B1,B2,C1,C2,D1,D2(1:18/'ABCDEFHJKLMNPRSTUV')
!
%EXTERNALREALFN DISTANCE(%STRING(8) NAM1,%INTEGER COL1,ROW1,PIN1, %C
  NOP1,%REAL X1,Y1,%STRING(8) NAM2,%INTEGER COL2,ROW2,PIN2,NOP2, %C
  %REAL X2,Y2)
%RESULT=SQRT((X1-X2)**2+(Y1-Y2)**2)
%END
%EXTERNALROUTINE POSITION(%STRING(8) NAM,%INTEGER COL,ROW,PIN,NOP, %C
  %REALNAME X,Y)
%CONSTREALARRAY IC16Y(1:7)=-1.1,-2.0,-3.1,-4.0,1,-5.1,-6.1
%CONSTREALARRAY ABCDX(1:16)=10.025,9.425,8.825,8.225,7.625,7.025,
  6.425,5.825,4.725,4.125,3.525,2.925,2.325,1.725,1.125,0.525
%CONSTREALARRAY EFX(1:8)=9.425,8.525,7.625,6.725,4.125,3.225,2.325,1.425
%CONSTREALARRAY ABY(1:18)=-0.25,0,-0.25,0,-0.25,0,-0.25,0,-0.25,0,-0.25,
  0,-0.25,0,-0.25,0,-0.25,0
%CONSTREALARRAY ABX(1:18)=2.25,2.0(2),1.75(2),1.5(2),1.25(2),1.0(2),

==== ecsc04/idistas.txt ====
%EXTERNALREALFN DISTANCE(%STRING(8) NAM1,%INTEGER R1,C1,P1,PINS1, %C
  %REAL X1,Y1,%STRING(8) NAM2,%INTEGER R2,C2,P2,PINS2,%REAL X2,Y2)
%INTEGER W
%IF NAM1=NAM2='C' %AND C1=C2 %THEN %START
 %IF P1<=8 %AND P2<=8 %THEN %START
  %IF R1=R2 %THEN %RESULT=!P1-P2!*0.1
  %IF P1+P2<=9 %THEN %RESULT=(P1+P2)*0.1+0.4+!R1-R2!*1.1
  %RESULT=2.2-(P1+P2)*0.1+!R1-R2!*1.1
 %FINISH
 %IF P1>8 %AND P2>8 %THEN %START
  %IF R1=R2 %THEN %RESULT=!P1-P2!*0.1
  %IF P1+P2<=25 %THEN %RESULT=(P1+P2)*0.1-1.2+!R1-R2!*1.1
  %RESULT=3.8-(P1+P2)*0.1+!R1-R2!*1.1
 %FINISH
 %IF P2<P1 %THEN %START
  W=P1
  P1=P2
  P2=W
  W=R1
  R1=R2
  R2=W

==== ecsc04/cv79s.txt ====
<personal information redacted>
$



                          Curriculum Vitae

                          David James Rees

                   Department of Computer Science

Career : 1963-65 : Research student, Computer Unit, University of
                   Edinburgh.
         1965-66 : Assistant Lecturer, Computer Unit, University of
                   Edinburgh.
         1966-   : Lecturer, Department of Computer Science, University
                   of Edinburgh.
         1966-70 : Team Leader, Edinburgh Multi-Access Project.
         1972-73 : Assistant Professor, Department of Computer Sciences,
                   University of Wisconsin, USA.


==== ecsc04/cgsignals.txt ====

BE33    #1K PULLUPS/16

BA41    #25LS2519 QUAD FF/20

DA33    #25LS2539 DUAL DEMUX/20

CA41    #25LS2569 UPDOWN CTR/20
CC41    #25LS2569 UPDOWN CTR/20
CE41    #25LS2569 UPDOWN CTR/20
CG27    #25LS2569 UPDOWN CTR/20

AA01    #2907 BUS TRANS/20
AC01    #2907 BUS TRANS/20
AE01    #2907 BUS TRANS/20
AG01    #2907 BUS TRANS/20

AC19    #29701 RAM/16
AE19    #29701 RAM/16
CA09    #29701 RAM/16
CC09    #29701 RAM/16

==== ecsc04/zero.txt ====

$B5
$L1 CM
CHAPTER 0
$B5
$L1 CM
INTRODUCTION.
$N
$P
@THE HARDWARE OF A COMPUTER SYSTEM MUST BE CAPABLE OF ACCESSING AND
TRANSFORMING THE TOTALITY OF INFORMATION STORED IN ALL OF THE
SYSTEM'S PHYSICAL DEVICES. @THIS IS THE BASIC PROPERTY WHICH GIVES
COMPUTERS THEIR ENORMOUS FLEXIBILITY. @HOWEVER, THIS UNBOUNDED
FREEDOM HAS TO BE RESTRAINED IF IT IS DESIRED TO SUPPORT THE SHARING
OF THE INFORMATION BY VARIOUS USERS. @THE APPARATUS THAT LIMIT
THIS FREEDOM ARE KNOWN AS PROTECTION MECHANISMS.
$P
@THE ORIGINAL MOTIVATION OF PROTECTION MECHANISMS WAS TO DEFEND THE
OPERATING SYSTEM FROM HARMFUL INTERFERENCE BY INCORRECT OR MALICIOUS
USER PROGRAMS. @PRIVILEGED/USER MODES ARE SUFFICIENT TO ACHIEVE THIS
SIMPLE FORM OF PROTECTION. @THE ADDRESS SPACE OF A PROGRAM EXECUTED

==== ecsc04/ilaps_ilaputil.txt ====
! Some machine specific utilities for ILAP

%external %integer %fn %spec out stream

! A monitoring routine for ILAP, which uses system dependent timings -

%external %routine ILAP monitor (%string (255) S)
   %integer I
   I = out stream
   select output (0)
   print string ("Monitor:  CPU =?")
!   print (deltacpu/1000,1,2)
!   print string ("s  PF =")
!   write (delta page,2)
   space;   space
   print string (s)
   newline
%end

%external %byte %integer %fn default technology
   %result = 'N'

==== ecsc04/cgs.txt ====

!-----------------------------------------------------------------------
%EXTERNALROUTINE SORTPL(%STRING(63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%ROUTINESPEC SQS(%INTEGER FROM,TO)
%RECORDFORMAT PSF(%STRING(7) P,%STRING(23) S)
%RECORDARRAY PS(1:3000)(PSF)
%STRING(31) IN,OUT,T,U
%INTEGER I,PSN
  S->IN.(",").OUT
  DEFINE("STREAM01,".IN)
  SELECT INPUT(1)
  %CYCLE I=1,1,3000
    READ ITEM(T) %UNTIL "A"<=T<="Z"
    ->SORT %IF T="Z"    ;! END MARKER
    READ ITEM(U) %AND T=T.U %UNTIL NEXT ITEM=" "
    PS(I)_P=T
    READ ITEM(T) %UNTIL T#" "
    READ ITEM(U) %AND T=T.U %UNTIL NEXT ITEM="
"
    PS(I)_S=T

==== ecsc04/iskimps.txt ====

%EXTERNALROUTINE ISKIMP(%STRING(63) S)
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC FAULT(%STRING(63) S)
%INTEGERFNSPEC CHNEXT
%INTEGERFNSPEC NEWCELL
%INTEGERFNSPEC RETURN CELL(%INTEGER I)
%ROUTINESPEC PRINT NAME(%INTEGER I)
%ROUTINESPEC PHEX(%INTEGER I,J)
%INTEGER I,J,AP,APP,TP,ASL,BTN,CHP,FAULTS,NL,LEVEL,CA,COMP,SCF,PARS
%INTEGER LOPR,ASSOPP,LSTPP
%OWNSHORTINTEGERARRAY PS(-1000:-573)=%C
   -997,-910,-855,-984, 201, 198,-775,-761, 212, 200, 197, 206,
   -910,-863,-872,-855,-980,   2,  58,-1000,-971, 198, 201, 206,
    201, 211, 200,-872,-855,-961, 201, 206, 212, 197, 199, 197,
    210,-717,-855,-955,-673,-654,   1,-647,-855,-950, 197, 206,
    196,-855,-943, 194, 197, 199, 201, 206,-855,-929, 197, 206,
    196, 207, 198, 208, 210, 207, 199, 210, 193, 205,-855,-924,
     42,   3,-599,-855,-918,  42,-841,   2,-578,-855,-913,  42,

==== ecsc04/imprealfns.txt ====
!***************************************************************************
! specs for fns in this file IMPREALFN
%realfnspec isqrt(%real x)
%realfnspec itan(%real x)
%realfnspec icos(%real x)
%realfnspec isin(%real x)
%realfnspec iarctan(%real x,y)
%realfnspec iarccos(%real x)
%realfnspec iarcsin(%real x)
!***************************************************************************

%external %real %fn isqrt (%real x)
%externalrealfnspec f77sqrt(%realname x,%integername dum)
%integer d
  d=0
  %result=f77sqrt(x,d)
%end

%external %real %fn itan (%real x)
%externalrealfnspec f77tan(%realname x,%integername dum)
%integer d

==== ecsc04/splps.txt ====

P<SS>='X'<INDX>'='<EXPR>'
','->'<N><IF>'
',<N>':'<SS>,'!','E
';
P<INDX>='('<EXPR>')',<N>;
P<EXPR>=<OPD><REXP>;
P<OPD>='X'<INDX>,<N>;
P<N>=<DIG><RDIG>;
P<RDIG>=<DIG><RDIG>,;
P<REXP>=<OP><OPD>,;
P<OP>='+','-','*','/';
P<IF>='IF'<OPD><COMP><OPD>,;
P<COMP>='=','#','>=','>','<=','<';
E

==== ecsc04/sup22wl.txt ====
LINK
ECSC04.SUP22W
ECSC04.SEMA01Z
ERCC07.COM16Z
ERCC07.FAST11Z
ERCC07.PPROF01Y
ECSC17.OPER13Z
ERCS04.DPRINT19Z
ERCS04.TAPE58Z
ERCC35.GPC6Y
ERCC07.NDIAG05Z
ERCC20.COMMS24Z
.END
SUP22WZ
SUPFIX SUP22WZ,SUP22WT

==== ecsc04/imcasss.txt ====

%EXTERNALROUTINE ASSEMBLE(%STRING(63) PAR)
%ROUTINESPEC RLINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS1
%ROUTINESPEC SS2
%ROUTINESPEC FAULT(%STRING(63) MESS)
%ROUTINESPEC PHEX(%INTEGER VAL)
%ROUTINESPEC PLINE
%ROUTINESPEC QSORT(%INTEGER A,B)
%STRING(63)%FNSPEC STRSP(%INTEGER N)
%SHORTINTEGERARRAY A(1:100)
%BYTEINTEGERARRAY T(1:100)
%RECORDFORMAT SYMFORM(%STRING(6) CH,%BYTEINTEGER FLAG,%SHORTINTEGER VAL)
%RECORDARRAY SYM(0:511)(SYMFORM)
%SHORTINTEGERARRAYFORMAT RAMF(0:2047)
%SHORTINTEGERARRAYNAME RAM
%SHORTINTEGERARRAYFORMAT DRAMF(0:255)
%SHORTINTEGERARRAYNAME DRAM
%INTEGER AP,TP,TPMAX,I,J,SYMP,FAULTS,RAMADDR,FLAG
%SHORTINTEGER CA

==== ecsc04/sup22ws.txt ====

%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="22F"
!-----------------------------------------------------------------------
! STORE CONFIGURATION & EPAGE SIZE DECLARATIONS
! AMENDED 24/02/78  "SMACS","TRANS" & "KMON" INCLUDED
! COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 13A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,SECSFMN,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,NPROCS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SP1,SP2,SP3,SP4,SP5,SP6,SP7,SP8,SP9,  %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,SPISAS1,SPISAS2,SPISAS3,SPISAS4,END)
%RECORDNAME COM(COMF)
  COM==RECORD(X'80000000'+48<<18)
%CONSTINTEGER VIRTAD=X'81000000'
%CONSTINTEGER MAXPROCS=64

==== ecsc04/imcps.txt ====

B<NAME>=1
B<CNST>=2
B<SPS> =3
P<SS1> =<SPS><IN1>,
        <NAME><SPS><LIN1>;
P<SS2> =<SPS><IN2><SEP>,
        <NAME><SPS><LIN2><SEP>;
P<SS3> =<NAME><PRIV><SEP>,
        '0'<REP><SEP>;
P<IN1> =<MOP1>,'ORG'<SPS><VAL><SEP>,'END';
P<LIN1>=<MOP1>,'EQU'<SPS><VAL><SEP>;
P<MOP1>='D ','C ','T ','B ','L ',<I>' ','DC ';
P<IN2>=<MOP2>,'ORG'<SPS><VAL>,'END';
P<LIN2>=<MOP2>,'EQU'<SPS><VAL>;
P<MOP2>='D'<SPS><DF><DFS>,
        'C'<SPS><CF><CFS>,
        'T'<SPS><TF><TFS>,
        'B'<SPS><COND>','<VAL>,
        'L'<SPS><RL>,
        <I><SPS><ID>','<RI>,

==== ecsc04/dcapdoc.html ====
<HTML><HEAD></HEAD><BODY><PRE>
<HR>



               <EM>DCAP : David's Circuit Assignment Program</EM>



   DCAP provides a method of description of circuits, the assignment  of
functional  elements  to  integrated  circuit  chips and their layout on
circuit  boards.   It  creates  data  structures  corresponding  to  the
descriptions  in  a  file which can then be used for further processing.
At the present state of development of  the  system,  this  consists  of
producing  a  wire-wrap schedule for the circuit but it is also intended
that it should be used for other stages in the design  and  construction
process  such  as  printed  circuit  board design, production of circuit
schematics by plotter etc.

   Rather than use a description of the circuit in terms  of  functional
relationships  between  signals,  DCAP  works  in  terms  of  functional

==== ecsc04/sup22l.txt ====
LINK
ECSC04.SUP22
ECSC04.SEMA01Z
ERCC07.COM16Z
ERCC07.FAST11Z
ERCC07.PPROF01Y
ECSC17.OPER13Z
ERCS04.DPRINT19Z
ERCS04.TAPE58Z
ERCC35.GPC6Y
ERCC07.NDIAG05Z
ERCC20.COMMS24Z
.END
SUP22Z
SUPFIX SUP22Z,SUP22T

==== ecsc04/memo.txt ====
Alterations to Ilap4s :
    remove output extension #cif
    cif stream = 1 instead of 3
    insert "impiospecs" instead of existing ones
    add ".cif" if necessary
    max boxes = 1000 instead of 2000
    all %halfs to %shorts
    %fn extend only for EMAS [ omit first line ]
    prefix "ilap4incs" with all %specs in right order
    fix Version string
    remove %routinespecs dump comment to c width since already spec-ed
    date & time to timestamp
    lambda & setlambda in 100ths of a micron - all inc files specs updated
    SET DEFAULT GOES OUT
    outfilename goes out
    change default widths sheet

Alterations to utils :
    date & time to timestamp
    no set default any longer
    no outfilename

==== ecsc04/sup22s.txt ====

%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="22F"
!-----------------------------------------------------------------------
! STORE CONFIGURATION & EPAGE SIZE DECLARATIONS
! AMENDED 24/02/78  "SMACS","TRANS" & "KMON" INCLUDED
! COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 13A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,SECSFMN,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,NPROCS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SP1,SP2,SP3,SP4,SP5,SP6,SP7,SP8,SP9,  %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,SPISAS1,SPISAS2,SPISAS3,SPISAS4,END)
%RECORDNAME COM(COMF)
  COM==RECORD(X'80000000'+48<<18)
%CONSTINTEGER VIRTAD=X'81000000'
%CONSTINTEGER MAXPROCS=64

==== ecsc04/utils.txt ====
!***********************************************************************
! specs in same order as in perqimports file
%routine %spec ILAP monitor (%string (255) S)
%byte %integer %fn %spec default technology
%string (63) %fn %spec itos (%integer n, p)
%routine %spec write (%integer n, p)
%string(127)%fn %spec rtos(%real num,%integer pl,dp)
%routine %spec print(%real num,%integer pl,dp)
%integerfn %spec stoi(%string(63) s)
%integer %fn %spec REM (%integer A, B)
%routine %spec prompt(%string(63) s)
%string (15) %fn %spec timestamp
%real %fn %spec frac pt (%real r)
%routine %spec read (%integer addr, type)
%string (255) %fn %spec sub string (%string (255) st, %integer a, b)
%integerfnspec getvm(%integername size,adr)
%integerfnspec freevm(%integername size,adr)
!***********************************************************************
%externalintegerfnspec outstream
%externalroutinespec dateandtime(%integer timeref)
%externalroutinespec newseg(%shortintegername seg,%shortinteger fsize,finc,fmax)

==== ecsc04/ilaps_stack.txt ====
%include "ilap_inc"
%externalroutine stack(%string(31) name,%integer bits,words,
  %integername controlx,controly,pushcony,popcony,
  phi1x,phi2x,phi3x,phi4x,%integerarrayname pushy,popy)
%routinespec stackcellcon(%integer offset)
%routinespec controlcon
%routinespec positioncell(%string(13) cell,ground,
                          %integer cellypitch,cellxpitch,gndypitch,
                          %integer %name xcur,ycur)
%integer stackcellxpitch,stackcellypitch,conypitch,stackcellgndypitch
%integer i,j,curx,cury,stackcellpushy,stackcellpopy,controlypitch
%integer stackcellaxpitch, stackx, stacky
  %if symbol exists("stackcell")=true %then ->gen
  symbol("stackcell")
    %if Buried contacts = true %start
      layer(poly)
        box(15,4,17,8) ; box(41,21,43,25)
        pdbw(16,3) ; pdbe(42,26)
    %finish %else %start
        pdms(15,5) ; pdmn(43,24)
    %finish

==== ecsc04/cgwws.txt ====

BOTTOM WRAPS

 9.5 INCH LENGTHS, WIRE BIN 21
    1    FH35  ->  CF28

 9.0 INCH LENGTHS, WIRE BIN 20
    2    FH03  ->  CG10

 8.5 INCH LENGTHS, WIRE BIN 17
    3    DE34  ->  AG02
    4    DA45  ->  AB32
    5    DA47  ->  AB33
    6    FF03  ->  CG11

 8.0 INCH LENGTHS, WIRE BIN 16
    7    FD03  ->  CG12
    8    FH43  ->  DA26
    9    FB35  ->  CE21
   10    FD19  ->  CG20


==== ecsc04/sup23l.txt ====
LINK
ECSC04.SUP23W
ECSC04.SEMA02Z
ERCC07.COM20Z
ERCC07.FAST16Z
ERCC07.OPER14Z
ERCS04.DPRINT24Z
ERCS04.TAPE58Z
ERCC35.GPC9Y
ERCC07.NDIAG06Z
ERCC20.COMMS29Z
.END
SUP23Z
SUPFIX SUP23Z,SUP23T

==== ecsc04/contacts.txt ====
!******************************************************************************
! specs in same order as in perqimports file
%routine %spec subc (%integer x, y)
%routine %spec dm (%integer x,y)
%routine %spec pm (%integer x,y)
%routine %spec pdms (%integer x, y)
%routine %spec pdmn (%integer x, y)
%routine %spec pdmw (%integer x, y)
%routine %spec pdme (%integer x, y)
%routine %spec pdbns (%integer x, y)
%routine %spec pdbew (%integer x, y)
%routine %spec pdcn (%integer x, y)
%routine %spec pdcs (%integer x, y)
%routine %spec pdce (%integer x, y)
%routine %spec pdcw (%integer x, y)
%routine %spec pdbn (%integer x, y)
%routine %spec pdbs (%integer x, y)
%routine %spec pdbe (%integer x, y)
%routine %spec pdbw (%integer x, y)
!******************************************************************************
%constant %string (2) blue  ="M", metal    ="M",  nm="M"

==== ecsc04/sup23s.txt ====

%LONGINTEGERFNSPEC RTDR(%INTEGERFN A)
%INTEGERFNSPEC REQUEST INPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%INTEGERFNSPEC REQUEST OUTPUT(%INTEGER OUTPUT POSN,TRIGGER POSN)
%EXTERNALROUTINE SUP29
!-----------------------------------------------------------------------
%OWNSTRING(3) SUPID="23F"
!-----------------------------------------------------------------------
! STORE CONFIGURATION & EPAGE SIZE DECLARATIONS
! AMENDED 24/02/78  "SMACS","TRANS" & "KMON" INCLUDED
! COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18A ONWARDS 
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,KLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SPDRQ,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,  %C
         %INTEGERARRAY SP(0:15), %INTEGER  %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ecsc04/impiocpis.txt ====
!*******************************************************************************
! specs for external routines in this file IMPIOCPI
%routinespec openinput(%integer stream,%string(100) filename)
%integerfnspec instream
%string(100)%fnspec infilename(%integer stream)
%routinespec closeinput(%integer stream)
%routinespec openoutput(%integer stream,%string(100) filename)
%integerfnspec outstream
%string(100)%fnspec outfilename(%integer stream)
%routinespec closeoutput(%integer stream)
%routinespec stop
%shortintegerfnspec iocp(%shortinteger ep,n,x)
!*******************************************************************************
! specs for Pascal routines in IMPIOCP
%externalroutinespec ioinit
%externalroutinespec openin(%shortinteger s,%string(100) filename)
%externalshortintegerfnspec instrm
%externalroutinespec infile(%shortinteger s,%integer fileref)
%externalroutinespec closein(%shortinteger s)
%externalroutinespec openout(%shortinteger s,%string(100) filename)
%externalshortintegerfnspec outstrm

==== ecsc41/ada_sortdemo.txt ====
-- Simple demonstration of the generic sorting package.

    WITH TEXT_IO ; USE TEXT_IO ; -- make standard text I/O available
    WITH gensort ; -- make generic sorting package available

    PROCEDURE sortdemo IS

-- Global Types :

    TYPE intvec IS ARRAY ( INTEGER RANGE <> ) OF INTEGER ;

-- Generic Package Instantiations :

    PACKAGE intsort IS NEW gensort ( INTEGER, intvec, ">" ) ;
    PACKAGE intio IS NEW INTEGER_IO ( INTEGER ) ;
    USE intsort, intio ;

-- Global Variables :

    test_array : intvec ( 1..10 ) ; -- array to be sorted


==== ecsc41/ada_robpack.txt ====
    WITH text_io ; USE text_io ; -- make text input/output available

-- robot_handler => Package definition for simple robot simulation.
    PACKAGE robot_handler IS

--    Package Type Definitions :

       TYPE axis_name IS ( x_axis, y_axis, z_axis ) ;
       SUBTYPE move_range IS INTEGER RANGE -1000..1000 ;
       TYPE param_array IS ARRAY ( axis_name ) OF move_range ;

--    Package Task Types :

--    robot_controller => Task to simulate control of a robot.
       TASK TYPE robot_controller IS

--       Entry points :
          ENTRY open ;
          ENTRY single_axis_move ( axis : axis_name ;
                                   distance : move_range ) ;
          ENTRY compound_move ( axis_deltas : param_array ) ;

==== ecsc41/ada_treedemo2.txt ====
-- Simple demonstration of the generic tree handling package.

    WITH TEXT_IO ; USE TEXT_IO ; -- make standard text I/O available
    WITH tree_handler ; -- make generic tree handling package available

    PROCEDURE treedemo2 IS

-- Global Types :

    SUBTYPE ubyte IS INTEGER RANGE 0..255 ;

    TYPE sub_rec IS RECORD
       one   : ubyte ;
       two   : ubyte ;
       three : ubyte ;
    END RECORD ;

    TYPE rec_test IS RECORD
       main : ubyte ;
       sub  : sub_rec ;
    END RECORD ;

==== ecsc41/ada_setdemo.txt ====
-- Demostration program for generic set handling package.

    WITH text_io ; USE text_io ; -- make text I/O package available
    WITH set_handler ; -- make generic set handling package available

    PROCEDURE setdemo IS

-- Global Types :

    TYPE colour IS ( violet, blue, white, green, yellow, orange, red ) ;

-- Generic Package Instantiation :

    PACKAGE colset IS NEW set_handler ( colour ) ;
    USE colset ;

-- Global Variables :

    colour_set    : set := full_set ; -- full set of colours
    colour_choice : set ;
    leftovers     : set ;

==== ecsc41/ada_idpack.txt ====
-- Package to demonstrate Private Types.
    
    WITH TEXT_IO ; USE TEXT_IO ; -- make text I/O available

    PACKAGE id_handler IS

-- Package Types :

    TYPE id_number IS PRIVATE ;

-- Package Functions :

-- new_id => Genarate an id_number.
    FUNCTION new_id RETURN id_number ;

-- Package Procedures :

-- put => Output an id_number to the terminal.
    PROCEDURE put ( id : id_number ) ;

    PRIVATE -- hidden part

==== ecsc41/ada_sortdemo2.txt ====
-- Demonstration of the generic sorting package.

    WITH TEXT_IO ; USE TEXT_IO ; -- make standard text I/O available
    WITH text_handler ; USE text_handler ; -- varying length strings
    WITH gensort ; -- make generic sorting package available

    PROCEDURE sortdemo2 IS

-- Global Types :

    TYPE sp IS ( W, O, B, A, F, G, K, M, R, N, S ) ; -- spectral types
    SUBTYPE st IS CHARACTER RANGE '0'..'9' ; -- spectral sub-types
    TYPE lc IS ( I, II, III, IV, V ) ; -- luminosity class

    TYPE spectral_class IS RECORD
       sp_type    : sp ;
       sp_sub     : st ;
       luminosity : lc ;
       extras     : text ;
    END RECORD ;


==== ecsc41/ada_treedemo.txt ====
-- Demonstrates the generic tree handling package

    WITH TEXT_IO ; USE TEXT_IO ; -- make standard text I/O available
    WITH text_handler ; USE text_handler ; -- for varying length strings
    WITH tree_handler ; -- make generic tree handling package available

    PROCEDURE treedemo IS

-- Global Types :

    TYPE sp IS ( W, O, B, A, F, G, K, M, R, N, S ) ; -- spectral types
    SUBTYPE st IS CHARACTER RANGE '0'..'9' ; -- spectral sub-types
    TYPE lc IS ( I, II, III, IV, V ) ; -- luminosity class

    TYPE spectral_class IS RECORD
       sp_type    : sp ;
       sp_sub     : st ;
       luminosity : lc ;
       extras     : text ;
    END RECORD ;


==== ecsc41/ada_double.txt ====
-- Simple Ada program which doubles a given integer

    WITH text_io ; USE text_io ; -- Maks standard text I/O available

    PROCEDURE double IS -- program specification

-- Generic Package Instantiations :

    PACKAGE int_io IS NEW integer_io ( integer ) ; USE int_io ;

-- Global Variables :

    value  : INTEGER ; -- value to be doubled
    double : INTEGER ; -- result

    BEGIN -- double

    PUT ( "Value to be doubled ? " ) ; -- prompt user
    GET ( value ) ;                    -- read number
    double := value * 2 ;              -- multiply by two
    PUT ( value ) ;                    -- print value given by user

==== ecsc41/ada_robdemo2.txt ====
WITH TEXT_IO ; USE TEXT_IO ; -- setup standard text I/O package
WITH robot_handler ; USE robot_handler ; -- setup robot package

PROCEDURE robdemo2 IS -- demonstrates use of robot simulation package

-- Type Definitions :

    TYPE command IS ( x_move, y_move, z_move, compound, quit ) ;
    TYPE conv_com IS ARRAY ( x_move..z_move ) OF axis_name ;

-- Generic Package Instantiations :

    PACKAGE com_io IS NEW ENUMERATION_IO ( command ) ;
    PACKAGE mr_io IS NEW INTEGER_IO ( move_range ) ;
    PACKAGE an_IO IS NEW ENUMERATION_IO ( axis_name ) ;
    USE com_io, mr_io, an_io ;

-- Global Constants :

    axis_for : CONSTANT conv_com := ( x_axis, y_axis, z_axis ) ;


==== ecsc41/ada_utilpack.txt ====
-- General Utility Package

    PACKAGE utils IS

--    Package Functions :

--    ch_is_upper => Is character an upper case letter ?
       FUNCTION ch_is_upper ( c : CHARACTER ) RETURN BOOLEAN ;

--    ch_is_lower => Is character a lower case letter ?
       FUNCTION ch_is_lower ( c : CHARACTER ) RETURN BOOLEAN ;

--    upper_case => Return upper case equivalent of a character.
       FUNCTION upper_case ( c : CHARACTER ) RETURN CHARACTER ;

--    lower_case => Return lower case equivalent of a character.
       FUNCTION lower_case ( c : CHARACTER ) RETURN CHARACTER ;

--    upper_case => Return upper case equivalent of a string.
       FUNCTION upper_case ( s : STRING ) RETURN STRING ;


==== ecsc41/ada_robdemo.txt ====
-- Demonstrate use of robot handler package

    WITH robot_handler ; USE robot_handler ;

    PROCEDURE robdemo IS

-- Local Variables :

    r2d2 : robot_controller ; -- robot controller task
    c3po : robot_controller ; -- another robot controller task

    BEGIN -- robdemo

-- setup robot system
    robot_system.open ;

-- setup robot controller task
    r2d2.open ;

-- move in y-axis direction
    r2d2.single_axis_move ( y_axis, -5 ) ;

==== ecsc41/ada_iddemo.txt ====
-- Demonstrates use of Package containing a private type.
    WITH text_io, id_handler ; USE text_io, id_handler ;

    PROCEDURE iddemo IS

-- Local Variables :

    person_id : id_number ;
    animal_id : id_number ;

    BEGIN -- iddemo

-- allocate values to person_id & animal_id
    person_id := new_id ;
    animal_id := new_id ;

-- list ids
    PUT ( "Person Id No. is " ) ; put ( person_id ) ; NEW_LINE ;
    PUT ( "Animal Id No. is " ) ; put ( animal_id ) ; NEW_LINE ;

-- try to explicitly set id number components

==== ecsc41/ada_sortpack.txt ====
-- Generic sorting package.

    GENERIC

       TYPE elem IS PRIVATE ; -- generic object
       TYPE vector IS ARRAY ( INTEGER RANGE <> ) OF elem ;
       WITH FUNCTION ">" ( left, right : elem ) RETURN BOOLEAN ;

    PACKAGE gensort IS

--    swap => swap two values of the generic type
       PROCEDURE swap ( first, second : IN OUT elem ) ;

--    quicksort => Sorts an array of generic objects ( quicksort )
       PROCEDURE quicksort ( v : IN OUT vector ) ;

    END gensort ; ------------------------------------------------------

-- gensort => Body of generic sorting package.
    PACKAGE BODY gensort IS


==== ecsc41/ada_setpack.txt ====
-- Generic set handling package.

    GENERIC

        TYPE elem IS ( <> ) ; -- discrete generic type

    PACKAGE set_handler IS

-- Package Types :

    TYPE set IS PRIVATE ; -- private type

    TYPE elem_list IS ARRAY ( NATURAL RANGE <> ) OF elem ;

-- Package Constants :

    empty_set : CONSTANT set ; -- deferred constants
    full_set  : CONSTANT set ;

-- Package Functions :


==== ecsc41/ada_textpack.txt ====
-- Text handling package for use with strings of up to length 255.

    WITH TEXT_IO ; USE TEXT_IO ; -- make standard text I/O available
    WITH utils ; USE utils ; -- make utilities available

-- text_handler => Text handling package definition.
    PACKAGE text_handler IS

--    Package Types :

       SUBTYPE ubyte IS INTEGER RANGE 0..255 ;

       TYPE text ( len : ubyte := 0 ) IS RECORD
          value : string ( 1..len ) ;
       END RECORD ;

--    Package Procedures :

--    set => Set text object to value of given string.
       PROCEDURE set ( x : OUT text ; y : STRING ) ;


==== ecsc41/ada_treepack.txt ====
-- Generic tree handling package.

    WITH text_io ; USE text_io ; -- make standard I/O available

    GENERIC

       TYPE elem IS PRIVATE ;
       WITH FUNCTION ">" ( x, y : elem ) RETURN BOOLEAN ;
       WITH PROCEDURE put ( x : elem ) ;

    PACKAGE tree_handler IS

-- Package Types :

    TYPE node ; -- full spec given later

    TYPE tree IS ACCESS node ; -- pointer type to node records

    TYPE node IS RECORD -- now give node record definition
       value : elem ;
       left  : tree ;

==== ecslib/emas-2900/toals_view_users1.txt ====
17/12/80 15.54.20 ERCLIB ERCLIB.LIBCONTENTS
17/12/80 16.08.46 ERCLIB NLC
17/12/80 16.59.38 ERCC04 PD13S
17/12/80 17.03.50 ERCC04 PD12S
17/12/80 17.07.53 EBFR12 ERCLIB.LIBCONTENTS
17/12/80 19.07.12 ECZU09 PD4
17/12/80 19.18.22 ECZU09 ERCLIB.LV_VIEWS
17/12/80 19.18.43 ECZU09 PD4
17/12/80 19.21.26 ECZU09 PD3
17/12/80 19.21.52 ECZU09 PD2
17/12/80 19.22.13 ECZU09 PD1
17/12/80 19.22.52 ECZU09 PDI
17/12/80 19.23.43 ECZU09 PDG
17/12/80 19.24.16 ECZU09 PDG
17/12/80 19.41.53 ECSLIB GT
17/12/80 19.49.30 ECSLIB ENCU73.TOAL
17/12/80 20.00.38 ECSLIB GT
17/12/80 20.04.33 ECSLIB GT
17/12/80 20.08.13 ECYU40 ERCLIB.VIEW
17/12/80 20.09.39 ECSLIB GT
17/12/80 20.28.20 ECZU85 KNTLIB.BASICPD

==== ecslib/emas-2900/toals_view_users2.txt ====
22/12/80 16.13.31 EXODUS ERCC04.WINE
22/12/80 16.41.43 ERCC08 ERCLIB.LV_VIEWS
22/12/80 19.43.29 ECSLIB GT
22/12/80 19.50.39 ECSLIB ERCLIB.VIEW
19/12/80 11.36.46 ECYU83 ECSLIB.PICS
19/12/80 11.38.03 ECYU83 PICS
19/12/80 11.42.03 ECYU83 ECZU36.BASIC_BASIC
19/12/80 11.43.58 ECYU83 ECSLIB.GT
19/12/80 11.45.07 ECYU83 ASSORT
19/12/80 11.45.34 ECYU83 DIRECTORY
19/12/80 11.46.49 ECYU83 ECZU36.BASIC_SUMA
19/12/80 11.47.31 ECYU83 DIRECTORY
19/12/80 11.51.21 ECZU36 ECSLIB.GT
19/12/80 11.52.26 ERCLIB T#L
19/12/80 11.58.31 ECYU83 ECSLIB.GT
19/12/80 11.59.05 ECZU36 ECSLIB.GT
19/12/80 12.02.10 ERCLIB T#L
19/12/80 12.06.22 ECYU83 ASSORT
19/12/80 12.11.41 ECYU83 DIRECTORY
19/12/80 12.13.01 ECYU83 DIRECTORY
19/12/80 12.14.50 ECYU83 ERCLIB.LIBCONTENTS

==== ecslib/emas-2900/toals_view_users3.txt ====
07/01/81 10.32.18 EMCT02 EMCT06.IMPVDOC
07/01/81 10.50.37 EMCT06 IMPVDOX
07/01/81 10.50.39 EMCT06 IMPVDOC
07/01/81 10.58.10 ECZU85 GU
07/01/81 11.10.47 ECSC20 O
07/01/81 11.10.55 ECSC20 0
07/01/81 11.10.59 ECSC20 ERCLIB.LV_VIEWS
07/01/81 11.26.06 ERCLIB T#L
07/01/81 11.27.01 ERCLIB ERCLIB.LIBCONTENTS
07/01/81 11.54.04 ERSY01 ERCLIB.LIBCONTENTS
07/01/81 11.56.14 ECSC20 ERCLIB.LV_VIEWS
07/01/81 12.06.08 ERCC04 PD13S
07/01/81 12.12.06 ERCC04 ZZ
07/01/81 12.19.58 ERCC04 VTEST
07/01/81 13.48.25 ERCC04 VTEST
07/01/81 13.49.47 ERCC04 VTEST
07/01/81 14.41.54 ECSC20 VIEWS
07/01/81 14.43.32 ECSC20 ERCC04.LIB
07/01/81 14.45.21 ERCC04 ERCLIB.VIEW
07/01/81 14.48.30 ERCC04 ERCLIB.VIEW
07/01/81 14.52.35 ERCC04 VTEST

==== ecslib/emas-2900/toals_view_users4.txt ====
14/01/81 16.31.21 ERCC04 PD13S
14/01/81 16.32.26 ECYU83 CONS
14/01/81 16.47.32 ECYU83 DIR
14/01/81 16.47.59 ECYU83 ERCLIB.LIBCONTENTS
14/01/81 16.54.29 ECYU20 JUNK
14/01/81 16.54.48 ECYU20 USERS
14/01/81 16.55.11 ECYU20 PROG
14/01/81 17.06.37 ECYU83 WERT
14/01/81 17.06.47 ECYU20 PROG
14/01/81 17.09.56 ECSC29 ERCLIB.LIBCONTENTS
14/01/81 17.17.04 ECYU83 CON
14/01/81 17.19.12 ECXU87 ERCLIB.LIBCONTENTS
14/01/81 17.23.59 ERCLIB ERCLIB.LIBCONTENTS
14/01/81 17.28.09 ECXU54 PAS
14/01/81 17.29.14 ECYU20 PROG
14/01/81 17.30.42 ECXU54 CONLIB
14/01/81 17.31.19 ECXU54 CHAR
14/01/81 17.32.06 ECXU54 COMMANDS
14/01/81 17.33.08 ECXU54 DIR
14/01/81 17.33.36 CONLIB ERCLIB.LIBCONTENTS
14/01/81 17.34.53 ECXU54 DIR

==== ecslib/emas-2900/toals_view_users5.txt ====
08/05/81 17.26.32 ERCC63 SUBSYS.VIEW
08/05/81 17.27.16 EMCT02 ERCC27.MAILHELP
08/05/81 17.29.11 EMCT02 ERCC27.MAILHELP
08/05/81 17.31.59 ECSC20 SUBSYS.VIEW
08/05/81 17.31.59 ECSC20 SCREED
08/05/81 17.33.18 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.38.13 ECSC04 SUBSYS.VIEW
08/05/81 17.38.13 ECSC04 ERCLIB.LIBCONTENTS
08/05/81 17.41.13 EBFU54 ERCC27.MAILHELP
08/05/81 17.44.03 ECSC20 SUBSYS.VIEW
08/05/81 17.44.03 ECSC20 SCREED
08/05/81 17.44.30 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.48.55 EMCT02 ERCC27.MAILHELP
08/05/81 17.54.22 ECSC20 SUBSYS.VIEW
08/05/81 17.54.22 ECSC20 SCREED
08/05/81 17.54.34 ECSC20 SUBSYS.VIEW
08/05/81 17.54.34 ECSC20 SCREED
08/05/81 17.55.06 ECSC20 SUBSYS.VIEW
08/05/81 17.55.06 ECSC20 SCREED
08/05/81 17.55.16 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.55.21 ECYU20 ERCC27.MAILHELP

==== ecslib/emas-2900/edwin_txstack.txt ====
{ EDWIN Transformation stack routines added }               %end %of %list

%constant %integer TRANSFORM STACK DEPTH = 100

%record %format TRANS FM (%real %array A (0:8))

%external %routine %spec UNITY TRANSFORM     %alias "EDWIN_UNITY_TX"     (%record (TRANSFM) %name T)
%external %routine %spec TRANSLATE TRANSFORM %alias "EDWIN_TRANSLATE_TX" (%real X, Y, %record (TRANSFM) %name T)
%external %routine %spec MIRROR X TRANSFORM  %alias "EDWIN_MIRROR_X_TX"  (%record (TRANSFM) %name T)
%external %routine %spec MIRROR Y TRANSFORM  %alias "EDWIN_MIRROR_Y_TX"  (%record (TRANSFM) %name T)
%external %routine %spec ROT DV TRANSFORM    %alias "EDWIN_ROT_DV_TX"    (%real A, B, %record (TRANSFM) %name T)
%external %routine %spec ROT ANG TRANSFORM   %alias "EDWIN_ROT_ANG_TX"   (%real ANGL, %record (TRANSFM) %name T)
%external %routine %spec COMPOSE TRANSFORM   %alias "EDWIN_COMPOSE_TX"   (%record (TRANSFM) %name TA, TB, TC)
%external %routine %spec SCALE TRANSFORM     %alias "EDWIN_SCALE_TX"     (%real XS, YS, %record (TRANSFM) %name T)

%external %routine %spec POP TRANSFORM       %alias "EDWIN_POP_TX"
%external %routine %spec PUSH TRANSFORM      %alias "EDWIN_PUSH_TX"      (%record (TRANSFM) %name T)
%external %routine %spec INIT TRANSFORM      %alias "EDWIN_INIT_TX"
%external %routine %spec PRINT TRANSFORM     %alias "EDWIN_PRINT_TX"     (%record (TRANSFM) %name T)
%external %routine %spec SET TRANSFORM       %alias "EDWIN_SET_TX"       (%record (TRANSFM) %name T)
%external %routine %spec GET TRANSFORM       %alias "EDWIN_GET_TX"       (%record (TRANSFM) %name TX)

==== ecslib/emas-2900/toals_view_users6.txt ====
22/05/81 14.12.17 ECUU36 SUBSYS.VIEW
22/05/81 14.12.17 ECUU36 ECSC20
22/05/81 14.12.56 ECUU36 ERCI34.CDOSUSERS
22/05/81 14.13.38 ECUU36 SUBSYS.VIEW
22/05/81 14.19.18 ECYU20 SUBSYS.VIEW
22/05/81 14.19.18 ECYU20 PROG
22/05/81 14.21.21 ECUU36 KNTLIB.SCREEDDOC
22/05/81 14.22.26 ECXU22 SUBSYS.VIEW
22/05/81 14.22.35 ECXU22 P8
22/05/81 14.26.13 ECUU36 SUBSYS.VIEW
22/05/81 14.26.19 ECUU36 ECSC20
22/05/81 14.35.03 ECSC06 SUBSYS.VIEW
22/05/81 14.35.03 ECSC06 ECSC19.STV
22/05/81 14.43.23 ERCC08 SUBSYS.VIEW
22/05/81 14.43.37 ERCC08 ERCC09.REPORTS
22/05/81 14.44.42 ERCC08 SUBSYS.VIEW
22/05/81 14.44.42 ERCC08 SUBSYS.VIEW
22/05/81 14.48.10 ERCI33 SUBSYS.VIEW
22/05/81 14.48.12 ERCI33 SSUREPORT
22/05/81 14.49.21 ERCI23 SUBSYS.VIEW
22/05/81 14.49.21 ERCI23 ERCLIB.LIBCONTENTS

==== ecslib/emas-2900/toals_view_users7.txt ====
03/07/81 23.25.23 ECSLIB ERCC27.MAILHELP
16/06/81 08.56.22 ECYU40 SUBSYS.VIEW
16/06/81 08.56.22 ECYU40 ERCC27.MAILHELP
16/06/81 09.00.16 ECYU40 SUBSYS.VIEW
16/06/81 09.00.16 ECYU40 ERCC63.PDSCREED
16/06/81 09.30.26 ERUA13 SUBSYS.VIEW
16/06/81 09.30.26 ERUA13 ERCI34.INFORMATION
16/06/81 09.31.25 ERUA13 ERUA14.INFORMATION
16/06/81 09.46.52 ERCM03 SUBSYS.VIEW
16/06/81 09.46.52 ERCM03 ERCC19.ADVISOR
16/06/81 09.55.40 ERCC04 SUBSYS.VIEW
16/06/81 09.55.42 ERCC04 DIRECTOR
16/06/81 10.12.44 ERCC04 SUBSYS.VIEW
16/06/81 10.12.44 ERCC04 LIBS
16/06/81 10.18.24 ERCM09 SUBSYS.VIEW
16/06/81 10.18.26 ERCM09 ERCLIB.LIBCONTENTS
16/06/81 10.21.39 ERCC04 SUBSYS.VIEW
16/06/81 10.21.39 ERCC04 LIBS2
16/06/81 10.27.52 ECZU09 SUBSYS.VIEW
16/06/81 10.27.52 ECZU09 T#LIST
16/06/81 10.32.12 ECZU09 SUBSYS.VIEW

==== ecslib/emas-2900/toals_view_users8.txt ====
20/07/81 20.44.17 ECSC03 ERCC27.MAILHELP
16/06/81 08.56.22 ECYU40 SUBSYS.VIEW
16/06/81 08.56.22 ECYU40 ERCC27.MAILHELP
16/06/81 09.00.16 ECYU40 SUBSYS.VIEW
16/06/81 09.00.16 ECYU40 ERCC63.PDSCREED
16/06/81 09.30.26 ERUA13 SUBSYS.VIEW
16/06/81 09.30.26 ERUA13 ERCI34.INFORMATION
16/06/81 09.31.25 ERUA13 ERUA14.INFORMATION
16/06/81 09.46.52 ERCM03 SUBSYS.VIEW
16/06/81 09.46.52 ERCM03 ERCC19.ADVISOR
16/06/81 09.55.40 ERCC04 SUBSYS.VIEW
16/06/81 09.55.42 ERCC04 DIRECTOR
16/06/81 10.12.44 ERCC04 SUBSYS.VIEW
16/06/81 10.12.44 ERCC04 LIBS
16/06/81 10.18.24 ERCM09 SUBSYS.VIEW
16/06/81 10.18.26 ERCM09 ERCLIB.LIBCONTENTS
16/06/81 10.21.39 ERCC04 SUBSYS.VIEW
16/06/81 10.21.39 ERCC04 LIBS2
16/06/81 10.27.52 ECZU09 SUBSYS.VIEW
16/06/81 10.27.52 ECZU09 T#LIST
16/06/81 10.32.12 ECZU09 SUBSYS.VIEW

==== ecslib/emas-2900/sints.txt ====

%ENDOFLIST
%CONSTSHORTINTEGERARRAY MAIN(1 : 359) =  %C
    1,    7,   13,   18,   22,   25,   29,   33,   37,   40,   47,   51,
   54,   59,   62,   65,   68,   72,   76,   80,   84,   90,   94,   98,
  103,  108,  113,  118,  122,  127,  135,  139,    0,  141,  144,  145,
  152,    0,  157,  159,  161,  163,    0,  165,  167,  168,  169,  174,
    0,  178,  181,  182,  186,  187,  188,  189,    0,  199,  202,    0,
  205,  206,  207,  209,    0,  211,  213,    0,  215,  218,    0,  220,
  226,  230,  233,  235,  238,  241,  243,  245,  247,  249,    0,  251,
  253,  254,  256,  257,  259,  261,  263,    0,  265,  267,  268,  269,
  272,  274,  275,  277,  279,  281,    0,  283,  285,    0,  287,  289,
    0,  291,  294,  298,  301,  303,  304,  305,  306,  308,  309,  311,
  312,    0,  316,  320,  321,  324,  325,  331,    0,  333,  338,  339,
  341,  343,  347,    0,  351,  353,  355,  356,  357,  359,  361,  363,
  365,  367,  369,  371,  373,  375,  377,  379,    0,  381,  382,  383,
    0,  389,  396,  402,  403,  409,  410,  416,  417,  419,  422,    0,
  424,  426,    0,  428,  435,  439,    0,  442,  444,  445,  447,  449,
  451,  453,  455,  457,  459,    0,  461,  464,    0,  466,  469,  472,
  476,  479,  481,  483,  485,  487,  490,  493,  495,  498,  501,  504,
  506,  508,  511,  514,  517,  521,  523,  525,  529,  534,  536,  538,

==== ecslib/emas-2900/edwin_shapes.txt ====
{ EDWIN Geometric utility routines added }                        %end %of %list

! Set up routines
%external %routine %spec SET WIRE MODE  %alias "EDWIN_SET_WIRE_MODE"  (%integer MODE)
%external %routine %spec SET COLOUR MAP %alias "EDWIN_SET_COLOUR_MAP" (%integer ADR, RED, BLUE, GREEN)

! Constants for wire modes
%constant %integer FLAT ENDS = 0
%constant %integer ROUND ENDS = 1
%constant %integer EXTENDED ENDS = 2

! Drawing routines
%external %routine %spec ARC            %alias "EDWIN_ARC"        (%integer OX, OY, RAD, START ANG, END AND)
%external %routine %spec SECTOR         %alias "EDWIN_SECTOR"     (%integer OX, OY, RAD, START ANG, END AND)
%external %routine %spec CIRCLE         %alias "EDWIN_CIRCLE"     (%integer RAD)
%external %routine %spec RECTANGLE      %alias "EDWIN_RECTANGLE"  (%integer XL, YL, XU, YU)
%external %routine %spec BOX            %alias "EDWIN_BOX"        (%integer L, W, %record (POINTFM) %name C, D)
%external %routine %spec WIRE           %alias "EDWIN_WIRE"       (%integer W, NP, %record (POINTFM) %array %name P)
%external %routine %spec POLYGON        %alias "EDWIN_POLYGON"    (%integer NP, %record (POINTFM) %array %name P)

%list;%end %of %file

==== ecslib/emas-2900/pics_mary.txt ====
 
 
 
 
        PPPPPP  EEEEEE      A      CCCCCC  EEEEEE     OOOOOO  N    N
        P    P  E          A A     C       E          O    O  NN   N
        PPPPPP  EEE       A   A    C       EEE        O    O  N N  N
        P       E        AAAAAAA   C       E          O    O  N  N N
        P       EEEEEE  A       A  CCCCCC  EEEEEE     OOOOOO  N   NN
 
                EEEEEE      A      RRRRRR  TTTTTTT  H    H
                E          A A     R    R     T     H    H
                EEE       A   A    RRRRRR     T     HHHHHH
                E        AAAAAAA   R   R      T     H    H
                EEEEEE  A       A  R    R     T     H    H
 
 
 
   MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
   MMMMMMMMMMMMMMMMMMMMMMMMMMMMHH  H HIIIIIHHHHMMMMMMMMMMMMMMMMMMMMMMMMM
   MMMMMMMMMMMMMMMMMMMMMMMMMMMHI888888888888888IIMMMMMMMMMMMMMMMMMMMMMMM

==== ecslib/emas-2900/oldgeneraly_toprinter.txt ====

   TOPRINTRONIX  <file name> / <device or file>

   This program was written by Mark Taunton to allow files produced by
programs such as LAYOUT to be sent to Printronix printers, with the
underlining converted to the format which the printer requires.
The input file must be a text file, and the output can either be a file
which may be sent to the required printer later by the command LIST,
or the name of a printer.

   eg.     TOPRINTRONIX FILE/NEWFILE
   or      TOPRINTRONIX FILE/.LP41

   The following commands are also provided which provide default output 
device names.

   TOLP41  <file>        TOLP15  <file>       TOLP78  <file>


==== ecslib/emas-2900/lpd_layupls.txt ====
$A TAB=5,10,15,30
$L1UM
@CHANGES TO .EMAS .LAYOUT
$A INDENT=1
$B$I0
1.
@NEW PARAMETER .INVO (OUTPUT CASE INVERT) DISTINCT FROM
.INVERT, WHICH NOW APPLIES ONLY TO INPUT. @THIS PERMITS
PROPER TREATMENT OF THE SITUATION WHERE DIFFERENT CASE
CONVENTIONS ARE REQUIRED IN THE INPUT AND UPDATED OUTPUT.
@THE DEFAULT SETTINGS ASSUME UPPER-CASE LETTERS PLUS CASE
MARKERS, WITH THE LETTERS SIGNIFYING LOWER-CASE UNLESS
GOVERNED BY A MARKER. @NORMAL UPPER AND LOWER-CASE REPRESENTATION
IS ACHIEVED BY .$$A$ CAP=0;$ CAPSH=0;$ INVERT=0 (FOR INPUT)
AND .$$A$ CAPO=0;$ CAPSHO=0;$ INVO=0 (FOR OUTPUT).
$B$I0
2.
$T1
$$@L0 IS INTERPRETED AS INTRODUCING AN INDEFINITE NUMBER OF EXPLICIT
LINES.
@THE EFFECT EXTENDS TO THE NEXT DIRECTIVE.

==== ecslib/emas-2900/deptfile.txt ====
$$
IMP77$
*IMP77LIB$
*IMP77AY$
IMP77PD$
RUN77S$
ROUTINES TO RUN IMP77 PROGRAMS
AND COMPILE THEM. NOTE IMP77 COMPILER ITSELF
IS NOT RELEASED TO CSDEPT YET.
$
P.ROBERTSON ECSC17
$
$$
EDWIN$
*EDWINLIB$
*TVIEW,*EDWINTY,*CALCOMP$
EDWINPD$
*TEKPAC,EDWINT,TVIEWSF,CALCOMPS$
Graphics package for any graphics terminal.
$
Gordon Hughes, ECSC01

==== ecslib/emas-2900/edwin_pspecs.txt ====
{ EDWIN procedure specs in PASCAL format.}

{ procedures for initialisation and termination}
procedure initialisefor       (devicetype : integer);                   extern;
procedure terminateedwin;                                               extern;

{ Output primitives}
procedure moveabs             (x,y : integer);                          extern;
procedure moverel             (dx,dy : integer);                        extern;
procedure lineabs             (x,y : integer);                          extern;
procedure linerel             (dx,dy : integer);                        extern;
procedure markerabs           (n,x,y : integer);                        extern;
procedure markerrel           (n,dx,dy : integer);                      extern;
procedure character           (sym : char);                             extern;

{ Control}
procedure newframe;                                                     extern;
procedure update;                                                       extern;
procedure storeon             (stream : integer);                       extern;
procedure storeoff;                                                     extern;
procedure viewon              (stream : integer);                       extern;

==== ecslib/emas-2900/lpd_ldocls.txt ====
$A MARK=2
$A PAGENO=1; JUST=1
$A TAB=12,20,28
$L1CUM
LAYOUT: DOCUMENT PRODUCTION PROGRAM


$P2 @THE BASIC FUNCTION OF .LAYOUT IS TO PRODUCE AN APPROPRIATELY PAGED AND
FORMATTED DOCUMENT FROM A SOURCE FILE IN WHICH THE REQUIRED LAYOUT IS
INDICATED BY %DIRECTIVES INTERSPERSED WITH THE TEXT; IN GENERAL, THE
SPACING AND LINE-STRUCTURE OF THE SOURCE ARE NOT SIGNIFICANT. @A
SECONDARY FUNCTION IS TO OUTPUT AN UPDATED SOURCE FILE SIMILAR TO THE
ORIGINAL EXCEPT THAT THE LINE-STRUCTURE FOLLOWS THAT OF THE FORMATTED
DOCUMENT (SUBJECT TO LIMITATIONS OF LINE LENGTH).
$P @IN ADDITION THE PROGRAM OPTIONALLY PROVIDES FOR THE APPLICATION OF
SHIFT CONVENTIONS TO THE SOURCE (AND UPDATED SOURCE) TO PERMIT THE
REPRESENTATION OF UPPER AND LOWER CASE LETTERS AND UNDERLINED CHARACTERS
WITHIN A RESTRICTED CHARACTER SET. @CODE CONVERSION IS UNDERSTOOD TO BE
CARRIED OUT OUTSIDE THE LAYOUT PROGRAM PROPER, WHICH USES A CHARACTER
SET IN WHICH BOTH UPPER AND LOWER CASE LETTERS AND UNDERLINED CHARACTERS
ARE REPRESENTED BY SINGLE CODES. @THIS CHARACTER SET IS FULL .ASCII

==== ecslib/emas-2900/generals_newuserss.txt ====
!TITLE Source of NEWUSERS
!<
%external %integer %fn %spec OUTPOS
%external %integer %fn %spec UINFI (%integer I)
%external %string (255) %fn %spec UINFS (%integer I)
%const %integer SYS PROCS = 5;          ! Number of system processes
%const %integer OCP TYPE = 10
%const %integer TERMINAL WIDTH = 15

%system %routine %spec FOR ALL USERS (%routine USE)
%system %string (255) %fn %spec USERNAME (%string(255) USER, %integer MACHINE)

%system %integer %fn  STOI (%string (255) S)
   %integer SYM
   %if LENGTH(S)>0 %start
      %result = - STOI (SUB STRING (S, 2, LENGTH(S))) %if CHARNO(S,1)='-' %and LENGTH(S)>1
      SYM = CHARNO(S,LENGTH(S))-'0'
      LENGTH(S) = LENGTH(S)-1
      %result = 10*STOI(S)+SYM
   %finish
   %result = 0

==== ecslib/emas-2900/pics_calender_december.txt ====
        



                                            XXXXXXXXXXXXX
                                         XXXX           XXXX
                                         X                  XXX
                                        XX                     XXX
                                       XX                         XX
                                      XX                            XX
                                     XX                               XX
                                    XX                                 XX
                                    XX                                  XX
                                    XX                                   XX
                                    XX                XXXX                XX
                         XXXXXXXXXX XX        X     X  XXX  X              XX
                     RRRR       XXX  X       XX    X X     X X             X
                 RRRRRRRRR      XXXXX XXXXXX XX XX X      X  X             X
              RRRRRRRRRRRR      XXX                 X      X X             X
            RRRRRRRRRRRRRRR     XXX                       X X              X
         X    RRRRRRRRRRRRRR    XXX                     X XX              XX

==== ecslib/emas-2900/lisp_release70.txt ====
IMP LISPSPDF_LISPRUNS70,LISPRUNY
INSERT LISPRUNY
PERMIT LISPRUNY,,R
IMP LISPSPDF_LISPV08S70,LISPV08Y
INSERT LISPV08Y
PERMIT LISPV08Y,,R
COPY LISPSPDF_INITLSP8,INITLISP
PERMIT INITLISP,,R

==== ecslib/emas-2900/edwin_device.txt ====
{ EDWIN internal procedures for device driver support }       %end %of %list

! EMAS specifics -
%dynamic %integer %fn %spec REM %alias "IMP_REM" (%integer A, B)
%dynamic %string (255) %fn %spec ItoS %alias "IMP_I_TO_S" (%integer I, P)
%dynamic %string (255) %fn %spec RtoS %alias "IMP_R_TO_S" (%long %real R, %integer A, B)
%dynamic %routine %spec Open Output %alias "IMP_OPEN_OUTPUT" (%integer N, %string (255) S)
%dynamic %routine %spec Close Output %alias "IMP_CLOSE_OUTPUT"

%dynamic %routine %spec OPER MESSAGE %alias "EDWIN_OPER_MESSAGE" (%string (255) S)
%dynamic %routine %spec OPER INTERACT %alias "EDWIN_OPER_INTERACT" (%string (255) S)

%external %integer %spec VIEWING        %alias "EDWIN___VIEWING"
%dynamic %routine %spec TEK INPUT      %alias "EDWIN___TEK_INPUT" (%integer %name State, X, Y, %integer INVOKE CURSOR)

%record %format DEV DATA FM (%integer DEV NO   { logical device number },
   %string (31) NAME         { Text name for the device                },
   %integer TYPE             { Model number of the device              },
   %integer ARF              { Aspect Rationing Factor as a percentage },
   %integer DVX, DVY         { Default Viewport X and Y                },
   %integer MVX, MVY         { Maximum Viewport X and Y                },

==== ecslib/emas-2900/pics_asterix.txt ====


+



+



+



+



+



==== ecslib/emas-2900/graph16s.txt ====
%EXTERNALROUTINE FLO(%STRING (63) S)
%STRING (63) INFILE, OUTFILE
%EXTERNALROUTINESPEC DEFINE(%STRING (63) S)
!
! FRONT PANEL USEAGE INFO.
!
%SHORTINTEGERARRAY PINS(0:63,1:38)
!
! PIN PARAMS. TO DRAWING ROUTINES
!
%INTEGERARRAY PICT(1 : 11)
%INTEGERARRAY POSITION(16 : 63)
%INTEGERARRAY LINK, DATA(1 : 1024)
%INTEGER STARTS, ASL, WIRES
%CONSTSTRING (1) SNL = '
'
!
! PIN USEAGE TEXT
!
%CONSTSTRING (11) %ARRAY TXT(-64 : 15) =                   %C
'START','FFCOMP','FFSET0','FFSET1','FFRDDATA','FFDATA',

==== ecslib/emas-2900/vlsiuse_nmos8.txt ====
IDENT *
ND  3  1  0  18
NP  4  2  0  15
NM  2  4  0  18
NI  6  8  0   5
NB  7  7  0   2
NC  1  0  0  10
NG  8 12  0   1
NT  1 15  0   1
NV  5 15  0   3
ZZZ

==== ecslib/emas-2900/generals_prints.txt ====
! TOPRINTRONIX  Mark Tauntons program to send files to line printers.

%external %routine %spec open output (%integer st, %string (255) file)
%external %routine %spec open input  (%integer st, %string (255) file)
%external %routine %spec close input
%external %routine %spec close output

%const %integer  max lines = 10
%const %integer  CR = 13

%external %routine TOPRINTRONIX (%string (255) PARM)
   %string(255) out, rline, sline, line, spaces
   %integer  term, outf, c, maxr, maxs, ms, mr, p
   %own %byte space = ' '

   %routine  READLINE (%string(*) %name line, %integername term)
      %integer  s
      line = ""
      %cycle
         read ch (s)
         term = s %and %return %if s = NL %or s = CR

==== ecslib/emas-2900/coms_release.txt ====
! Program to update a member of a commected PD file.
! Form :   RELEASE CHIMPY,GENERALY
! or       RELEASE ECSC10.CY,GENERALY_CHIMPY

%const %integer TRUE = 1, FALSE = 0

%external %routine %spec COPY (%string (255) PARM)
%external %routine %spec NEWGEN (%string (255) PARM)
%external %routine %spec VIEW (%string (255) PARM)

%external %routine RELEASE (%string (255) FILE)
   %byte VIEWING
   %string (255) NF,SF,PD
   %unless FILE -> SF.(",").PD %start
       Print string ("RELEASE fails - format is RELEASE ECSC10.CHIMPY,GENERALY!")
       newline
       %stop
   %finish
   VIEWING = FALSE
   VIEWING = TRUE %if PD -> PD.("!")
   %unless PD -> PD.("_").NF %start

==== ecslib/emas-2900/intexts.txt ====

!
!**************************************************
!*                                                *
!*    VARIOUS EXTERNAL ROUTINES FOR IMPI          *
!*                                                *
!***************************************************
!
%TRUSTEDPROGRAM
%EXTERNALINTEGER MON REP = 0;           ! REPETITION COUNTER FOR RESUMES
%EXTERNALBYTEINTEGER MONLOCK
%EXTRINSICINTEGER MONFRAME, MONINFO, BRKR9AD
%OWNSHORTINTEGER TRAP BLOCK, TRAP LINE
!

%EXTERNALROUTINE EXTINIT
          *MVI_4(13),X'55';             ! FLAG FOR MDIAG
%END

%EXTERNALROUTINE HEX(%INTEGER N)
%SHORTROUTINE

==== ecslib/emas-2900/pics_calender_september.txt ====



                XXXXXXXXXXXX   XXXXXXXXXXXXXXXXXXXX
             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
            XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           XXXXXXXXXXXXXXXXXX   XXXXXXXXXXXXXXXXXXXXXXXXXX
            XXXXXXXXXXXXX       XXXXXXXXXXXXXXXXXXXXXXXXXX
             XXXXXXXXXXXX       XXXXXXXXXXXXXXXXXXXXXXXXXXX
                 XXXXXXX       XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                 X    X X       XXXXXXXXXXXXXXXXXXXXXXXXXXXX
                 X   X           XXXXXXXXXXXXXXXXXXXXXXXXXX
            XXXXX  X  X             X     XXXXXXXXXXXXXXXXX
          XX                              XXXXXXXXXXXXXXXX
            XX                       XXXXXXXXXXXXXXXXXXXX
            X                             XXXXXXXXXXXXXX
           X  XXXXXXXXX               XXXXXXXXXXXXXXXXX XXXXXX
            XX         X            XXXXXXXXXXXXXXXXXXXXXXXXXX
                        X          XXXXXXXXXXXXXXXXXXXXXXXXXXX
                       XX          XXXXXXXXXXXXXXXXXXXXXXXXXX

==== ecslib/emas-2900/pics_nell.txt ====
      The Ballad Of Eskimo Nell

When a man grows old and his balls grow cold
And the end of his knob turns blue
When it's bent in the middle like a one-stringed fiddle
He can tell you a yarn or two

So find me a seat and stand me a drink
And I'll tell you a tale as well
Of Dead-eyed Dick and Mexican Pete
And the gentle Eskimo Nell

Now when Dead-eyed Dick and Mexican Pete
Go forth in search of fun
It's usually Dick that wields the prick
And Mexican Pete the gun

And when Dead-eyed Dick and Mexican Pete
Are sore depressed and sad
'Tis usually the cunt that bears the brunt
But the shooting ain't so bad

==== ecslib/emas-2900/edwin_inc.txt ====
{ NB: Specs for Version 4 of EDWIN :  See ECSLIB.EDWIN_SPECS for latest info }
{ EDWIN routine specs added }                      %end %of %list

! Routines for initialisation and termination
%external %routine %spec INITIALISE FOR (%integer DEVICE TYPE)
%external %routine %spec TERMINATE EDWIN

! Output primitives
%external %routine %spec MOVE ABS (%integer X,Y)
%external %routine %spec MOVE REL (%integer DX,DY)
%external %routine %spec LINE ABS (%integer X,Y)
%external %routine %spec LINE REL (%integer DX,DY)
%external %routine %spec MARKER ABS (%integer N,X,Y)
%external %routine %spec MARKER REL (%integer N,DX,DY)
%external %routine %spec CHARACTER (%integer SYM)
%external %routine %spec TEXT (%string (255) ST)
%external %routine %spec TEXT COLOUR ESCAPE %alias "EDWIN_TEXT_COL_ESC" (%integer CH)
%external %routine %spec TEXT FONT ESCAPE %alias "EDWIN_TEXT_FONT_ESC" (%integer CH)

! Control
%external %routine %spec NEW FRAME

==== ecslib/emas-2900/vlsiuse_roller.txt ====
LAYERS P+D+M+C

==== ecslib/emas-2900/basicpd_bintrs.txt ====
    %BEGIN
!
!  DDDD     EEEEEE   BBBB     BBBB     II    EEEEEE
!  DD DD    EE       BB  BB   BB  BB   II    EE
!  DD  DD   EE       BB  BB   BB  BB   II    EE
!  DD  DD   EEEEEE   BBBB     BBBB     II    EEEEEE
!  DD  DD   EE       BB  BB   BB  BB   II    EE
!  DD DD    EE       BB  BB   BB  BB   II    EE
!  DDDD     EEEEEE   BBBB     BBBB     II    EEEEEE
!
!  De EdinBurgh Basic IntErpreter 
!  _  _   _     _     _  _
!***************************************************************
!***************************************************************
!**                                                           **
!**                 WILLIAM ALAN PATERSON                     **
!**                                                           **
!**                  COMPUTER SCIENCE 4 1974/75               **
!**                                                           **
!***************************************************************
!***************************************************************

==== ecslib/emas-2900/gamespd_destruct.txt ====
%EXTERNALROUTINE DESTRUCT
  %INTEGERARRAY AIR(-3:74,-3:21),MSX(1:2),MSY(1:2),U(1:3),V(1:3)
  %INTEGER PLX,PLY,HITS,X,Y
  %STRING(40) SEQ
  %ROUTINE INSTRUCT
    %ROUTINE P(%STRING(72) SEQ)
      PRINTSTRING(SEQ.SNL)
    %END
    P("  In this game there are two missiles, a plane and an air-base.")
    P("You control the plane and the missiles are controlled by the")
    P("computer. The object is to destroy the missiles before they")
    P("destroy the air-base. They will be diverted from doing this and")
    P("will attack you if you come too close. The game is at an end")
    P("when either the base is blown up, or you have blown up both")
    P("missiles. You may destroy your own base if you wish.")
    P("  To move your plane give instuctions like this: ")
    P("    W2S3 or W5N6 or E4S2                         N")
    P("        W=west, E=east, N=north, S=south.       W E")
    P("  You may move a maximum of 8 east or west       S")
    P("but only 6 north or south. The procedure is the same for")
    P("firing at the missiles. the count being taken from where")

==== ecslib/emas-2900/lisp_lispv06s.txt ====
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecslib/emas-2900/lpd_layout15.txt ====
%BEGIN;  !DOCUMENT LAYOUT PROGRAM
!SYMBOLIC CONSTANTS
%OWNINTEGER SIN=1;  !SOURCE INPUT STREAM
%OWNINTEGER ERR=0, DOC=1, SOUT=2;  !OUTPUT STREAMS
%OWNINTEGER LBOUND=200;  !LINE BUFF BOUND
%OWNINTEGER ABOUND=200;  !ATOM BUFF BOUND
%OWNINTEGER SBOUND=200;  !SOURCE LINE BUFF BOUND
%OWNINTEGER VBOUND=25;  !VECTOR (EG TAB) BOUND
%OWNINTEGER ESCBIT=256, UNDBIT=128, CASEBIT=32
%OWNINTEGER CHARMASK=255, BASICMASK=127, LETMASK=95
%OWNINTEGER SENTSP=544;  !512+' '
!LAYOUT PARAMETERS
%OWNINTEGER TOP=2, BOTTOM=4, LEFT=0, PAGE=60, LINE=72
%OWNINTEGER SLINE=80, NLS=1, SGAP=2, PGAP=3
%OWNINTEGER INDENT=0, SECTNO=0, PAGENO=0, START=1
%OWNINTEGER ESCAPE='$', CAP='@', UND='_', CAPSH='.', UNDSH='%'
%OWNINTEGER CAPO='@', UNDO='_', CAPSHO='.', UNDSHO='%'
%OWNINTEGER INVERT=32, ASCII=1, JUST=0, MARK=0
%OWNINTEGERARRAY TAB(0:25) = 1,9,17,25,33,41,49,57,65,73,81,
    89,97,105,113,121,129,137,145,153,161,169,177,185,193,201
%OWNINTEGERARRAY TEMPA(0:25) = 1,9,17,25,33,41,49,57,65,73,81,

==== ecslib/emas-2900/oldgeneraly_clean.txt ====
!TITLE CLEAN

!< General information

The command CLEAN can be used to inspect a users files, and perform
a variety of file management operations on them.  It can be used with
both forground and archived files, and also members of partitioned
files.   A number of options are provided to select which files are
to be 'cleaned'.


The command has the form :         CLEAN mask,options

MASK specifies which files names are to be cleaned -

     eg.       CLEAN SS#*
               CLEAN *TEST
               CLEAN PDFILE_MEM*
               CLEAN ECSLIB.CIF*
               CLEAN T*S


==== ecslib/emas-2900/pdp16pd_arthmans.txt ====

$A MARK=2;UNDSH='@';UND=0;NLS=2
$A CAP=0;CAPO=0;CAPSH=0;CAPSHO=0;INVERT=0;INVO=0
$A TOP=4;BOTTOM=8;UNDSHO='@';SLINE=72
$A LEFT=10;LINE=62;PAGE=52;JUST=1
$A TAB=6,11,16,21,31,41,26
$B10
$L1MU
USERS GUIDE TO A PDP_16 DESIGN AID
$B4
$L1UM
COMPUTER SCIENCE IV
$B
$L1MU
GROUP PROJECT 1974
$B
$L5M
A. ANDERSON
 M.A.C. CURRIE
 L.F. MARSHALL
  P.S. ROBERTSON

==== ecslib/emas-2900/generals_pdlists.txt ====
!TITLE Source of S#PD LIST
!<
%CONST %INTEGER    SS pd file type      = 6
%CONST %INTEGER    SS opt file type     = 9


!( S# pd list

%SYSTEM %ROUTINE pd list(%INTEGER start address, types wanted)

!    Prints the names of the members of the partitioned file
! connected at address 'start address' and their sub-members in turn.
!    Prints out the file-type for each member if 'types wanted' # 0
!)

%ROUTINE lower case(%STRING(255) Text)
%INTEGER each
   %IF LENGTH(Text)>1 %START
      %CYCLE each = 2,1,LENGTH(Text)
         CHARNO(Text,each) = CHARNO(Text,each)!!32 %C
            %IF 'A'<=CHARNO(Text,each)<='Z'

==== ecslib/emas-2900/lisp_lispv07s.txt ====
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecslib/emas-2900/generals_build_userbuild.txt ====
%conststring(1)snl="
"
%externalstring(63)%fnspec itos(%integer i,j)
%begin
!
!
%externalroutinespec open input(%integer st,%string(255)s)
%externalroutinespec open output(%integer st,%string(255)s)

   open input(1,"T#USERLIST")
   open output(2,"T#USERTEXT")
   select input(1)
   select output(2)

!
!
   %routine  read sequence(%string(*)%name s,%integer t)
      skip symbol %while next symbol=' '
      S=""
      S=S.next item %and skipsymbol %until next symbol=t
      skipsymbol

==== ecslib/emas-2900/toals_view_getusers.txt ====
%BEGIN
%INTEGER START,FIN
%INTEGER I
SELECTOUTPUT(1)
READ(START)
I = START+X'28'
FIN=START+X'2000'-2
%CYCLE
   %WHILE I<FIN %CYCLE
      %EXIT %IF BYTEINTEGER(I)='/'
      I=I+1
   %REPEAT
   %EXIT %IF I>=FIN
   I=I-3
   PRINTSTRING(STRING(I));NEWLINE
   I=I+BYTEINTEGER(I)
%REPEAT
%ENDOFPROGRAM

==== ecslib/emas-2900/vlsiuse_fiber.txt ====
LAYERS I+B+G

==== ecslib/emas-2900/generals_pdanals.txt ====
!TITLE Source of PD ANAL
!<
%SYSTEM %STRING %FN %SPEC FAILURE MESSAGE(%INTEGER FAULT)

%EXTERNAL %ROUTINE %SPEC DEFINE(%STRING(255) NUMBER NAME)
%EXTERNAL %ROUTINE %SPEC CLEAR(%STRING(255) NUMBER)

%SYSTEM %INTEGER %FN %SPEC pdaddr(%STRING(255) pdfile)
%SYSTEM %ROUTINE %SPEC pd list(%INTEGER CONNECT ADDRESS, %C
                                        TYPES FLAG)
!(PD ANAL
!   PDANAL  PDFILE, * / OUTPUT
!
!  PDFILE MAY BE TOP LEVEL FILE, OR A MEMBER OF ANOTHER PDFILE
! TO ANY DEPTH.
!
!  OUTPUT MAY BE A FILE, OR ONE OF ".OUT" OR ".TT"
! - ".OUT" MEANS THE CURRENTLY SELECTED OUTPUT STREAM,
! - ".TT"  MEANS THE INTERACTIVE TERMINAL.
!
!  * MEANS EXTRA DATA IS WANTED (FILE-TYPES OF MEMBERS)

==== ecslib/emas-2900/vlsiuse_ra4.txt ====
SIZE 19 28

==== ecslib/emas-2900/pics_santa.txt ====



                          O
                        DD
                       D  D
                      O    OO
                       D   O D
                        D O   DD
                        OO        D  OOOO
                        D     9  D  OO   O
       MMM             D      9 OOOOO     O
      MMMMM         MMM D       OOOO
     MM   MM     MOO           D   OO     O
    MM     MM   M OO          D     OOO   O
   MM      MMM M  OO         D       OOO   OO
  MM        MMM   OO        D          OOOOO
      MMMMMMM     OO       D
    MMMMMMMMM     OO      D
   MMM       D    OO     D
   MM       D     OO    D

==== ecslib/emas-2900/coms_back.txt ====
OPTION ITWIDTH=132

==== ecslib/emas-2900/lisp_lispv08s.txt ====
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecslib/emas-2900/pics_calender_april.txt ====


              ######         #####
            ##########     ##########
           ############   #############
          ############## ###############
         ############### ################
         ############### ################
         ############### ################
          ##########        ############
           #######            ########
            #####              #####
             ###                   ########
         ######                  ##########
      #########                 ############
    ############               #############
    #############             ##############
    ############### ##     #### ############
      ############ ############# ##########
       #########   #############   ######
         ######   ##############

==== ecslib/emas-2900/iperm.txt ====
%constinteger nl=10
%integermapspec integer(%integer a)
%realmapspec real(%integer a)
%string(*)%mapspec string(%integer a)
%record(*)%mapspec record(%integer a)
%bytemapspec byteinteger(%integer a)
%shortmapspec shortinteger(%integer a)
%halfmapspec halfinteger(%integer a)
%longintegermapspec longinteger(%integer a)
%longrealmapspec longreal(%integer a)
%longrealmapspec longlongreal(%integer a)
%bytemapspec length(%string(*)%name s)
%bytemapspec charno(%string(*)%name s,%integer n)
%integerfnspec addr(%name n)
%string(1)%fnspec tostring(%integer k)
%string(1)%fnspec nextitem
%integerfnspec nextch
%integerfnspec nextsymbol
%routinespec readch(%name n)
%routinespec readsymbol(%name n)
%routinespec readitem(%string(*)%name s)

==== ecslib/emas-2900/oldgeneraly_ecceview_preface.txt ====
!TITLE ECCE FOR VIDEOS

                 E C C E   F O R   V I D E O S

   This version of ECCE combines the capabilities of a conventional
context editor with many of the features of a screen editor.  It is
supported by the Department of Computer Science and comments are
welcomed.

   First-time users on EMAS should view the important points in the
section on IMPLEMENTATIONS.  Users who do not already have the Computer
Science library in their search list should give the once-only command
OPTION(SEARCHDIR=ECSLIB.GENERAL).  The command name is VECCE.

                                        Hamish Dewar  April 1983


==== ecslib/emas-2900/generals_widelists.txt ====
!TITLE  Source of WIDELIST
!<

%external %integer %fn %spec   UINFI (%integer PARM) { 15 = terminal width }
%SYSTEM %ROUTINE %SPEC         FILL(%INTEGER  LENGTH,START,CHARACTER)
%SYSTEM %ROUTINE %SPEC         IOCP(%INTEGER  EPNO,PARM)
%SYSTEM %ROUTINE %SPEC         P SYSMES(%INTEGER ROOT,ERROR)
%SYSTEM %STRING(15) %FN %SPEC  ITOS(%INTEGER I)
%SYSTEM %INTEGER %FN %SPEC     PSTOI(%STRING(15) S)
%EXTERNAL %INTEGER %FN %SPEC   RETURN CODE
%EXTERNAL %ROUTINE %SPEC       CLEAR(%STRING(255) STREAM)
%EXTERNAL %ROUTINE %SPEC       DEFINE(%STRING(255) STREAMS)
%EXTERNAL %ROUTINE %SPEC       DESTROY(%STRING(255) FILE)
%SYSTEM %ROUTINE %SPEC         SET F NAME(%STRING(255) S)
%EXTERNAL %ROUTINE %SPEC       SS F OFF
%EXTERNAL %ROUTINE %SPEC       SS F ON
%EXTERNAL %ROUTINE %SPEC       NEW SMFILE(%STRING(255) FILE AND SIZE)
%EXTERNAL %INTEGER %FN %SPEC   SM ADDR(%INTEGER CHANNEL, %INTEGER %NAME LENGTH)
%SYSTEM %INTEGER %FN %SPEC     PD ADDR(%STRING(255) FILE)
%EXTERNAL %ROUTINE %SPEC       PROMPT(%STRING(15) TEXT)


==== ecslib/emas-2900/gamespd_hang.txt ====
%END %OF %LIST; ! The list of Key words.
  %CONSTSTRING(15)%ARRAY WORDS(0:2233)="CABLE","BACON","ACIDS","AGAIN",
  "BANAL","CACTI","CANAL","BALLS","BEGIN","BATCH","BASIC","BANKS",
  "DANCE","ABOVE","BEING","EAGLE","CALLS","CHECK","BLACK","ABOUT",
  "CARDS","CHEAT","BEGUN","AMBER","DEATH","CASES","BELLS","ALARM",
  "ACTOR","BLANK","AFTER","BELOW","FACTS","CHILD","CELLO","CELLS",
  "DATES","ALGOL","FAILS","CLEAR","FAITH","EATEN","FALSE","BOARD",
  "BLIND","DEMON","DIGIT","BLOCK","CLASS","EDITS","DATUM","CLIMB",
  "BREAK","EARTH","COCOA","BRAND","CODES","CITED","CLAWS","ALLOW",
  "EIGHT","BOATS","IDEAS","COBOL","HANDS","BRAIN","CLOCK","FARMS",
  "ENDED","DEPTH","BIRTH","COALS","AMONG","ARMED","HEALS","HEART",
  "HAIRS","BRICK","CITES","HATED","COAST","FAULT","ASIAN","GIANT",
  "DISCS","BONES","ELBOW","FIFTH","HATES","CONIC","APRIL","BRING",
  "COMES","JEANS","FINDS","CLUBS","DISKS","BOOKS","HELLO","CONES",
  "DOING","FIFTY","HAPPY","CRIME","ARRAY","APPLY","FILMS","LEADS",
  "BUILD","HELPS","BULGE","FLOCK","FIRES","ERECT","IMAGE","GLASS",
  "LAKES","LEGAL","LAMBS","FREED","BOXES","GOALS","MAIDS","COULD",
  "DRINK","CYBER","LEAVE","LEARN","MAKES","FREES","HILLS","LARGE",
  "DRIVE","INDIA","BROWN","GIVEN","GREEK","FIRST","GREAT","COUNT",
  "GREEN","OCEAN","MARCH","GOING","GIVES","ENTER","FORCE","LAUGH",
  "FORGE","AUNTS","GIRLS","GRAVE","MATCH","PEACE","NAMED","FLOUR",

==== ecslib/emas-2900/oldgeneraly_compare.txt ====

   COMPARE input1,input2/output

Compares two text files, and lists the differences between
them on a line by line basis.  This is useful when editing
from one file to another, if you forget later which file
had the up to date information.

The /output is optional and defaults to the terminal.
The input files may be sub-sub-... members of a pdfile.


==== ecslib/emas-2900/iskimppd_iskimps.txt ====

%EXTERNALROUTINE ISKIMP(%STRING(63) S)
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC FAULT(%STRING(63) S)
%INTEGERFNSPEC CHNEXT
%INTEGERFNSPEC NEWCELL
%INTEGERFNSPEC RETURN CELL(%INTEGER I)
%ROUTINESPEC PRINT NAME(%INTEGER I)
%ROUTINESPEC PHEX(%INTEGER I,J)
%INTEGER I,J,AP,APP,TP,ASL,BTN,CHP,FAULTS,NL,LEVEL,CA,COMP,SCF,PARS
%INTEGER LOPR,ASSOPP,LSTPP
%OWNSHORTINTEGERARRAY PS(-1000:-573)=%C
   -997,-910,-855,-984, 201, 198,-775,-761, 212, 200, 197, 206,
   -910,-863,-872,-855,-980,   2,  58,-1000,-971, 198, 201, 206,
    201, 211, 200,-872,-855,-961, 201, 206, 212, 197, 199, 197,
    210,-717,-855,-955,-673,-654,   1,-647,-855,-950, 197, 206,
    196,-855,-943, 194, 197, 199, 201, 206,-855,-929, 197, 206,
    196, 207, 198, 208, 210, 207, 199, 210, 193, 205,-855,-924,
     42,   3,-599,-855,-918,  42,-841,   2,-578,-855,-913,  42,

==== ecslib/emas-2900/fundsjob.txt ====
whichemas
funds
donatefunds 5.00,ecsc17
documents
#connect edwin
#connect iperm

==== ecslib/emas-2900/edwin_specs.txt ====
{ EDWIN routine specs added }                                     %end %of %list

! Routines for initialisation and termination
%external %routine %spec INITIALISE FOR     %alias "EDWIN_INIT"          (%integer DEVICE TYPE)
%external %routine %spec TERMINATE EDWIN    %alias "EDWIN_TERM"

! Output primitives
%external %routine %spec MOVE ABS           %alias "EDWIN_MOVE_ABS"      (%integer X, Y)
%external %routine %spec MOVE REL           %alias "EDWIN_MOVE_REL"      (%integer DX, DY)
%external %routine %spec LINE ABS           %alias "EDWIN_LINE_ABS"      (%integer X, Y)
%external %routine %spec LINE REL           %alias "EDWIN_LINE_REL"      (%integer DX, DY)
%external %routine %spec MARKER ABS         %alias "EDWIN_MARK_ABS"      (%integer N, X, Y)
%external %routine %spec MARKER REL         %alias "EDWIN_MARK_REL"      (%integer N, DX, DY)
%external %routine %spec CHARACTER          %alias "EDWIN_CHAR"          (%integer SYM)

! Text output
%external %routine %spec TEXT               %alias "EDWIN_TEXT"          (%string (255) ST)
%external %routine %spec TEXT COLOUR ESCAPE %alias "EDWIN_TEXT_COL_ESC"  (%integer CH)
%external %routine %spec TEXT FONT ESCAPE   %alias "EDWIN_TEXT_FONT_ESC" (%integer CH)

! Control

==== ecslib/emas-2900/gamespd_drafts.txt ====
%EXTERNALROUTINE DRAUGHTS(%STRING(12) S)
%EXTERNALROUTINESPEC CPULIMIT (%STRING(255) S)
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%OWNINTEGER MOB WT = 6
%CONSTINTEGER TRUE =1, FALSE = 0

%OWNINTEGER BACK WT = 4
%OWNINTEGER CENT WT = 4
%OWNINTEGER ADV1 WT = 450
%OWNINTEGER ADV2 WT = 50
%OWNINTEGER CRAMP WT = 6
%OWNINTEGER MON = 'Q'
%OWNINTEGER A WIN = 0
%OWNINTEGER SEARCH LIMIT = 3
%OWNINTEGER CROWN = 1800
%OWNINTEGERARRAY BACK1(1:5) = 77, 75, 73, 71, 64
%OWNINTEGERARRAY BACK2(1:5) =  0,  2,  4,  6, 13
%OWNINTEGERARRAY CENTSQ(0:7) = 51, 53, 42, 44, 33, 35, 24, 26
%OWNINTEGERARRAY MOVE(0:7) =  9, 18, 11, 22, -9,-18,-11,-22
%OWNINTEGERARRAY PLAYER1(-1:26) =     'W',    1,  
   77,   75,   73,   71,   64,   66,   62,   60,   57,   55,   53,   51,

==== ecslib/emas-2900/edwin_icodes.txt ====
{ EDWIN Internal Code Deffinitions }                          %end %of %list

! Device Driver commands
%constant %integer dev initialise = 0
%constant %integer dev terminate  = 1
%constant %integer dev update     = 2
%constant %integer dev newframe   = 3
%constant %integer dev move       = 4
%constant %integer dev line       = 5
%constant %integer dev char       = 6
%constant %integer dev attribute  = 7
%constant %integer dev low wb     = 8
%constant %integer dev high wb    = 9
%constant %integer dev code 10    = 10
%constant %integer dev code 11    = 11
%constant %integer dev low box    = 12
%constant %integer dev high box   = 13
%constant %integer dev circle     = 14
%constant %integer dev code 15    = 15
%constant %integer MAX COM        = 15   { device commands from 0 to MAX COM }


==== ecslib/emas-2900/lpd_jlaydoc.txt ====



                    EDINBURGH REGIONAL COMPUTING CENTRE           September 1977



                     _____________________________________

                     LAYOUT: A DOCUMENT FORMATTING PROGRAM


   LAYOUT is a document formatting program, written in IMP.  Its input is a
character file consisting for the most part of the text of the document to be
produced.  This source file is read once by LAYOUT and the output document file
is produced as it is read.  Optionally, LAYOUT can also produce an updated
source file, the purpose of which is described later.

   The source file is treated as a sequence of 'text atoms' separated by
delimiters, a delimiter being any number of spaces or newlines or both.  A text
atom thus corresponds to a normal word, possibly followed by punctuation.  The
program reads the text atoms and places them one by one, separated by ______

                                                                      single
spaces, in a line buffer until the next text atom would exceed the line length

==== ecslib/emas-2900/edwin_reinsert.txt ====
newdirectory t#edwindir,400,4000
option activedir=t#edwindir
insert EDWIN_DDBBCY
insert EDWIN_DDCALRCOY
insert EDWIN_DDCATSY
insert EDWIN_DDCHASY
insert EDWIN_DDGIGIY
insert EDWIN_DDGP300Y
insert EDWIN_DDHPPLOTY
insert EDWIN_DDERCCHPY
insert EDWIN_DDHPTERMY
insert EDWIN_DDP300Y
insert EDWIN_DDSIGMAY
insert EDWIN_DDTEKY
insert EDWIN_DDWESTWY
insert EDWIN_DDX5AY
insert EDWIN_EDCONFIGY
insert EDWIN_EDWIN5Y
insert EDWIN_edtransy
insert edwin_fintery
insert edwin_pintery

==== ecslib/emas-2900/lisp_lispv08s70.txt ====
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecslib/emas-2900/include_pam.txt ====
%endoflist;  !PAM interface
%recordformat paminfo(%byte GROUPSEP,KEYFLAG, %short allflags,
                      %record(paminfo)%name params)
%external%record(paminfo)%mapspec PAM
%constinteger PAM NEWGROUP=1, PAM NODEFAULT=2, PAM MAJOR=4, PAM KEEPCASE=8,
              PAM INFILE=16, PAM OUTFILE=32
%external%routinespec DEFINE PARAM %alias "PAM_DEFSTRING" %c
          (%string(255) text, %string(*)%name variable, %integer flags)
%external%routinespec DEFINE INT PARAM %alias "PAM_DEFINT" %c
          (%string(255) text, %integername variable, %integer flags)
%external%routinespec DEFINE ENUM PARAM %alias "PAM_DEFENUM" %c
          (%string(255) text, %bytename variable, %integer flags)
%external%routinespec DEFINE BOOLEAN PARAMS %alias "PAM_DEFBOOL" %c
          (%string(255) text, %integername variable, %integer flags)
%external%routinespec PROCESS PARAMETERS %alias "PAM_PROCESS"(%string(255) parm)
%list;%endoffile

==== ecslib/emas-2900/edwin_pshapes.txt ====
{ EDWIN procedure specs for Pascal Geometric Utilities }

procedure SetWireMode  (mode : integer);                                Extern;
procedure SetColourMap (adr, red, blue, green : integer);               Extern;
procedure Circle       (rad : integer);                                 Extern;
procedure Rectangle    (xl, yl, xu, yu : integer);                      Extern;
procedure Box          (L, W : integer; var C, D : pointfm);            Extern;
procedure Wire         (W, NE : integer; var parray : pointa);          Extern;
procedure Polygon      (NE : integer; var parray : pointa);             Extern;

==== ecslib/emas-2900/generals_deletes.txt ====
! A DELETE command for EMAS
! Gordon Hughes, September 1982
! The file fitting code from J. Wexler

%const %integer SSPDFILETYPE = 6
%record %format ARF (%string (31) NAME, %integer TYPE %or %string (11) SNAME, %integer SP12, KBYTES,
    %byte %integer ARCH, CODES, CCT, OWNP, EEP, USE, CODES2, SSBYTE, FLAGS, SP29, SP30, SP31)
%record %format PDHF (%integer DATAEND, DATASTART, SIZE, FILETYPE, SUM, DATETIME, ADIR, COUNT)
%record %format RF (%integer CONAD, FILETYPE, DATASTART, DATAEND)
%record %format AFRECF (%string (11) NAME, %integer KBYTES, %string (8) DATE, %string (6) TAPE, %INTEGER CHAPTER, FLAGS)
%system %routine %spec PRINTMESS (%integer M)
%system %integer %fn %spec STOREMATCH (%integer L, A1, A2)
%system %routine %spec MOVE (%integer LENGTH, FROM, TO)
%external %integer %fn %spec DFILENAMES (%string (6) USER,
   %record (AFRECF) %array %name INF, %integer %name FILENUM, MAXREC, NFILES, %integer FSYS, TYPE)
%external %integer %fn %spec DDESTROY (%string (6) USER, %string (11) FILE,
   %string (8) DATE, %integer FSYS, TYPE)
%system %routine %spec SETWORK (%integer %name AD, FLAG)
%system %integer %map %spec COMREG (%integer I)
%system %routine %spec CONNECT (%string (31) FILE, %integer MODE, HOLE, PROT, %record (RF) %name R, %INTEGER %NAME FLAG)
%external %integer %fn %spec UINFI (%integer I)

==== ecslib/emas-2900/lpd_hlaydcls.html ====
<html><head></head><body><pre>
<hr>

                  <em>layout: document production program</em>


   The basic function of LAYOUT is to produce an  appropriately  paged
and  formatted  document from a source file in which the required layout
is indicated by <em>directives</em> interspersed with the text; in  general,  the
spacing  and  line-structure  of  the  source  are  not  significant. A
secondary function is to output an updated source file  similar  to  the
original  except  that  the line-structure follows that of the formatted
document (subject to limitations of line length).

   In addition the program optionally provides for the  application  of
shift  conventions  to  the  source  (and  updated source) to permit the
representation of upper and lower case letters and underlined characters
within a restricted character set. Code conversion is understood to  be
carried  out  outside  the layout program proper, which uses a character
set in which both upper and lower case letters and underlined characters
are represented by single codes. This  character  set  is  full  ASCII

==== ecslib/emas-2900/gt_view_users1.txt ====
17/12/80 15.54.20 ERCLIB ERCLIB.LIBCONTENTS
17/12/80 16.08.46 ERCLIB NLC
17/12/80 16.59.38 ERCC04 PD13S
17/12/80 17.03.50 ERCC04 PD12S
17/12/80 17.07.53 EBFR12 ERCLIB.LIBCONTENTS
17/12/80 19.07.12 ECZU09 PD4
17/12/80 19.18.22 ECZU09 ERCLIB.LV_VIEWS
17/12/80 19.18.43 ECZU09 PD4
17/12/80 19.21.26 ECZU09 PD3
17/12/80 19.21.52 ECZU09 PD2
17/12/80 19.22.13 ECZU09 PD1
17/12/80 19.22.52 ECZU09 PDI
17/12/80 19.23.43 ECZU09 PDG
17/12/80 19.24.16 ECZU09 PDG
17/12/80 19.41.53 ECSLIB GT
17/12/80 19.49.30 ECSLIB ENCU73.TOAL
17/12/80 20.00.38 ECSLIB GT
17/12/80 20.04.33 ECSLIB GT
17/12/80 20.08.13 ECYU40 ERCLIB.VIEW
17/12/80 20.09.39 ECSLIB GT
17/12/80 20.28.20 ECZU85 KNTLIB.BASICPD

==== ecslib/emas-2900/gt_view_users2.txt ====
22/12/80 16.13.31 EXODUS ERCC04.WINE
22/12/80 16.41.43 ERCC08 ERCLIB.LV_VIEWS
22/12/80 19.43.29 ECSLIB GT
22/12/80 19.50.39 ECSLIB ERCLIB.VIEW
19/12/80 11.36.46 ECYU83 ECSLIB.PICS
19/12/80 11.38.03 ECYU83 PICS
19/12/80 11.42.03 ECYU83 ECZU36.BASIC_BASIC
19/12/80 11.43.58 ECYU83 ECSLIB.GT
19/12/80 11.45.07 ECYU83 ASSORT
19/12/80 11.45.34 ECYU83 DIRECTORY
19/12/80 11.46.49 ECYU83 ECZU36.BASIC_SUMA
19/12/80 11.47.31 ECYU83 DIRECTORY
19/12/80 11.51.21 ECZU36 ECSLIB.GT
19/12/80 11.52.26 ERCLIB T#L
19/12/80 11.58.31 ECYU83 ECSLIB.GT
19/12/80 11.59.05 ECZU36 ECSLIB.GT
19/12/80 12.02.10 ERCLIB T#L
19/12/80 12.06.22 ECYU83 ASSORT
19/12/80 12.11.41 ECYU83 DIRECTORY
19/12/80 12.13.01 ECYU83 DIRECTORY
19/12/80 12.14.50 ECYU83 ERCLIB.LIBCONTENTS

==== ecslib/emas-2900/gt_view_users3.txt ====
07/01/81 10.32.18 EMCT02 EMCT06.IMPVDOC
07/01/81 10.50.37 EMCT06 IMPVDOX
07/01/81 10.50.39 EMCT06 IMPVDOC
07/01/81 10.58.10 ECZU85 GU
07/01/81 11.10.47 ECSC20 O
07/01/81 11.10.55 ECSC20 0
07/01/81 11.10.59 ECSC20 ERCLIB.LV_VIEWS
07/01/81 11.26.06 ERCLIB T#L
07/01/81 11.27.01 ERCLIB ERCLIB.LIBCONTENTS
07/01/81 11.54.04 ERSY01 ERCLIB.LIBCONTENTS
07/01/81 11.56.14 ECSC20 ERCLIB.LV_VIEWS
07/01/81 12.06.08 ERCC04 PD13S
07/01/81 12.12.06 ERCC04 ZZ
07/01/81 12.19.58 ERCC04 VTEST
07/01/81 13.48.25 ERCC04 VTEST
07/01/81 13.49.47 ERCC04 VTEST
07/01/81 14.41.54 ECSC20 VIEWS
07/01/81 14.43.32 ECSC20 ERCC04.LIB
07/01/81 14.45.21 ERCC04 ERCLIB.VIEW
07/01/81 14.48.30 ERCC04 ERCLIB.VIEW
07/01/81 14.52.35 ERCC04 VTEST

==== ecslib/emas-2900/gt_view_users4.txt ====
14/01/81 16.31.21 ERCC04 PD13S
14/01/81 16.32.26 ECYU83 CONS
14/01/81 16.47.32 ECYU83 DIR
14/01/81 16.47.59 ECYU83 ERCLIB.LIBCONTENTS
14/01/81 16.54.29 ECYU20 JUNK
14/01/81 16.54.48 ECYU20 USERS
14/01/81 16.55.11 ECYU20 PROG
14/01/81 17.06.37 ECYU83 WERT
14/01/81 17.06.47 ECYU20 PROG
14/01/81 17.09.56 ECSC29 ERCLIB.LIBCONTENTS
14/01/81 17.17.04 ECYU83 CON
14/01/81 17.19.12 ECXU87 ERCLIB.LIBCONTENTS
14/01/81 17.23.59 ERCLIB ERCLIB.LIBCONTENTS
14/01/81 17.28.09 ECXU54 PAS
14/01/81 17.29.14 ECYU20 PROG
14/01/81 17.30.42 ECXU54 CONLIB
14/01/81 17.31.19 ECXU54 CHAR
14/01/81 17.32.06 ECXU54 COMMANDS
14/01/81 17.33.08 ECXU54 DIR
14/01/81 17.33.36 CONLIB ERCLIB.LIBCONTENTS
14/01/81 17.34.53 ECXU54 DIR

==== ecslib/emas-2900/gt_view_users5.txt ====
08/05/81 17.26.32 ERCC63 SUBSYS.VIEW
08/05/81 17.27.16 EMCT02 ERCC27.MAILHELP
08/05/81 17.29.11 EMCT02 ERCC27.MAILHELP
08/05/81 17.31.59 ECSC20 SUBSYS.VIEW
08/05/81 17.31.59 ECSC20 SCREED
08/05/81 17.33.18 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.38.13 ECSC04 SUBSYS.VIEW
08/05/81 17.38.13 ECSC04 ERCLIB.LIBCONTENTS
08/05/81 17.41.13 EBFU54 ERCC27.MAILHELP
08/05/81 17.44.03 ECSC20 SUBSYS.VIEW
08/05/81 17.44.03 ECSC20 SCREED
08/05/81 17.44.30 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.48.55 EMCT02 ERCC27.MAILHELP
08/05/81 17.54.22 ECSC20 SUBSYS.VIEW
08/05/81 17.54.22 ECSC20 SCREED
08/05/81 17.54.34 ECSC20 SUBSYS.VIEW
08/05/81 17.54.34 ECSC20 SCREED
08/05/81 17.55.06 ECSC20 SUBSYS.VIEW
08/05/81 17.55.06 ECSC20 SCREED
08/05/81 17.55.16 ECSC20 KNTLIB.SCREEDDOC
08/05/81 17.55.21 ECYU20 ERCC27.MAILHELP

==== ecslib/emas-2900/gt_view_users6.txt ====
22/05/81 14.12.17 ECUU36 SUBSYS.VIEW
22/05/81 14.12.17 ECUU36 ECSC20
22/05/81 14.12.56 ECUU36 ERCI34.CDOSUSERS
22/05/81 14.13.38 ECUU36 SUBSYS.VIEW
22/05/81 14.19.18 ECYU20 SUBSYS.VIEW
22/05/81 14.19.18 ECYU20 PROG
22/05/81 14.21.21 ECUU36 KNTLIB.SCREEDDOC
22/05/81 14.22.26 ECXU22 SUBSYS.VIEW
22/05/81 14.22.35 ECXU22 P8
22/05/81 14.26.13 ECUU36 SUBSYS.VIEW
22/05/81 14.26.19 ECUU36 ECSC20
22/05/81 14.35.03 ECSC06 SUBSYS.VIEW
22/05/81 14.35.03 ECSC06 ECSC19.STV
22/05/81 14.43.23 ERCC08 SUBSYS.VIEW
22/05/81 14.43.37 ERCC08 ERCC09.REPORTS
22/05/81 14.44.42 ERCC08 SUBSYS.VIEW
22/05/81 14.44.42 ERCC08 SUBSYS.VIEW
22/05/81 14.48.10 ERCI33 SUBSYS.VIEW
22/05/81 14.48.12 ERCI33 SSUREPORT
22/05/81 14.49.21 ERCI23 SUBSYS.VIEW
22/05/81 14.49.21 ERCI23 ERCLIB.LIBCONTENTS

==== ecslib/emas-2900/gt_view_users7.txt ====
03/07/81 23.25.23 ECSLIB ERCC27.MAILHELP
16/06/81 08.56.22 ECYU40 SUBSYS.VIEW
16/06/81 08.56.22 ECYU40 ERCC27.MAILHELP
16/06/81 09.00.16 ECYU40 SUBSYS.VIEW
16/06/81 09.00.16 ECYU40 ERCC63.PDSCREED
16/06/81 09.30.26 ERUA13 SUBSYS.VIEW
16/06/81 09.30.26 ERUA13 ERCI34.INFORMATION
16/06/81 09.31.25 ERUA13 ERUA14.INFORMATION
16/06/81 09.46.52 ERCM03 SUBSYS.VIEW
16/06/81 09.46.52 ERCM03 ERCC19.ADVISOR
16/06/81 09.55.40 ERCC04 SUBSYS.VIEW
16/06/81 09.55.42 ERCC04 DIRECTOR
16/06/81 10.12.44 ERCC04 SUBSYS.VIEW
16/06/81 10.12.44 ERCC04 LIBS
16/06/81 10.18.24 ERCM09 SUBSYS.VIEW
16/06/81 10.18.26 ERCM09 ERCLIB.LIBCONTENTS
16/06/81 10.21.39 ERCC04 SUBSYS.VIEW
16/06/81 10.21.39 ERCC04 LIBS2
16/06/81 10.27.52 ECZU09 SUBSYS.VIEW
16/06/81 10.27.52 ECZU09 T#LIST
16/06/81 10.32.12 ECZU09 SUBSYS.VIEW

==== ecslib/emas-2900/gt_view_users8.txt ====
20/07/81 20.44.17 ECSC03 ERCC27.MAILHELP
16/06/81 08.56.22 ECYU40 SUBSYS.VIEW
16/06/81 08.56.22 ECYU40 ERCC27.MAILHELP
16/06/81 09.00.16 ECYU40 SUBSYS.VIEW
16/06/81 09.00.16 ECYU40 ERCC63.PDSCREED
16/06/81 09.30.26 ERUA13 SUBSYS.VIEW
16/06/81 09.30.26 ERUA13 ERCI34.INFORMATION
16/06/81 09.31.25 ERUA13 ERUA14.INFORMATION
16/06/81 09.46.52 ERCM03 SUBSYS.VIEW
16/06/81 09.46.52 ERCM03 ERCC19.ADVISOR
16/06/81 09.55.40 ERCC04 SUBSYS.VIEW
16/06/81 09.55.42 ERCC04 DIRECTOR
16/06/81 10.12.44 ERCC04 SUBSYS.VIEW
16/06/81 10.12.44 ERCC04 LIBS
16/06/81 10.18.24 ERCM09 SUBSYS.VIEW
16/06/81 10.18.26 ERCM09 ERCLIB.LIBCONTENTS
16/06/81 10.21.39 ERCC04 SUBSYS.VIEW
16/06/81 10.21.39 ERCC04 LIBS2
16/06/81 10.27.52 ECZU09 SUBSYS.VIEW
16/06/81 10.27.52 ECZU09 T#LIST
16/06/81 10.32.12 ECZU09 SUBSYS.VIEW

==== ecslib/emas-2900/coms_edwin.txt ====
newdirectory t#edwindir,500,2000
option activedir=t#edwindir
insert conlib.edwin_imp77liby
insert conlib.edwin_missingy
insert conlib.edwin_c963y
insert conlib.edwin_catsy
insert conlib.edwin_chasy
insert conlib.edwin_down11y
insert conlib.edwin_forrtsy
insert conlib.edwin_hp2648y
insert conlib.edwin_obj
insert conlib.edwin_hqchary
insert conlib.edwin_p300y
insert conlib.edwin_hpploty
insert conlib.edwin_shapesy
insert conlib.edwin_t4000Y
insert conlib.edwin_transfy
insert conlib.edwin_pdfdecy
insert conlib.edwin_viewpdfy
insert conlib.edwin_viewrcoy
insert conlib.edwin_imp77liby

==== ecslib/emas-2900/generals_assigns.txt ====
! Procedures to emulate the VMS Logical name system on the EMAS profile system.
! J. Gordon Hughes,  April 1983

%external %routine %spec READ PROFILE (%string (11) KEY, %name INFO,
                                       %integer %name VERSION, FLAG)
%external %routine %spec WRITE PROFILE (%string (11) KEY, %name INFO,
                                        %integer %name VERSION, FLAG)
%external %routine %spec PROMPT (%string (63) TEXT)

%external %string (255) %fn TRANSLATE %alias "IMP_TRANSLATE" (%string (255) S)
   %integer VSN, FLAG
   %string (255) TX
   LENGTH(S)=11 %if LENGTH(S)>11
   READ PROFILE (S, TX, VSN, FLAG)
   %result = S %if VSN=0
   %result = TX
%end

%external %integer %function SET LOGICAL %alias "IMP_SET_LOGICAL" ( %c
                           %string(63) Lognam, Eqlnam )
   %integer VSN, FLAG

==== ecslib/emas-2900/vlsiuse_gp15.txt ====
device 7220
ident nb 5
ident ni 6

==== ecslib/emas-2900/pics_redbaron.txt ====
                                      00000
                                    00    000000
                                   00       00  0
                                 000  000000  00 0
                                0000 000000000 00 0
                              00000 00000000000 0 00                           000000000
                             00 00 000000000000  0 00                       000         000
                           00  00  0000000000000  000                     00               00
                          00   00 000000000000000 000                   00                   0
                        00     00 000000000000000 000                 00                      0
                       00      0  00000000000000  00000             00                         0
                      00       0  00000000000000  00  000        000                            0
                     00        0   0000000000000  0      000000000                               0
                     0         0   000000000000   0                                               0
                    0          0    0000000000   0                                                 0 00000
                    0          0     00000000   0      00                                          000   00
                   00           0     000000   0       000                                          0     0
                   0            0            000       0000                                         0 000  0
                  00             0         00 0        0000                                         000000 0
                  00              00     00  0          000                                          00000 0
                  0              00000000   0           000                                          0000000

==== ecslib/emas-2900/pics_venus.txt ====
     .............................................................................................................................
     .............................................................................................................................
     ................................******.......................................................................................
     .................       **. ..:....::****....................................................................................
     ...............        .:***.     .********..................................................................................
     .............           .:***:    """""""****................................................................................
     ............               ""::       ..:*****...............................................................................
     ...........                   ::   ::**********..............................................................................
     ..........                 .".:*  .::***********.............................................................................
     .........                  .:****:::::::""******.............................................................................
     .......                   .:***: .*::::::::"""***............................................................................
     ......          .......   ..::    .::::..::.::""***..........................................................................
     ......         .     ... ...      .::::..:::.::::***.........................................................................
     ......       .    ......"          .::::.::::::*::***........................................................................
     ......     .    ...  ."             .::.::****.*:****........................................................................
     ....      .       ..:               .:::::*****.::***........................................................................
     ....       .     ..:                .**.".***:*.:..**........................................................................
     ....         ... :.          ...:.. .**."***:::*::****.......................................................................
     .....     .     ..:       .:"::**:. ..***:::".::.::***.......................................................................
     ......      ....  :     ."".:.*:**:  .***""".:::::***........................................................................
     ......           .:      ::".::"*"   .:**::::*:*::**.........................................................................

==== ecslib/emas-2900/vlsiuse_gp23.txt ====
device 963

==== ecslib/emas-2900/include_maths.txt ====
! Additional Imp Maths Constants
%const %real DtoR = 57.2958
%const %real    e = 2.7182818285

==== ecslib/emas-2900/edwin_consts.txt ====
{ EDWIN constant definitions }                         %end %of %list

! Colours
%constant %byte Video Black = 0, Video White = 1
%constant %byte Blank       = 0
%constant %byte Black       = 1
%constant %byte Blue        = 2
%constant %byte Green       = 3
%constant %byte Red         = 4
%constant %byte Purple      = 5
%constant %byte Yellow      = 6
%constant %byte Lime        = 7
%constant %byte Brown       = 8
%constant %byte Turquoise   = 9

! Colour Modes
%constant %byte Replace Mode = 0
%constant %byte And Mode     = 1
%constant %byte Or Mode      = 2
%constant %byte Xor Mode     = 3
%constant %byte Invert Mode  = 4

==== ecslib/emas-2900/dcappd_dcapas.txt ====

%EXTERNALROUTINE DCAPA(%STRING(63) PAR)
%ROUTINESPEC READ LINE
%INTEGERFNSPEC COMPARE(%INTEGER PSP)
%ROUTINESPEC SS
%ROUTINESPEC FILL(%SHORTINTEGERARRAYNAME D,%INTEGER FROM,TO,VAL)
%SHORTINTEGERARRAYFORMAT SF(0:32759)
%SHORTINTEGERARRAYNAME S,ED,AD,BD,CD
%SHORTINTEGERNAME SP,EDP,ADP,BDP
%SHORTINTEGERARRAY A,NP(1:1004)
%BYTEINTEGERARRAY T(1:1000)
%SHORTINTEGERARRAY IV(0:72)   ;! ALLOWS 8 NESTING LEVELS
%SHORTINTEGER IVP
%INTEGER AP,TP,I,J,DEF,FIRSTINFO,FAULTS,ELNUM,DUMMY,DCAPFAD
%OWNINTEGER LASTLINK=11
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%SYSTEMROUTINESPEC OUTFILE(%STRING(15) S,%INTEGER LENGTH,MAX,PROT, %C
 %INTEGERNAME CONAD,FLAG)
%STRING(63) P,Q,R,TAPE
%OWNSHORTINTEGERARRAY PS(-1000:-518)= %C
-997,-933,-522,-993,-678,-811,-522,-988,   1,  58,-852,-522,

==== ecslib/emas-2900/vlsiuse_state.txt ====
version
device ?
layers ?
level ?
window ?
rotate ?
scale ?
setlam ?

==== ecslib/emas-2900/vlsiuse_cmos.txt ====
IDENT *
CA  3  1  0   2
CP  4  2  0   7
CM  2  4  0   8
CW  4  8  1   1
CS  3  7  1   3
CC  1  0  0   6
CV  1 15  0   3
CG  1 12  0   1
CD  3  1  3   7
CN  3  7  4   1
CT  1 15  0   1
ZZZ

==== ecslib/emas-2900/ispecs.txt ====
%ENDOFLIST
%REALSLONG
!
%EXTERNALROUTINESPEC READ SEQUENCE(%STRINGNAME S,%STRING(1)T)
%EXTERNALSTRINGFNSPEC TIDIED(%STRING(255)S)
%EXTERNALSTRINGFNSPEC ITOS(%INTEGER N,DP)
%EXTERNALINTEGERFNSPEC STOI(%STRING(31)S)
%EXTERNALSTRINGFNSPEC SP (%INTEGER N)
%EXTERNALSTRINGFNSPEC NEXT ITEM
%EXTERNALSTRINGFNSPEC NEXT SIG ITEM
%EXTERNALSTRINGFNSPEC SEM
!
%EXTERNALINTEGERFNSPEC NEXT SYMBOL
%EXTERNALINTEGERFNSPEC NEXT SIG SYMBOL
%EXTERNALINTEGERFNSPEC EM
!
%EXTERNALREALFNSPEC CPU TIME
%EXTERNALSTRINGFNSPEC TIME
%EXTERNALSTRINGFNSPEC DATE
%EXTERNALROUTINESPEC SKIP ITEM
%EXTERNALREALFNSPEC RANDOM REAL

==== ecslib/emas-2900/gamespd_wumpus.txt ====
%EXTERNALROUTINE WUMPUS (%STRING(255) PARMZZZ)
 %EXTERNALROUTINESPEC PROMPT(%STRING(15)S)
 %EXTERNALSTRINGFNSPEC TIME
 %INTEGERFNSPEC FNR(%INTEGER I)
 %INTEGERARRAY R(1:20,1:3),BOG(1:20)
 %ROUTINE DRAIN
  SKIP SYMBOL %WHILE NEXT SYMBOL#NL ; SKIP SYMBOL
  %END
 %INTEGERFN GETANS
  %INTEGER SYM
   SKIP SYMBOL %WHILE 'N'#NEXTSYMBOL&95#'Y'
   SYM=NEXTSYMBOL&95 ; DRAIN ; %RESULT=SYM
  %END
 %ROUTINE GET REQUEST(%INTEGERNAME SYM)
  %CYCLE
   SYM=NEXTCH
   %IF '0'<=SYM<='9' %THENEXIT
   %IF SYM='s' %OR SYM='S' %THENEXIT
  SKIPSYMBOL
  %REPEAT
  %IF SYM='s' %THEN SYM='S'

==== ecslib/emas-2900/pdp16pd_reduces.txt ====
!!!                ******   *******  ******   **   **   *****   *******   *****
!!!                **   **  **       **   **  **   **  **   **  **       **   **
!!!                **   **  **       **   **  **   **  **       **       **
!!!                ******   *****    **   **  **   **  **       *****     *****
!!!                **   **  **       **   **  **   **  **       **            **
!!!                **   **  **       **   **  **   **  **   **  **       **   **
!!!                **   **  *******  ******    *****    *****   *******   *****

!
! NEW PHRASE STRUCTURE REDUCTION PROGRAM
!
%CONTROL 0

%EXTERNALROUTINESPEC SET STREAMS(%STRING (63) S)
%CONSTINTEGER DATA IN = 1
%CONSTINTEGER DATA OUT = 2
%CONSTINTEGER ERROR OUT = 3

%EXTERNALROUTINE REDUCE(%STRING (63) FILES)
%STRING (63) INPUT, OUTPUT, REPORT
%OWNBYTEINTEGERARRAY BIPD(3 : 15)

==== ecslib/emas-2900/lisp_lispruns70.txt ====
%EXTERNALROUTINESPEC CLEAR(%STRING(63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING(63) S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER CHAN, %INTEGERNAME LENGTH)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER NO)
%EXTERNALROUTINESPEC CLOSE SM(%INTEGER NO)
%EXTERNALROUTINESPEC LISPINTP(%INTEGER FILEADDR, INITMODE)
%EXTERNALROUTINE HELP LISP
       PRINT STRING("
HANDOUT IN PREPERATION - TYPE 'LISP' TO TRY LISP
")
%END
!
%EXTERNALROUTINE LISP(%STRING(63) PARM)
%INTEGER FILEADDR, INITMODE, LENGTH
       DEFINE("STREAM02,.OUT")
       DEFINE("STREAM03,.OUT")
       PRINT STRING("
        E.C.S.D. LISP SYSTEM    RELEASE 2 VERSION 1



==== ecslib/emas-2900/pics_calender_november.txt ====




                        XXXX
                       X    XX
                      X  ***  X                XXXXX
                     X  *****  X            XXX     XX
                  XXXX ******* XXX      XXXX          XX
                XX   X ******  XXXXXXXX                 XX XXX
              XX      X ****  X                           X** X
             X        XX    XX     X                      X***X
            X         //XXXX       X                      XXXX
           X         //   X                             XX
          X         //    X          XXXXXXXXXXXXXXXXXX/
          X     XXX//    X          X
          X    X   X     X         X
          X    X    X    X        X
           X   X    X    X        X                    XX
           X    X   X             X                 XXX  XX
            X    XXX      X        X               X  X X  X

==== ecslib/emas-2900/edwin_doc.txt ====

















                                                THE

                                             E D W I N


==== ecslib/emas-2900/oldgeneraly_assignment.txt ====

   The facilities described below implement the VMS logical name system using
the EMAS profile scheme.  On EMAS the logical names are only significant for
the first 11 characters (cf.127 on VMS).  All the strings are converted to
upper case before they are stored or translated.

!< ASSIGN

   ASSIGN <text>,<log-name>

   This assigns the string <text> to the logical name <log-name>.
   If the parameters are omitted then they are prompted for.
   The message 'Previous logical name assignment replaced' is given if the
   logical name was defined before it was re-set.

   eg.  ASSIGN TTYPE=11,VISUAL200

!>
!< DEASSIGN

   DEASSIGN <log-name>

==== ecslib/emas-2900/pdp16pd_womble.txt ====
!**           **   **   *****   *     *  ******   **       *******
!**           **   **  **   **  **   **  **   **  **       **
!**           **   **  **   **  *** ***  **   **  **       **
!**           **   **  **   **  ** * **  ******   **       *****
!**           ** * **  **   **  **   **  **   **  **       **
!**           *** ***  **   **  **   **  **   **  **       **
!**            *   *    *****   **   **  ******   *******  *******
!**










!*****************************************************************
!*****************************************************************
!**                                                             **

==== ecslib/emas-2900/newsims.txt ====







%CONSTSHORTINTEGERARRAY SMAIN(1: 141) = %C
    1,    0,    4,    8,   12,   15,   19,   25,   30,   35,   39,   43,
   47,   50,   54,   58,   63,   69,   74,   79,   84,   88,   92,   96,
  100,  104,  108,  112,  115,  116,  120,    0,  122,  125,    0,  128,
  131,    0,  135,  137,    0,  139,  141,    0,  143,  147,    0,  149,
  154,    0,  156,    0,  159,  164,    0,  166,  169,    0,  171,  174,
  177,  180,  183,  186,    0,  189,  194,    0,  196,  198,    0,  200,
  202,    0,  204,  207,  210,    0,  213,  215,    0,  217,  221,  222,
  225,  226,  230,    0,  232,  238,  242,    0,  245,  249,  253,  260,
    0,  262,    0,  265,  268,    0,  270,  273,  276,  279,    0,  282,
  286,  289,  292,  295,  298,    0,  300,  305,    0,  307,  310,  313,
    0,  316,  322,    0,  324,    0,  330,  335,    0,  337,  340,  343,
  346,  349,  352,  355,    0,  358,  360,  363,    0
%CONSTSHORTINTEGERARRAY SSUB(2: 365) = %C

==== ecslib/emas-2900/include_util.txt ====
! Useful pre-definitions for portable Imp programs

%external %routine         %spec Prompt (%string (63) STR)
%external %string (15) %fn %spec Date
%external %string (15) %fn %spec Time
%dynamic %string (255) %fn %spec ItoS  %alias "IMP_I_TO_S" (%integer I, P)
%dynamic %string (255) %fn %spec RtoS  %alias "IMP_R_TO_S" (%long %real R,
                                                            %integer A, B)
%dynamic %integer %fn      %spec StoI  %alias "IMP_S_TO_I" (%string (255) S)
%dynamic %integer %fn      %spec REM   %alias "IMP_REM"    (%integer A, B)
%dynamic %routine          %spec DOING %alias "IMP_DOING"  (%string (255) S)

! Lattice Imp stream handling facilities

%dynamic %routine %spec Open Input  %alias "IMP_OPEN_INPUT" (%integer S,
                                                             %string (255) ST)
%dynamic %routine %spec Close Input %alias "IMP_CLOSE_INPUT"
%dynamic %routine %spec Reset Input %alias "IMP_RESET_INPUT"
%dynamic %integer %fn %spec Input Stream %alias "IMP_INPUT_STREAM"
%dynamic %string (255) %fn %spec Input Name %alias "IMP_INPUT_NAME"


==== ecslib/emas-2900/pics_calender_october.txt ====





                   ***
                 ******
               *        *
              *          *
              *          *        *****
             *           *     *         *
             *          *     *           *      ****
             *          **   *             *   **  * *
            * OO      *  ++          *    **        *
           *         *      ++               *    **    *
          *                 ++                ***  ******
          *                 ++  *********               *
          *                 ++           *              *
            **   ***        ++*******     *******       *
   XXXXXXXXXXX**++++********++XXXXXXX*  **XXXXXXX*******XXXXXXXXXXXXXXXX
   X           ++++++                 **                                X

==== ecslib/emas-2900/instrdef.txt ====
! NMEMONIC  CODE  SIZE  GROUP  NO OF OPS  OP GROUP
     STC     063    1      0      0         0
     CMC     073    1      0      0         0
     INR     004    1      1      1         1       ! REG
     DCR     005    1      1      1         1       ! REG
     CMA     057    1      0      0         0
     DAA     047    1      0      0         0
     NOP     000    1      0      0         0
     MOV     100    1      5      2         6       ! DST-SRC
    STAX     002    1      1      1         5       ! SHORT REG PAIR
    LDAX     012    1      1      1         5       ! SHORT REG PAIR
     ADD     200    1      2      1         1       ! REG
     ADC     210    1      2      1         1       ! REG
     SUB     220    1      2      1         1       !REG
     SBB     230    1      2      1         1       ! REG
     ANA     240    1      2      1         1       ! REG
     XRA     250    1      2      1         1       ! REG
     ORA     260    1      2      1         1       ! REG
     CMP     270    1      2      1         1       ! REG
     RLC     007    1      0      0         0
     RRC     017    1      0      0         0

==== ecslib/emas-2900/lisp_release.txt ====
IMP LISPSPDF_LISPRUNS,LISPRUNY
PERMIT LISPRUNY,,RS
IMP LISPSPDF_LISPV09S,LISPV09Y
PERMIT LISPV08Y,,RS
COPY LISPSPDF_INITLSP8,INITLISP
PERMIT INITLISP,,RS

==== ecslib/emas-2900/pics_calender_february.txt ====




                                ##########
                             ####         ####
                          ###                 ##
                       ###                     ##
                     ##      ######               ##
                    #      ##                       #
                   #      #                          #
                  #       #      ##      #            #
                 #         ##  ##  ##  ##             #
                 #          $##       ##              #
                #     #                  ##            #
                #      #      ####         #           #
               #      #    OO #      OO     #          ##
               #      #      #            #           #  #
               #      #       ###                         #
               #                                         #
                #                                     ###

==== ecslib/emas-2900/pics_calender_january.txt ====


                                         ********
                                     ****      ***
                                   **             *
                                 **  ***           *
                   **************  *    *           *
                ***                *    *             *
              **                  **   **             *
             *                    **   **             *
            *                     **   **      ******  *
           *           ******                ********  *
          *           ********              **********  *
          *            ******              ************ *
          *                               ************* *
          *                           *   ************* *
           *       *                 * *  ************* *
            *     * *               *  * ************** *
             **   *  ***          ** * * ************** *
               ******   ***********   ** ************** *
                   ***  *    *  *  ***   ************* *

==== ecslib/emas-2900/include_lognames.txt ====

%external %integer %function %spec SET LOGICAL %alias "IMP_SET_LOGICAL" ( %c
          %string (63) Lognam, Eqlnam )

%external %string (255) %function %spec Translate %alias "IMP_TRANSLATE" ( %c
          %string (255) S )

==== ecslib/emas-2900/generals_whichemas.txt ====
! Program to inform you which EMAS it is running on, (2900 range).

%EXTERNAL %ROUTINE WHICHEMAS (%STRING(255) PARM)
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,RATION,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)
%CONSTSTRING (4) %ARRAY OCPTYPE(1 : 6) =  "2950","2960","2970",
     "2988","2972","2976"
%RECORD (COMF) %NAME R

==== ecslib/emas-2900/gamespd_briggs.txt ====
%CONTROL 0

%DYNAMICROUTINESPEC CLEAR(%STRING(255)K)
%DYNAMICROUTINESPEC DEFINE(%STRING(255)K)
%EXTERNAL %ROUTINE %SPEC DESTROY (%STRING(255) PARM)
%EXTERNALROUTINESPEC PROMPT(%STRING(15)S)


%ROUTINE  SELECT (%STRING(255)K)
   %STRING(255) S
   %RETURNIF SEL= 1
   SEL = 1
   PRINTSTRING("Parameters ? - LP'S only.
")%ANDSTOPUNLESS K->(".LP").S
   DEFINE("39,".K)
   SELECTOUTPUT(39)
%END

%ROUTINE STARCOMM
   PRINTSTRING('The possible commands are designated by the
following numbers and code words.

==== ecslib/emas-2900/lisp_lispman1.txt ====
$A TAB=4,8,12,16,20,24,28,50,66; INDENT=8
$B3 $L1ICU
DRAFT
$B20 $L1CM
THE E.C.S.D LISP MANUAL
$B29 $L3I
.N. .H. @SHELNESS

@DECEMBER, 1976
$N
$A INDENT=0; JUST=1; PAGENO=1
$L1CU
1.0 INTRODUCTION
$P2 @THIS MANUAL IS A BRIEF INTRODUCTION TO THE @EDINBURGH @COMPUTER @SCIENCE
@DEPARTMENT .(ECSD) .LISP .SYSTEM RUNNING ON .EMAS. @IT IS NOT INTENDED AS AN
INTRODUCTION TO .LISP. @THERE ARE A NUMBER OF REFERENCES LISTED IN THE
BIBLIOGRAPHY THAT WILL FULFILL THAT FUNCTION.
$P1 .ECSD .LISP WAS IMPLEMENTED BY THE AUTHOR FOR UNDERGRADUATE STUDENT
USE, AND ITS STRUCTURE REFLECTS THIS FACT. @IT IS A RELATIVELY 'PURE'
IMPLEMENTATION IN WHICH FUNCTIONS ARE DEFINED OVER MORE LIMITED DOMAINS
THAN IS OFTEN THE CASE, AND IN WHICH EXTENSIVE ERROR CHECKING ENFORCES

==== ecslib/emas-2900/gamespd_mastmind.txt ====
%EXTERNALROUTINE MASTMIND (%STRING (255) PSTZ)
%EXTERNAL %ROUTINE %SPEC PROMPT (%STRING(255) ST)
%EXTERNAL %LONG %REAL %FN %SPEC CPUTIME
%EXTERNAL %LONG %REAL %FN %SPEC RANDOM REAL
%CONST %STRING (1) SNL="
"
%RECORDFORMAT RFM1 (%INTEGERARRAY SET(1:4), %INTEGER PTR)
%RECORDFORMAT RFM2 (%INTEGERARRAY HOLE(1:4) ,%INTEGER BL,WH)
%RECORDARRAY ROW (1:10) (RFM2)
%RECORDARRAY BASE (1:1296) (RFM1)
%OWNINTEGER  PERSONSCORE,COMPSCORE,FIRSTP,LASTP,POSS,FAULTY
%OWNINTEGER SRN,NF1,NF2,MATCH,CRITICAL,GWBW
!
! ********** ___ ROUTINE SECTION ___ **********
! 
! ***** THE ROUTINE MARK IS ONE OF THE MAIN GAME PLAYING
! FEATURES OF MASTERMIND,GIVING THE VITAL INFORMATION TO
! THE CODEBREAKER ABOUT THE COMPARISON BETWEEN THE TRIAL
! CODE AND THE HIDDEN CODE. MARKED AS FOLLOWS---
! 1 BLACK -- 1 NUMBER IN CORRECT HOLE.
! 1 WHITE -- 1 NUMBER IN WRONG HOLE. *****

==== ecslib/emas-2900/pdp16pd_pdpdumps.txt ====
!!!                ******   ******   ******   ******   **   **  *     *  ******    *****
!!!                **   **  **   **  **   **  **   **  **   **  **   **  **   **  **   **
!!!                **   **  **   **  **   **  **   **  **   **  *** ***  **   **  **
!!!                ******   **   **  ******   **   **  **   **  ** * **  ******    *****
!!!                **       **   **  **       **   **  **   **  **   **  **            **
!!!                **       **   **  **       **   **  **   **  **   **  **       **   **
!!!                **       ******   **       ******    *****   **   **  **        *****

%CONTROL 0

%OWNSTRING (15) OUTPUT = '.TT'
%OWNSTRING (15) SOURCE = 'SS#ARTH'
%CONSTSTRING (6) %ARRAY OPCODES(0 : 15) =     %C
'NOP   ', 'EVOKE ', 'BUS   ', 'COND  ',
'MERGE ', 'RTCALL', 'RETURN', 'JUMP  ',
'STOP  ', 'BRANCH', 'T-LINE', 'BREAK', ' CONT',' CMRGE','+FLAG ',
'UNDEF '
%CONSTINTEGER NMAX = 100
%RECORDFORMAT EXTERNFM(%BYTEINTEGER FROM, FBITS, TO, TOBITS)
%CONSTINTEGER EXTLNG = 100
%RECORDFORMAT CODEFM(%BYTEINTEGER CODE, NAME, OPRN, MODULE,  %C

==== ecslib/emas-2900/vlsiuse_x5a.txt ====
device 5555
ident c 0
ident i 6

==== ecslib/emas-2900/edwin_newdir.txt ====
newdirectory t#edwindir,500,2000
option activedir=t#edwindir
insert edwin_missingy
insert edwin_c963y
insert edwin_catsy
insert edwin_chasy
insert edwin_forrtsy
insert edwin_hp2648y
insert edwin_obj
insert edwin_hqchary
insert edwin_p300y
insert edwin_hpploty
insert edwin_shapesy
insert edwin_t4000Y
insert edwin_viewrcoy
insert conlib.edwin_viewpdfy
insert ecslib.generaly_imp77liby
insert erclib.graphicsy_rcoplot12y
insert erclib.graphicsy_matplot11y
insert erclib.graphicsy_extras12y
insert erclib.graphicsy_rcoctal12y

==== ecslib/emas-2900/lisp_lispruns.txt ====
%EXTERNALROUTINESPEC CLEAR(%STRING(63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINESPEC NEWSMFILE(%STRING(63) S)
%EXTERNALINTEGERFNSPEC SMADDR(%INTEGER CHAN, %INTEGERNAME LENGTH)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER NO)
%EXTERNALROUTINESPEC CLOSE SM(%INTEGER NO)
%EXTERNALROUTINESPEC LISPINTP(%INTEGER FILEADDR, INITMODE)
%EXTERNALROUTINE HELP LISP
       PRINT STRING('
HANDOUT IN PREPERATION - TYPE ''LISP'' TO TRY LISP
')
%END
!
%EXTERNALROUTINE LISP(%STRING(63) PARM)
%INTEGER FILEADDR, INITMODE, LENGTH
       DEFINE('STREAM02,.TT')
       DEFINE('STREAM03,.TT')
       PRINT STRING('
        E.C.S.D. LISP SYSTEM    RELEASE 2 VERSION 1



==== ecslib/emas-2900/edwin_pconsts.txt ====
{ EDWIN constant definitions }

{ Colours }
VideoBlack = 0;
VideoWhite = 1;
Blank      = 0;
Black      = 1;
Blue       = 2;
Green      = 3;
Red        = 4;
Purple     = 5;
Yellow     = 6;
Lime       = 7;
Brown      = 8;
Turquoise  = 9;

{ Colour Modes }
ReplaceMode = 0;
AndMode     = 1;
OrMode      = 2;
InvertMode  = 3;

==== ecslib/emas-2900/fromjgh.txt ====
copy ecsc17.EDWIN_DDBBCY,ECSLIB.ED_DDBBCY
copy ecsc17.EDWIN_DDCALRCOY,ECSLIB.ED_DDCALRCOY
copy ecsc17.EDWIN_DDCATSY,ECSLIB.ED_DDCATSY
copy ecsc17.EDWIN_DDCHASY,ECSLIB.ED_DDCHASY
copy ecsc17.EDWIN_DDGIGIY,ECSLIB.ED_DDGIGIY
copy ecsc17.EDWIN_DDGP300Y,ECSLIB.ED_DDGP300Y
copy ecsc17.EDWIN_DDHPPLOTY,ECSLIB.ED_DDHPPLOTY
copy ecsc17.EDWIN_DDERCCHPY,ECSLIB.ED_DDERCCHPY
copy ecsc17.EDWIN_DDHPTERMY,ECSLIB.ED_DDHPTERMY
copy ecsc17.EDWIN_DDP300Y,ECSLIB.ED_DDP300Y
copy ecsc17.EDWIN_DDSIGMAY,ECSLIB.ED_DDSIGMAY
copy ecsc17.EDWIN_DDTEKY,ECSLIB.ED_DDTEKY
copy ecsc17.EDWIN_DDWESTWY,ECSLIB.ED_DDWESTWY
copy ecsc17.EDWIN_DDX5AY,ECSLIB.ED_DDX5AY
copy ecsc17.EDWIN_EDCONFIGY,ECSLIB.ED_EDCONFIGY
copy ecsc17.edwin_edwin5y,ecslib.ed_edwin5y
copy ecsc17.edwin_fintery,ecslib.ed_fintery
copy ecsc17.edwin_pintery,ecslib.ed_pintery
copy ecsc17.edwin_pshapesy,ecslib.ed_pshapesy

==== ecslib/emas-2900/pics_calender_horse.txt ====


                                         ********
                                     ****      ***
                                   **             *
                                 **  ***           *
                   **************  *    *           *
                ***                *    *             *
              **                  **   **             *
             *                    **   **             *
            *                     **   **      ******  *
           *           ******                ********  *
          *           ********              **********  *
          *            ******              ************ *
          *                               ************* *
          *                           *   ************* *
           *       *                 * *  ************* *
            *     * *               *  * ************** *
             **   *  ***          ** * * ************** *
               ******   ***********   ** ************** *
                   ***  *    *  *  ***   ************* *

==== ecslib/emas-2900/vlsiuse_tek.txt ====
device 4012


==== ecslib/emas-2900/lisp_initlsp6.txt ====
NIL
QUOTE 2 0
LABEL 0 0
LAMBDA 0 0
APVAL 0 0
SUBR 0 0
FSUBR 0 0
EXPR 0 0
FEXPR 0 0
STOP 0 0
EVAL 0 0

CAR 6 1
CDR 6 2
CAAR 6 3
CADR 6 4
CDAR 6 5
CDDR 6 6

CONS 6 7
LIST 6 8

==== ecslib/emas-2900/lisp_initlsp7.txt ====
NIL
QUOTE 2 0
LABEL 0 0
LAMBDA 0 0
APVAL 0 0
SUBR 0 0
FSUBR 0 0
EXPR 0 0
FEXPR 0 0
STOP 0 0
EVAL 0 0

FUNCTION 2 0
CAR 6 1
CDR 6 2
CAAR 6 3
CADR 6 4
CDAR 6 5
CDDR 6 6

CONS 6 7

==== ecslib/emas-2900/lisp_initlsp8.txt ====
NIL
QUOTE
LABEL
LAMBDA
APVAL
SUBR
FSUBR
EXPR
FEXPR
STOP
EVAL
END/ OF/ PEEK

QUOTE 0 FSUBR
FUNCTION 0 FSUBR
CAR 1 SUBR
CDR 2 SUBR
CAAR 3 SUBR
CADR 4 SUBR
CDAR 5 SUBR
CDDR 6 SUBR

==== ecslib/emas-2900/lisp_initlsp9.txt ====
NIL
QUOTE
LABEL
LAMBDA
APVAL
SUBR
FSUBR
EXPR
FEXPR
STOP
EVAL
END/ OF/ PEEK

QUOTE 0 FSUBR
FUNCTION 0 FSUBR
CAR 1 SUBR
CDR 2 SUBR
CAAR 3 SUBR
CADR 4 SUBR
CDAR 5 SUBR
CDDR 6 SUBR

==== ecslib/emas-2900/oldgeneraly_newusers.txt ====

   NEWUSERS usermask,form,mode

This lists the current EMAS users.   The names that are given are
derived from the Mailer program, and 'guesses' are made for those that
are not known.

USERMASK can be any 6 characters of mask, only users matched with the mask
         are listed.  For example a mask of "E??U??" will only list the
         Edinburgh student users.   Trailing '?'s may be omitted.
         The default mask is all users.

FORM     this can be N (normal, (default)) or B (brief) or V (very brief),
         which selects how much information is given.

MODE     can be any combination of the letters F, B and S for Fore ground,
         Batch and System users, respectivly.   The default is F.

eg.   NEWUSERS   or   NEWUSERS ,,FBS   or   NEWUSERS ,B   or   NEWUSERS ER????

==== ecslib/emas-2900/edwin_ptypes.txt ====
{ TYPE definitions for using EDWIN from Pascal }

     pointfm = record
                x, y : integer
              end;

     transfm = array [0..8] of real;

==== ecslib/emas-2900/generals_userutils.txt ====
!TITLE  Source of S#FOR ALL USERS
!<
%RECORDFORMAT comf(%INTEGER ocptype,ipldev,sblks,sepgs,ndiscs,  %C
                             ddtaddr,gpctabsize,gpca,sfctabsize,sfca,sfck,dirsite,  %C
                             dcodeda,suplvn,wasklokcorrect,date0,date1,date2,  %C
                             time0,time1,time2,epagesize,users,cattad,dqaddr,  %C
                             sacport,ocpport,itint,contypea,gpcconfa,fpcconfa,sfcconfa,%C
                             blkaddr,dptaddr,smacs,trans,  %C
                   %LONGINTEGER kmon,  %C
                   %INTEGER ditaddr,smacpos,supvsn,pstva,secsfrmn,secstocd,%C
                             sync1dest,sync2dest,asyncdest,maxprocs,inspersec,elaphead,%C
                             commsreca,storeaad,procaad,sfcctad,drumtad,sp0,sp1,sp2,sp3,%C
                             sp4,sp5,sp6,sp7,sp8,sp9,%C
                             lstl,lstb,pstl,pstb,hkeys,hoot,sim,clkx,clky,clkz,  %C
                             hbit,slaveoff,inhssr,sdr1,sdr2,sdr3,  %C
                             sdr4,sesr,hoffbit,s2,s3,s4,end)


%RECORDFORMAT procf(%STRING(6) user,  %C
                    %BYTEINTEGER incar,category,wsn,runq,active,%C
                    %INTEGER actwo,lstad,lamtx,stack,status)

==== ecslib/emas-2900/enter.txt ====
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!                                                                      !
!          HOUSEKEEPING ROUTINES FOR CSDEPT                            !
!                                                                      !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                    !
%OWNSTRING (1)  SNL='
'
%EXTERNALROUTINESPEC NEWPDFILE (%STRING (63) S)
%EXTERNALROUTINESPEC CLOSE STREAM (%INTEGER I)
%EXTERNALROUTINESPEC COPYFILE (%STRING (63) S)
%EXTERNALROUTINESPEC DESTROY (%STRING (63) S)
%EXTERNALROUTINESPEC PERMITFILE (%STRING (63) S)
%EXTERNALROUTINESPEC PERMITLIB (%STRING (63) S)
%EXTERNALROUTINESPEC PROMPT (%STRING (15) S)
%EXTERNALROUTINESPEC CHERISH (%STRING (63) S)
%EXTERNALROUTINESPEC USERLIB (%STRING(63) S)
%EXTERNALROUTINESPEC INSERTFILE (%STRING (63) S)
%EXTERNALROUTINESPEC ARCHIVE (%STRING (63) S)
%EXTERNALINTEGERFNSPEC SSFAIL
%EXTERNALROUTINESPEC SSFOFF

==== ecslib/emas-2900/gamespd_poker.txt ====
%EXTERNALROUTINE DICE
  %RECORDFORMAT Q(%INTEGER CARD,TIMES)
  %RECORDARRAY YOURHAND,MYHAND(0:5)(Q)
  %CONSTSTRING(5)%ARRAY HOLD(0:5)="Ace","King","Queen",
                                  "Jack","10","9"
  %CONSTSTRING(2)%ARRAY HOL (0:5)="A","K","Q","J","10","9"
  %OWNINTEGER FSA=3
  %CONSTSTRING(3) ME="I", YOU="you"
  %INTEGER YOURLOT,MYLOT,YOURCARD,MYCARD,PLAY
  %STRING(120) SEQ
  YOURLOT=1
  %ROUTINE CHEAT
    %INTEGER I
    %CYCLE I=1,1,5
      PRINTSTRING(SP(20)."*** CHEAT ***".SNL)
    %REPEAT
  %END
  %ROUTINE WAIT
    PROMPT("Ok?  :")
    READSEQUENCE(SEQ,SNL)
  %END

==== ecslib/emas-2900/lpd_hlaydcls.txt ====
$A MARK=2
$A PAGENO=1; JUST=1
$A TAB=12,20,28
$L1CUM
LAYOUT: DOCUMENT PRODUCTION PROGRAM


$P2 @THE BASIC FUNCTION OF .LAYOUT IS TO PRODUCE AN APPROPRIATELY PAGED AND
FORMATTED DOCUMENT FROM A SOURCE FILE IN WHICH THE REQUIRED LAYOUT IS
INDICATED BY %DIRECTIVES INTERSPERSED WITH THE TEXT; IN GENERAL, THE
SPACING AND LINE-STRUCTURE OF THE SOURCE ARE NOT SIGNIFICANT. @A
SECONDARY FUNCTION IS TO OUTPUT AN UPDATED SOURCE FILE SIMILAR TO THE
ORIGINAL EXCEPT THAT THE LINE-STRUCTURE FOLLOWS THAT OF THE FORMATTED
DOCUMENT (SUBJECT TO LIMITATIONS OF LINE LENGTH).
$P @IN ADDITION THE PROGRAM OPTIONALLY PROVIDES FOR THE APPLICATION OF
SHIFT CONVENTIONS TO THE SOURCE (AND UPDATED SOURCE) TO PERMIT THE
REPRESENTATION OF UPPER AND LOWER CASE LETTERS AND UNDERLINED CHARACTERS
WITHIN A RESTRICTED CHARACTER SET. @CODE CONVERSION IS UNDERSTOOD TO BE
CARRIED OUT OUTSIDE THE LAYOUT PROGRAM PROPER, WHICH USES A CHARACTER
SET IN WHICH BOTH UPPER AND LOWER CASE LETTERS AND UNDERLINED CHARACTERS
ARE REPRESENTED BY SINGLE CODES. @THIS CHARACTER SET IS FULL .ASCII

==== ecslib/emas-2900/pics_abraham.txt ====



           The Story of Abraham (A folk-tale).
           ===================================
                                                (Anonymous)


  "Speaking of prostitutes,"said Abraham,"how is the Queen?"
The King,taking this as an insult,banished Abraham to the desert for
forty years.

  Whilst wandering through one particularly nice part,all the while 
considering his good fortune to be sent somewhere where umbrellas were
unnecessary,he chanced upon a very small girl with very short legs
and very low morals.
  "Canst thou fuck,Abraham?"quoth she.
  "Like a duck can swim!"replied Abraham,and set about it with a will.

  Some (9) months later he again happened to be in that very same part
of the desert where the weather was so kind,and,as fortune would have

==== ecslib/emas-2900/newcont.txt ====
$A MARK=2
$A TAB=20,38,54
.%PROGRAM$ NAME $T1
.%LIBRARY$/PROGRAM $T2
.%ORIGINATOR $C52
.%DOCUMENTATION$ SOURCE $B
.ARTHUR $T1
.CSDEPT.PDP16LIB $T2
@P.@S.@ROBERTSON $T3
@DEPARTMENTAL @REPORT $B
@COMPATIBLE @CONTEXT$T1
.CSDEPT.EDLIB$T2
@H.@DEWAR$T3
@DEPARTMENTAL @REPORT $B
@EDITOR $B
@INTERDATA $T1
.CSDEPT.ISKMPLIB $T2
@D.@J.@REES $T3
@D.@J.@REES $B0
.SKIMP $B
.IMP @INTERPRETER $T1

==== ecslib/emas-2900/gamespd_backgdoc.txt ====






















==== ecslib/emas-2900/pics_brigitte.txt ====




















MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

==== ecslib/emas-2900/intsyss.txt ====

!
!*******************************************************************
!*                                                                 *
!*       SYSTEM ROUTINES FOR IMP INTERPRETER VERSION 8             *
!*                                                                 *
!*******************************************************************
!
!
%TRUSTEDPROGRAM
%RECORDFORMAT AGFM(%INTEGER EP, %STRING (17) NAME,  %C
          %INTEGER P1, P2, %INTEGERNAME FLAG)
%EXTERNALINTEGER INTSIZE = 16;          ! DEFAULT OF 16 PAGES
%EXTERNALBYTEINTEGER INIMPI = 0
%EXTERNALINTEGER INTGLA = 0
%OWNSTRING (6) INT OWNER = 'CONLIB'
%EXTERNALSTRING (8) OBJECT = 'IMPIOBJ'
%EXTRINSICBYTEINTEGER INSTREAM, COMPMODE, IOFLAG, MDACTIVE
%SYSTEMINTEGERFNSPEC COMREG(%INTEGER N);! TO GIVE ADDRESSES
%EXTERNALINTEGER REG9 = -1
%OWNINTEGER DIAGPT, OUTSTREAM, SYSOUT, INTPERM

==== ecslib/emas-2900/generals_vaxs.txt ====
! FTP Utilities for using VAX/VMS from EMAS.
! Must be compiled PARM FREE with the IMP80 compiler

%const %string (1) SNL = "
"
%systemroutinespec OUTFILE(%string(31) NAME,
   %integer LEN, MAX, PROT, %integername CONAD, FLAG)
%record %format RF (%integer CONAD, FILETYPE, DATA START, DATA END)
%system %routine %spec CONNECT (%string(31) S,
   %integer ACCESS, MAXBYTES, PROT, %record(rf)%name R, %integername FLAG)
%system %string (255) %fn %spec FAILURE MESSAGE (%integer FLAG)
%system %routine %spec PSYSMES (%integer ROOT, FLAG)
%external %routine %spec LIST (%string (255) PARM)
%external %routine %spec TRANSFER (%string (255) PARM)
%external %routine %spec PROMPT (%string(63) PSTR)
%external %routine %spec SETMODE (%string(255) MODES)
%external %routine %spec DEFINE (%string(255) PARM)
%external %routine %spec CLEAR (%string (255) ALL)
%external %routine %spec ASSIGN (%string (255) PARM)
%external %string (255) %fn %spec TRANSLATE (%string (255) STR)
%external %string (255) %fn %spec UINFS (%integer I)

==== ecslib/emas-2900/gamespd_fantasy.txt ====
!program to run FANTASY

%external %routine %spec run (%string (255) file)

%externalroutine fantasy (%string (255) rubarb)

 run ("ECSLIB.GAMEPD_FANTASY")
%end
%endoffile

==== ecslib/emas-2900/generals_pdaddrs.txt ====
!TITLE Source of S#PDADDR
!<
%RECORD %FORMAT connect fm(%INTEGER start address, %C
                                    type, %C
                                    relative start, %C
                                    relative finish)
!)
%SYSTEM %ROUTINE %SPEC CONNECT(%STRING(31) file, %C
                               %INTEGER mode, %C
                                        hole, %C
                                        protection, %C
                               %RECORD (connect fm) %NAME info, %C
                               %INTEGER %NAME flag)

%RECORD %FORMAT header fm(%INTEGER relative finish, %C
                                   relative start, %C
                                   size, %C
                                   type, %C
                                   sum, date time, %C
                                   directory start, %C
                                   count)

==== ecslib/emas-2900/vlsiuse_slides.txt ====
size 19 25 1 1
speed 10


==== ecslib/emas-2900/gamespd_backgs.txt ====
%EXTERNALROUTINE BACKGAMMOM (%STRING(255) ST)
 %OWNINTEGER BBOFF,WBOFF,DICE1,DICE2,BARFL,BRDVAL,BSTVAL,COMPVAL
 %OWNINTEGER M1,M2,M3,M4,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,I,J,K,RUNNING
 %OWNINTEGER NOMOV,BARPT1,BARPT2,PT1,PT2,L,M,N,TEMP,BSTMOV1,BSTMOV2
 %OWNINTEGER BSTPT1,BSTPT2,W1,W2,W3,W4,W5,W6,W7,W8,W9,W10
 %OWNINTEGER SECOND,BV1,BV2,BV3,BV4,BV5,BV6,BV7,BV8,BV9,BV10
 %CONSTINTEGERARRAY ODDS(1:12)=35,38,44,47,47,53,18,21,15,12,6,9
 %RECORDFORMAT F(%INTEGER WS,BS)
 %OWNRECORDARRAY BOARD(0:25)(F)
 %OWNINTEGER G,H,PT3,PT4,DICE3,DICE4,BSTPT3,BSTPT4,BARPT3,BARPT4
 %INTEGERFN HOMEB
 %INTEGER NO,I
 NO=BBOFF
 %CYCLE I=1,1,6
     NO=NO+BOARD(I)_BS
 %REPEAT
 %IF NO=15 %THENRESULT = 1 %ELSERESULT = 0
 %END

 %ROUTINE DOBLACK
 %INTEGER PT,NO,M,D1,D2,D3,D4,TOT

==== ecslib/emas-2900/edwin_geo.txt ====
{ NB: Specs for Version 4 of EDWIN :  See ECSLIB.EDWIN_SHAPES for latest info }

{ EDWIN Geometric utility routines added }   %end %of %list

%external %routine %spec SHADE SHAPES   %alias "EDWIN_SHADE_SHAPES"    (%integer ON or OFF)
%external %routine %spec SET ARC POINTS %alias "EDWIN_SET_ARC_POINTS"  (%integer I)
%external %routine %spec CIRCLE         %alias "EDWIN_CIRCLE"          (%integer RAD)
%external %routine %spec RECTANGLE      %alias "EDWIN_RECTANGLE"       (%integer XL, YL, XU, YU)
%external %routine %spec BOX            %alias "EDWIN_BOX"             (%integer L, W, %record (POINTFM) %name C, D)
%external %routine %spec WIRE           %alias "EDWIN_WIRE"            (%integer W, N, %record (POINTFM) %array %name P)
%external %routine %spec POLYGON        %alias "EDWIN_POLYGON"         (%integer NUM E, %record (POINTFM) %array %name AP)

%list
%end %of %file

==== ecslib/emas-2900/pdp16pd_simps.txt ====

B[CONSTANT]=3
B[NAME]=4
B[NAMELIST]=5
B[SEPERATOR]=8

L<PADDING> = 0
L<THERE> = 1
L<MISSING> = 0
D[OLD NAME]=[NAME=1]
D[OLD NAME LIST] = [NAMELIST=1]


P(STAT)
      (SS) [SEPERATOR];

P(SS)
      '%CONTINUE' <1> (REPEAT COUNT'):
        ':' <1> (REPEAT COUNT'):
      '%GO' <3>:
      '%TRACE' <4>(ON/OFF):

==== ecslib/emas-2900/gamespd_oxos.txt ====
! OXOS         (Now in IMP80, with graph mode fixed JGH 4.82)

%EXTERNAL %ROUTINE %SPEC TERMINATE
%EXTERNAL %ROUTINE %SPEC PROMPT(%STRING(19) S)
%SYSTEM %ROUTINE %SPEC CONSOLE(%INTEGER EP, %INTEGER %NAME AD, LEN)
%EXTERNAL %STRING(8) %FN %SPEC TIME
!
%ROUTINE OXO GUTS(%ROUTINE CLEAR LINE, %routine  MOVE (%integer X, Y))
!
%INTEGER I, SEED, AD, MODE
%INTEGER %ARRAY SQ(1:9)
%OWN %INTEGER WCT, DCT
%CONST %INTEGER X = 1, O = 4
%CONST %STRING(5) %ARRAY HT(1:2) = "TAILS", "HEADS"
!
%STRING(8) TEMP;   TEMP = TIME
SEED = (CHARNO(TEMP,7)*10+CHARNO(TEMP,8))&1023
!
%INTEGER %FN RANDOM(%INTEGER MAX)
%INTEGER I
SEED = (741*SEED+216)&1023

==== ecslib/emas-2900/lpd_hlaydoc.txt ====


                  ___________________________________

                  LAYOUT: DOCUMENT PRODUCTION PROGRAM


   The basic function of LAYOUT is to produce an appropriately paged and
formatted document from a source file in which the  required  layout  is
indicated  by  __________

               directives  interspersed  with  the text; in general, the
spacing and  line-structure  of  the  source  are  not  significant.   A
secondary  function  is  to output an updated source file similar to the
original except that the line-structure follows that  of  the  formatted
document (subject to limitations of line length).

   In  addition  the  program optionally provides for the application of
shift conventions to the source  (and  updated  source)  to  permit  the
representation of upper and lower case letters and underlined characters
within a restricted character set.   Code conversion is understood to be
carried out outside the layout program proper, which  uses  a  character
set in which both upper and lower case letters and underlined characters
are  represented  by  single  codes.   This  character set is full ASCII
extended to 8 bits, with the eighth bit signifying underlining,  and  it

==== ecslib/emas-2900/lpd_pls.txt ====

!****************** VERSION DATED 27/9/77 ****************************
!*
!*      * $VM$BN NOW WORKS IN ALL CASES - N  BLANK LINES NOW SENT TO
!*        OUTPUT FILE AFTER PAGE TURN CAUSED BY $V.
!*      * 'READ ATOM OR DIRECTIVE' REWRITTEN.  ESC GIVEN PRIORITY.
!*        SYMBOL PARAMETERS CANNOT BE LETTERS.
!*        CAP, CAPSH, UND, UNDSH CAN NOW BE COMBINED IN ANY ORDER, ALTHOUGH
!*        CAPSH IS STILL ONLY RECOGNISED IF THE FIRST SYMBOL READ OF THE
!*        ATOM.
!*      * THE UPDATED SOURCE IS NOT GENERATED IF NO FILE HAS BEEN GIVEN
!*        FOR IT.
%EXTERNAL %INTEGER %FN %SPEC EXIST(%STRING (63) S)
!*
!*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!*
!* ROUTINE REQUIRED TO DECODE AND SET STREAMS FOR EMAS.
!*
%EXTERNAL %ROUTINE %SPEC DEFINE(%STRING (63) S)
%EXTERNAL %ROUTINE %SPEC SETMARGINS(%INTEGER J,K,L)
%ROUTINE %SPEC PROCESSDOCUMENT

==== ecslib/emas-2900/pics_lifeis.txt ====




       WWW        WWW   WWWWWWWW  WWWWWWWW        WWW    WWWWWWW         WWWWWWWW   WWW    WWW    WWW       WWW
       WWW        WWW   WWWWWWWW  WWWWWWWW        WWW   WWWWWWWW         WWWWWWWW   WWW    WWW    WWW       WWW
       WWW        WWW   WWW       WWW             WWW   WWW              WWW        WWW    WWW    WWW       WWW
       WWW        WWW   WWW       WWW             WWW   WWWW             WWW        WWW    WWW    WWW       WWW
       WWW        WWW   WWWWWW    WWWWWW          WWW   WWWWWWWW         WWWWWW     WWW    WWW    WWW       WWW
       WWW        WWW   WWWWWW    WWWWWW          WWW        WWW         WWWWWW     WWW    WWW    WWW       WWW
       WWW        WWW   WWW       WWW             WWW        WWW         WWW        WWW    WWW    WWW       WWW
       WWWWWWWWW  WWW   WWW       WWWWWWWW        WWW   WWWWWWWW         WWW         WWWWWWWW     WWWWWWWW  WWWWWWWW
       WWWWWWWWW  WWW   WWW       WWWWWWWW        WWW   WWWWWWW          WWW          WWWWWW      WWWWWWWW  WWWWWWWW





                     WWWWWW     WWWWWWWW        WWWWWWWW    WWW    WWW   WWWWWW     WWWWWWWW
                    WWWWWWWW    WWWWWWWW        WWWWWWWWW   WWW    WWW   WWWWWWW    WWWWWWWW
                   WWW    WWW   WWW             WWW   WWW   WWW    WWW   WWW  WWW   WWW

==== ecslib/emas-2900/pics_horse.txt ====
                                                    WW*   W*          *WWW*
                                                     WWWA       WW*  WWMMMWW      VWW VWA  W
                                                      WWWA    W   WW* WW  WWW      .WW. W*  .
                                                        WWW*   WW  .W. W  .WWA  .    VWW. WW W
                                               ..     .   WWWW  WW  .W WWA WW....*   WW. WW W
                                                                              /XX
                                                     .AX>  WWWW   WW W.. W WWWVXXXX* WWW  W   W
                                                                              TBBBB
                                                --...*XX>.   WWWWW  W.W .WW WWWVXXXXX.WWW/WW VA
                                                    / BB                       TBBBB*
                                              ...--.*BBBWWW*   WWWW   WW .W WWWVXXXXX*WWWWWWW  WW
                                                   / XXX                       TBBBBBX
                                                ./*XXXXX             X     XXWW XXXXXXXDWWWWW  WVWA
                                                  BBBBBB                   BB   BBBBBBBW
                                               .XXXXXXXX    WWWWWBW* WWBW.WWBBWWBBBBBBBBBAWWWWWW WWWW
                                               /BBBBBBBB         X     X    XX  <XXXXXXXXL
                                               ABBBBBBBB>   . ..WWBW+ WBW.WBBWWW<BBBBBBBBBBAWWWW WWWWW
                                               +XXXXXXXX          X    X   XX    XXXXXXXXXXL
                                              .BBBBBBBBB>///./...WBW.WWBWBBBWWW<BBBBBBBB B.WWWWWWW W W
                                              /XXXXXXXXX          X    X XXX    XXXXXXXX X
                                             .BBBBBBBBBB BBBBB/...BWB.WBWBBWWWW<BBBBBBBB BAWWWWWWWW W
                                              XXXXXXXXXX XXXXX    X X  X XX     XXXXXXXX XL
                                          . /ABBBBBBBBBB BBBBBBAV/.BWL//BWBBBBWVBBBBBBBB BB.WWWWWW W W
                                             +XXXXXXXXXX XXXXXX    X X  X XXXX TXXXXXXXX XX
                                        ./// <XBBBBBBBBB BBBBBBBV/.BWW//BBWBBWVBBBBBBBBA BBWWWWWWWWW W WA
                                               XXXXXXXXX XXXXXXX   X    XX XX  XXXXXXXXL XX
                                      ./ //  <XBBBBBBBB VBBB  BBA//BWBWBBWBB//WWLBBBBBBBB BBWWWWWWWWWW W
                                               XXXXXXXX  XXX  XX   X X .. XX    MXXXXXXXX XX
                                       //    <XBBBBBBB A/L+++BBBX/BBB//BBBB//WBWWLBBBBBBB BBWWWWWWWWWW WA
                                               XXXXXXX P X   XXX  XXX  .XXX   X  VXXXXXXX XX
                                         /-  <BBBBBBV A.BBBBBBBBV/BBB/BBBB/WWBBWWWVBBBBBBBBBWWWWWWWWWWWWWW VW
                                              XXXXXXT P/XXXXXXXX  XXX .XXX   XX   LXXXXXXXXX
                                   .   .-   .<BBBBBV A.BBBBBBBBB//BB//BWBWWWBBBBWWW VBBBBBBBWWWW WW WWWWW WW
                                              XXXXXT P/XXXXXXXXX  XX  X X   XXXX    TXXXXXXX
                                   .     .// VTBBBBTXBBBBBBBBBBBBXBB/XBXBBWWBBBBBWWW XBBBBBB/WWWWWWWWWWWWWWW
                                              XXXXX  XXXXXXXXXXXX X/  / XX  XXXXX     XXXXX/
                                   .    //  +WBBBBVBBBBBBBBBBBBBBBBX/BXWBBBBBBBBBWWWWW XBBBX///WWWWWWWWWWWW ./
                                              XXXX  XXXXXXXXXXXXXXX  /  XXXXXXXXX       XXX

==== ecslib/emas-2900/edwin_chars.txt ====
! Program to plot the EDWIN character sets
%include "conlib.edwin_inc"
%external %routine %spec PROMPT (%string (63) STR)
%external %string (63) %fn %spec ITOS (%integer N, P)
%begin
   %own %integer init = 0
   %const %integer split = 32
   %integer alphabet, char, set, y

   %on 14 %start
       ! Event 14,6 is signaled if you choose an alphabet that doesn't exist.
       alphabet = alphabet + 1
   %finish

   %if init=0 %start
       prompt ("Device: ")
       read (set)
       initialise for (set)
       viewport (0, 85*400, 0, 60*400) %if default device = 7580
       viewport (0, 40*400, 0, 28*400) %if default device = 7221 %or default device = 7220
       window (0, 7200, 0, 4000)

==== ecslib/emas-2900/gamespd_starwars.txt ====


%EXTERNALROUTINE STARWARS
%EXTERNALROUTINESPEC PROMPT(%STRING (15) S)
%EXTERNALREALFNSPEC RANDOMREAL
%EXTERNALREALFNSPEC CPUTIME
%INTEGER CH, F, S, Z, FUEL, GF, GD, SFLAG
%REAL X, Y, H, T, C, G, A, V, SS, PROB, DAMAGE, Q, K, DA, DT, DC

%ROUTINE TEXT
%PRINTTEXT"
 THIS PROGRAM SIMULATES THE FINAL ATTACK ON THE DEATHSTAR BY REBEL
X-WING FIGHTERS.
 YOU ARE THE PILOT OF ONE OF THESE FIGHTERS, AND MUST FLY YOUR CRAFT
DOWN A NARROW CHANNEL IN THE DEATHSTAR, AND ATTEMPT TO HIT A"
%PRINTTEXT"
VULNERABLE POINT WHICH HAS BEEN LOCATED ON THE STOLEN PLANS.
YOUR CRAFT'S TARGETING COMPUTER WILL DO ALL OF THE ACTUAL AIMING -
ALL YOU HAVE TO DO IS TO FLY AS CLOSE TO THE CENTRE OF THE CHANNEL,
AND AS LOW AS POSSIBLE."
%PRINTTEXT"

==== ecslib/emas-2900/coms_fore.txt ====
TTYINIT

==== ecslib/emas-2900/edwin_types.txt ====
{ TYPE definitions for using EDWIN from Imp }

%record %format Point Fm (%integer X, Y)

%end %of %file

==== ecslib/emas-2900/oldgeneraly_whois.txt ====

   WHOIS name

This command searches the MAIL programs list of users, and gives a table
of any which match the name provided.   The following examples give an
idea of how it can be used :

   WHOIS HUGHES

   WHOIS ECSC*@2972

   WHOIS *@VAX


==== ecslib/emas-2900/pics_susie.txt ====









                                     SSSS      U    U      SSSS      II     EEEEEE
                                    S          U    U     S          II     E
                                     SSSS      U    U      SSSS      II     EEEE
                                         S     U    U          S     II     E
                                     SSSS       UUUU       SSSS      II     EEEEEE





                                                   $$$$$$$$$$$$
                                                $$$$$$$$$$$$$$$$$$$

==== ecslib/emas-2900/pascal#zur_file2.txt ====
UTILTY:TOEMAS
LIST.ALL
READTAPE
DECODE
FILE.A
FILE.B
FILE.C
FILE.D
FILE.E
FILE.F
FILE.G
FILE.H
FILE.I
READTAPE
DECODE
.END

==== ecslib/emas-2900/pascal#zur_file3.txt ====
%begin                                   {Input P-Code Pascal from tape. ADC}
   %const %integer max = 2*13 
   %const %integer %array blocks(1:max) =
      -(1<<16+351),     (1<<16+6),
      -(20<<16+3840),   (3<<16+6),
      -(78<<16+3840),   (1<<16+486),
       (1<<16+6),      -(62<<16+3840),
       (1<<16+3794),    (1<<16+6),
      -(74<<16+3840),   (1<<16+2121),
       (1<<16+6),      -(1<<16+351),
       (1<<16+6),      -(20<<16+3840),
       (3<<16+6),      -(78<<16+3840),
       (1<<16+486),     (1<<16+6),
      -(62<<16+3840),   (1<<16+3794),
       (1<<16+6),      -(74<<16+3840),
       (1<<16+2121),    (1<<16+6)

   %external %routine %spec Claim Tape
   %external %routine %spec Release tape
   %external %routine %spec Read tape(%integer Buffer address, size)
   %external %routine %spec Writetape(%integer Buffer address, size)

==== ecslib/emas-2900/pascal#zur_file4.txt ====
%begin
   {Character set conversion for P-Code Pascal tape.   ADC}
   %const %byte %array Map(0:63) = 
      {0}   0 {NULL},
      {1}   'A','B','C','D','E','F','G','H','I','J','K','L',
            'M','N','O','P','Q','R','S','T','U','V','W','X',
            'Y','Z',
      {27}  '0','1','2','3','4','5','6','7','8','9',
      {37}  '+','-','*','/','(',')','$','=',' ',',','.','''',
            '[',']',':',0(4),'^',0,'<','>',0(3),';',
            0(*)
 
   %integer Sym, Stopping
   %const %integer Input ended = 9
   %string(255) Line

   %integer %function Get sym
      %own %short %integer Count = 0, k
      %integer Sym = 0, j
      %for j = 1, 1, 6 %cycle            {Read a six-bit character}
         Read symbol(k) %if Count&7 = 0

==== ecslib/emas-2900/pascal#zur_file5.txt ====

(*ASSEMBLER AND INTERPRETER OF PASCAL CODE*)
(*K. JENSEN, N. WIRTH, CH. JACOBI, ETH MAY 76*)

PROGRAM PCODE(INPUT,OUTPUT,PRD,PRR);

(* NOTE FOR THE IMPLEMENTATION.
   ===========================
THIS INTERPRETER IS WRITTEN FOR THE CASE WHERE ALL THE FUNDAMENTAL
TYPES TAKE ONE STORAGE UNIT.
IN AN IMPLEMENTATION ALL THE HANDLING OF THE SP POINTER HAS TO TAKE
INTO ACCOUNT THE FACT TAHT THE TYPES MAY HAVE A LENGTH DIFFERENT FROM
ONE. SO IN PUSH AND POP OPERATIONS THE IMPLEMENTOR HAS TO INCREASE
AND DECREASE THE SP NOT BY 1 BUT BY A NUMBER DEPENDING ON THE TYPE
CONCERNED.
WHERE THE NUMBER OF UNITS OF STORAGE IS USED EXPLICITELY,
THIS VALUE MUST NOT BE CORRECTED, BECAUSE
THE COMPILER HAS COMPUTED IT TAKING INTO ACCOUNT THE LENGTHS OF THE
TYPES INVOLVED.
THE SAME HOLDS FOR THE HANDLING OF THE NP POINTER (WHICH MUST NOT BE
CORRECTED)                                                       *)

==== ecslib/emas-2900/generals_uinfis.txt ====
!TITLE UINFI interface procedures

!!           The following procedures call
%EXTERNAL %INTEGER %FN %SPEC  UINFI(%INTEGER Function)

!< S# SS own fsys
!   File system number
!%SYSTEM %INTEGER %FN %SPEC  SS own fsys
!>
%SYSTEM %INTEGER %FN  SS own fsys
   %RESULT = UINFI(1)
%END

!< S# SS reason
!   foreground = 1
!   batch      = 2
!   obeyfile   = 3
!%SYSTEM %INTEGER %FN %SPEC  SS reason
!>
%SYSTEM %INTEGER %FN  SS reason
   %RESULT = UINFI(2)

==== ecslib/emas-2900/pascal#zur_file6.txt ====

(*$C+,T-,D-,L-*)
 (**********************************************
  *                                            *
  *                                            *
  *         PORTABLE PASCAL COMPILER           *
  *         ************************           *
  *                                            *
  *                PASCAL P4                   *
  *                                            *
  *                                            *
  *     AUTHORS:                               *
  *              URS AMMANN                    *
  *              KESAV NORI                    *
  *              CHRISTIAN JACOBI              *
  *                                            *
  *     ADDRESS:                               *
  *                                            *
  *          INSTITUT FUER INFORMATIK          *
  *          EIDG. TECHNISCHE HOCHSCHULE       *
  *          CH-8096 ZUERICH                   *

==== ecslib/emas-2900/pascal#zur_file7.txt ====
L   3
 ENT   1
 ENT   2
 LDOI
 LDCI
 GRTI
 FJP
 LCA' ****
I   10
 LDCI
 LDCI
 LDA   1
 CSP
 LDCI
 STRI  0
 LDCI
 STRI  0
 LDCI
 STRI  0
I   20
 LDOI

==== ecslib/emas-2900/pascal#zur_file8.txt ====

(*$C+,T+,L+*)
 (**********************************************
  *                                            *
  *                                            *
  *         PORTABLE PASCAL COMPILER           *
  *         ************************           *
  *                                            *
  *                PASCAL P3                   *
  *                                            *
  *                                            *
  *     AUTHORS:                               *
  *              URS AMMANN                    *
  *              KESAV NORI                    *
  *              CHRISTIAN JACOBI              *
  *                                            *
  *     ADDRESS:                               *
  *                                            *
  *          INSTITUT FUER INFORMATIK          *
  *          EIDG. TECHNISCHE HOCHSCHULE       *
  *          CH-8096 ZUERICH                   *

==== ecslib/emas-2900/pics_calender_may.txt ====

                                                   -XXXXXX-
                                               XXXX        XX
                          XXXXX               X               XX
                        XX     XX            X                  XX
                      XX         XXX        X                     XX
                    XX          *-  XXX    X                        XX
                    XX        /****    XXXX                           X
                   XXX       -**                                       X
                  XXX                                                  X
                  XX                                                   X
                XXX                  /                                 X
                XXX                 (/ X                               X
              XXX X                    -XX                            X
             XXXX X                      XXXXXXXXX                   X
            XXXX  X                            XXXXXXXX           XXX
           X XXX XX                          XX        XXXXXXXXXXXX
           XXXX X                          XX
         XXXXX  XX                       XX
         XXXXX X XX                     XX
        XXXXXX X   XX                  XXX

==== ecslib/emas-2900/pascal#zur_file9.txt ====
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-*/()$= ,
 S2)W=

==== ecslib/emas-2900/pascal#zur_file10.txt ====

(*ASSEMBLER AND INTERPRETER OF PASCAL CODE*)
(*K. JENSEN, N. WIRTH, CH. JACOBI, ETH MAY 76*)

PROGRAM PCODE(INPUT,OUTPUT,PRD,PRR);

(* NOTE FOR THE IMPLEMENTATION.
   ===========================
THIS INTERPRETER IS WRITTEN FOR THE CASE WHERE ALL THE FUNDAMENTAL
TYPES TAKE ONE STORAGE UNIT.
IN AN IMPLEMENTATION ALL THE HANDLING OF THE SP POINTER HAS TO TAKE
INTO ACCOUNT THE FACT TAHT THE TYPES MAY HAVE A LENGTH DIFFERENT FROM
ONE. SO IN PUSH AND POP OPERATIONS THE IMPLEMENTOR HAS TO INCREASE
AND DECREASE THE SP NOT BY 1 BUT BY A NUMBER DEPENDING ON THE TYPE
CONCERNED.
WHERE THE NUMBER OF UNITS OF STORAGE IS USED EXPLICITELY,
THIS VALUE MUST NOT BE CORRECTED, BECAUSE
THE COMPILER HAS COMPUTED IT TAKING INTO ACCOUNT THE LENGTHS OF THE
TYPES INVOLVED.
THE SAME HOLDS FOR THE HANDLING OF THE NP POINTER (WHICH MUST NOT BE
CORRECTED)                                                       *)

==== ecslib/emas-2900/pascal#zur_file11.txt ====

(*$C+,T-,D-,L-*)
 (**********************************************
  *                                            *
  *                                            *
  *         PORTABLE PASCAL COMPILER           *
  *         ************************           *
  *                                            *
  *                PASCAL P4                   *
  *                                            *
  *                                            *
  *     AUTHORS:                               *
  *              URS AMMANN                    *
  *              KESAV NORI                    *
  *              CHRISTIAN JACOBI              *
  *                                            *
  *     ADDRESS:                               *
  *                                            *
  *          INSTITUT FUER INFORMATIK          *
  *          EIDG. TECHNISCHE HOCHSCHULE       *
  *          CH-8096 ZUERICH                   *

==== ecslib/emas-2900/pascal#zur_file12.txt ====
L   3
 ENT   1
 ENT   2
 LDOI
 LDCI
 GRTI
 FJP
 LCA' ****
I   10
 LDCI
 LDCI
 LDA   1
 CSP
 LDCI
 STRI  0
 LDCI
 STRI  0
 LDCI
 STRI  0
I   20
 LDOI

==== ecslib/emas-2900/pascal#zur_file13.txt ====

(*$C+,T+,L+*)
 (**********************************************
  *                                            *
  *                                            *
  *         PORTABLE PASCAL COMPILER           *
  *         ************************           *
  *                                            *
  *                PASCAL P3                   *
  *                                            *
  *                                            *
  *     AUTHORS:                               *
  *              URS AMMANN                    *
  *              KESAV NORI                    *
  *              CHRISTIAN JACOBI              *
  *                                            *
  *     ADDRESS:                               *
  *                                            *
  *          INSTITUT FUER INFORMATIK          *
  *          EIDG. TECHNISCHE HOCHSCHULE       *
  *          CH-8096 ZUERICH                   *

==== ecslib/emas-2900/pascal#zur_file14.txt ====
%begin                                   {Input P-Code Pascal from tape. ADC}
   %const %integer max = 2*13 
   %const %integer %array blocks(1:max) =
      -(1<<16+351),     (1<<16+6),
      -(20<<16+3840),   (3<<16+6),
      -(78<<16+3840),   (1<<16+486),
       (1<<16+6),      -(62<<16+3840),
       (1<<16+3794),    (1<<16+6),
      -(74<<16+3840),   (1<<16+2121),
       (1<<16+6),      -(1<<16+351),
       (1<<16+6),      -(20<<16+3840),
       (3<<16+6),      -(78<<16+3840),
       (1<<16+486),     (1<<16+6),
      -(62<<16+3840),   (1<<16+3794),
       (1<<16+6),      -(74<<16+3840),
       (1<<16+2121),    (1<<16+6)

   %external %routine %spec Claim Tape
   %external %routine %spec Release tape
   %external %routine %spec Read tape(%integer Buffer address, size)
   %external %routine %spec Writetape(%integer Buffer address, size)

==== ecslib/emas-2900/pascal#zur_file15.txt ====
%begin
   {Character set conversion for P-Code Pascal tape.   ADC}
   %const %byte %array Map(0:63) = 
      {0}   0 {NULL},
      {1}   'A','B','C','D','E','F','G','H','I','J','K','L',
            'M','N','O','P','Q','R','S','T','U','V','W','X',
            'Y','Z',
      {27}  '0','1','2','3','4','5','6','7','8','9',
      {37}  '+','-','*','/','(',')','$','=',' ',',','.','''',
            '[',']',':',0(4),'^',0,'<','>',0(3),';',
            0(*)
 
   %integer Sym, Stopping
   %const %integer Input ended = 9
   %string(255) Line

   %integer %function Get sym
      %own %short %integer Count = 0, k
      %integer Sym = 0, j
      %for j = 1, 1, 6 %cycle            {Read a six-bit character}
         Read symbol(k) %if Count&7 = 0

==== ecslib/emas-2900/pascal#zur_file16.txt ====
==== ecslib/emas-2900/lisp_lispv09s70.txt ====
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC CLOSE STREAM(%INTEGER N)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINE LISP INTP(%INTEGER SPACE, INITMODE)
!
! ***** READ  ROUTINES *****
!
%INTEGERFNSPEC RATOM
%INTEGERFNSPEC READ SEXP(%STRING(15) PMPT)
!
! ***** PRINT ROUTINES *****
!
%ROUTINESPEC PRINT CHARS(%STRING(72) PHRASE)
%STRING(15)%FNSPEC NUMBER(%INTEGER I)
%STRING(72)%FNSPEC PNAME(%INTEGER INDEX)
%ROUTINESPEC PRINT(%INTEGER INDEX)
!
! ***** LISP  ROUTINES *****
!
%INTEGERFNSPEC PUSH(%INTEGER INDEX)
%INTEGERFNSPEC CONS(%INTEGER CAR, CDR)

==== ecslib/emas-2900/pics_calender_march.txt ====

                

                                          LLLLLL
                                      LLLLLLLLLLLLLL
                                    LLLLLLLLLLLLLLLLL
                                    LLLLLLLLLLLLLLLLL
              LLL                     LLLLLLLLLLLLLL
            LLLL LL                           LLLLL
         LLLLLL LLL                         LLLLLL
        LLLLLL LLL                        LLLLLLLL
      LLLLLLL LLL              LLLLLL   LLLLLL
     LLLLLLLLLLL           LLLLLLLLLLLLLLLL        LLLLLLLLLLLLL
    LLLLLLLLLLL           LL             LLLLLLLLLL            LLLL
  LLL LLLLLLLL           LL      LL                               LL
 LLL LLLLLLLL           LL      LL                                LL
LLLL LLLLLL            LL      LL                   LLLLLLLLL      LL
LLL LLLLLL          LLL                            LLLLLLLLLLLL     LL
LLLLLLLLLLLLLLLLLLLLLLLLL            LL           LLLLLLLLLLLLL      LL
LLLLLLLLLLLLLLLLLLLLLLLLL            LL                              LL
LLLLLLLLLLLLLLLLLLLLLLLLL             LL                     LL     LL

==== ecslib/emas-2900/vlsiuse_cmos8.txt ====
IDENT *
CA  3  1  0   2
CP  4  2  0   7
CM  2  4  0   8
CW  6  8  0   1
CS  7  7  0   3
CC  1  0  0   6
CV  5 15  0   3
CG  8 12  0   1
CD  5  1  0   8
CN  7  7  0   1
CT  1 15  0   1
ZZZ

==== ecslib/emas-2900/gt_view_getusers.txt ====
%BEGIN
%INTEGER START,FIN
%INTEGER I
SELECTOUTPUT(1)
READ(START)
I = START+X'28'
FIN=START+X'2000'-2
%CYCLE
   %WHILE I<FIN %CYCLE
      %EXIT %IF BYTEINTEGER(I)='/'
      I=I+1
   %REPEAT
   %EXIT %IF I>=FIN
   I=I-3
   PRINTSTRING(STRING(I));NEWLINE
   I=I+BYTEINTEGER(I)
%REPEAT
%ENDOFPROGRAM

==== ecslib/emas-2900/arthur.txt ====

 PDP16S,NEWSIMS,PDPDUMPS,WOMBLES,SIMPS,REDUCES,GRAPH16S,ARTHPS



%CONSTSHORTINTEGERARRAY MAIN(1: 172) = %C
    1,    0,    4,    9,   15,   19,   23,   28,   33,   37,   43,   48,
   53,   58,   63,   67,   71,   82,   86,   90,   94,   97,  105,  109,
  113,  114,  116,    0,  118,  122,    0,  124,  127,    0,  131,  134,
  135,  138,    0,  141,  144,  147,  150,  153,  156,    0,  162,  162,
  167,  171,    0,  174,  178,  182,  189,    0,  191,  196,    0,  199,
  203,  207,  210,    0,  213,  216,  219,    0,  222,  225,  228,  231,
    0,  235,  238,  241,  244,  247,    0,  250,  253,    0,  256,  259,
  262,    0,  265,    0,  268,  272,    0,  274,  277,  280,  283,  286,
    0,  292,  296,  299,  302,  305,  308,    0,  310,  315,    0,  317,
  320,  323,    0,  326,  330,  334,    0,  338,  341,    0,  343,  346,
    0,  349,  355,    0,  357,    0,  362,  365,  368,    0,  370,  376,
    0,  378,    0,  382,  390,  398,  402,    0,  406,  409,  412,    0,
  417,  420,    0,  422,  427,    0,  429,    0,  432,  437,    0,  439,
  442,    0,  444,  450,    0,  452,  457,    0,  459,  462,  465,  468,
  471,  474,  477,    0

==== ecslib/emas-2900/include_ascii.txt ====
%end %of %list
%const %integer   NUL  =  0,   SOH  =  1,   STX  =  2,   ETX  =  3
%const %integer   EOT  =  4,   ENQ  =  5,   ACK  =  6,   BEL  =  7
%const %integer   BS   =  8,   HT   =  9,   LF   = 10,   VT   = 11
%const %integer   FF   = 12,   CR   = 13,   SO   = 14,   SI   = 15
%const %integer   DLE  = 16,   DC1  = 17,   DC2  = 18,   DC3  = 19
%const %integer   DC4  = 20,   NAK  = 21,   SYN  = 22,   ETB  = 23
%const %integer   CAN  = 24,   EM   = 25,   SUB  = 26,   ESC  = 27
%const %integer   FS   = 28,   GS   = 29,   RS   = 30,   US   = 31
%const %integer   DEL  = 127
%const %integer   TAB  = HT
%list

==== ecslib/emas-2900/pdp16pd_arthps.txt ====

*
* PHRASE STRUCTURE DEFINITOIN OF ARTHUR
*

* DEFINE BUILT-IN PHRASES
*
B[CONSTANT]=3
B[NAME]=4
B[NAMELIST]=5
B[SPDEFN']=6
B[TEXT]=7
B[SEPERATOR]=8
B[CONSTANT LIST]=9

*
* DEFINE NAMED LITERAL VALUES
*
L<PADDING> = 0
L<THERE> = 1
L<MISSING> = 0

==== ecslib/emas-2900/oldgeneraly_ecceview_a.txt ====
!TITLE INTRODUCTION TO TEXT EDITING

   ECCE is a text editor.  Under the control of commands entered from a
terminal keyboard, it carries out modifications to a body of text held
in a computer file.  This text file may be, for example, a source
program in some high-level language, or tables of results generated by a
statistical package, or data intended as input to a user's program; it
may simply be material which is held in the computer filing system
solely for the purposes of editing and listing.  The differences between
these kinds of text files are not in any way significant to the
operation of the Editor.  What ECCE cannot do is edit files which are
not composed of lines of text, such as executable code files.

!<Text files

   A text file consists of a number of lines, each line containing a
number of characters.  The characters making up a line are either
printing characters or space characters.  There is no need when typing
in lines on a computer terminal, any more than on a conventional
typewriter, to 'space' after the last printing character on a line, in
order to pad lines out to a particular fixed length; RETURN suffices to

==== ecslib/emas-2900/oldgeneraly_ecceview_b.txt ====
!TITLE ADVICE FOR BEGINNERS

   To begin with, the Editor will seem a clumsy tool, particularly for
those with limited typing experience.  Changes which could be marked up
on a document in no time take an age to translate into sequences of
editing commands to achieve the desired effect.  Fluency comes with
practice, although editing remains a fiddling business, and mistakes are
inevitable.  Happily most mistakes are easily recovered from, and in the
exceptional case where an edit goes disastrously wrong (for example
unintentionally scrambling half the file), the editing session can
always be abandoned without losing the original file, so that only the
editing time is wasted.

   With experience, it becomes quite straightforward, and habitual, to
edit a file 'sight unseen'.  However, for initial learning, it is
sensible to use as test data a file with known contents.
!PAGE
The following procedure is a possible learning programme:

(a)  Beg or borrow a copy of some text file for experimentation.
     A suitable length is 30 to 100 lines of text.

==== ecslib/emas-2900/oldgeneraly_ecceview_c.txt ====
!TITLE CALLING THE EDITOR
       These examples assume that the EMAS option NOBRACKETS is
       selected.

   (a) To edit an existing file called "CURTEXT" so that the new file
       created will also be called "CURTEXT":
               VECCE CURTEXT
       This is the standard updating procedure.

   (b) To edit an existing file called "OLDTEXT" in such a way as to
       create a new file called "NEWTEXT":
               VECCE OLDTEXT/NEWTEXT

   (c) To create a new file called "PROG34" from scratch:
               VECCE .N/PROG34
       The ".N" stands for a null file, so that technically this is a
       special case of (b) above starting with an empty old file.  The
       first editing command when creating a new file would normally be
       "G*" (see Get below)
!PAGE
   (d) To inspect an existing file called "RESULTS" without altering it:

==== ecslib/emas-2900/oldgeneraly_ecceview_d.txt ====
!TITLE COMMAND FORMATS

   When the Editor is called, it positions its file pointer at the start
of the first line in the file to be edited and presents the initial
display.  At the outset, it is in command mode and expects command input
to be typed on the command line.  The response may take one of three
forms:
        typing a command line followed by RETURN
        typing a Special command followed by RETURN
        pressing a control key (including plain RETURN)

   A command line consists of one or more editing commands, optionally
separated by spaces.  A command line is terminated by RETURN and errors
noticed while typing it may be cancelled by means of the DEL key.

!<Special commands

   Special commands are distinguished by starting with the prefix "%"
(percent-sign) followed by a letter.  They are used to select options
and set modes which modify the effect of subsequent editing commands.
The most essential Special command is the Close command "%C" which is

==== ecslib/emas-2900/oldgeneraly_ecceview_e.txt ====
!TITLE INDIVIDUAL EDITING COMMANDS
!<Move (forward one line)  M

 The Move command causes the file pointer to be moved from its current
 position to the start of the following line.
    Attaching a repetition number to a Move command provides a means
    of moving forward a fixed number of lines.  For example, the
    command "M99" issued at the start of the file, causes the pointer
    to be moved to the start of the hundredth line in the file.

 The command fails if the file pointer is at the very end of the file,
 that is, beyond the last line of text.
    It is legitimate to Move from the last line in the file to the
    end-of-file position, but then further Moves will fail.
!>
!<Move back (one line)     M-

 This command causes the file pointer to be moved from its current
 position to the start of the previous line.

 The command fails if the current line is the first line in the file,

==== ecslib/emas-2900/oldgeneraly_ecceview_f.txt ====
!TITLE OPTIONS
This section describes the various options which may be selected to
control or qualify the operation of the Editor.  The initial parameters
in the list marked with an asterisk can be specified only in the command
line when the Editor is called (see CALLING THE EDITOR); that is, once
established, they cannot be changed.  The others may be freely altered
at any time, by means of the Environment command "%E"(below).

!<Pre-definition file    *PRE

 This Option is provided to make it possible to specify a file of
 editing commands which are to be obeyed at the outset of the editing
 session.  Its main use is to permit frequently used definitions to be
 recovered from a file, but the file may contain any editing commands
 and may in fact comprise a complete edit ending with the Close command
 ("%C").  Values for this parameter must be valid file-names.  Although
 PRE may be specified at the outset only, the %G command (Get editing
 commands from file) is available at any time.

Examples:    -PRE=WPPREDEF    -PRE=ECUU99.PROJ_DEF1
!>

==== ecslib/emas-2900/oldgeneraly_ecceview_g.txt ====
!TITLE SPECIAL COMMANDS

   The most important Special command is the Close command "%C" which is
the normal method of closing off the edit and making permanent the
changes to the file.  If for any reason it is desired to ABANDON the
edit without giving effect to the changes, the Abandon command "%A"
should be used instead.  The variant "%Ci" is used to invoke IMP syntax
checking before finally closing the file.
See also the section on MACROS for the Special commands "%Q" (Query key
definition) and "%K" (define Key).

!<modify Environment                %E

    The Environment command "%E" switches the Editor into a mode in
 which the various options described above may be modified.  It cycles
 through the list of modifiable options displaying the current value and
 permitting an alternative value to be specifed.  The RETURN key is used
 to move on to the next in the list and colon is used to return to
 editing.  For a numeric option, a number must be typed to specify a new
 value; for a yes/no option any response other than RETURN or colon is
 sufficient to alter the setting.

==== ecslib/emas-2900/oldgeneraly_ecceview_h.txt ====
!TITLE MACROS

   The upper-case letters 'A' to 'W' and the punctuation symbols have a
fixed significance to ECCE.  All the lower-case letters, and the
upper-case letters 'X' to 'Z', are available for definition as macros,
that is as abbreviations for sequences of characters.  So also are the
control keys.

!<Command and text macros

    The printing keys mentioned have a significance as macros only
 within commands, since in data-entry mode or within text strings they
 stand for themselves.  Any of them may be used in a position where a
 command letter is expected and may stand for any sequence or partial
 sequence of commands.

    The letters 'X' to 'Z' and 'x' to 'z' have two additional
 properties: first, they may be used in a position where a text
 parameter is required; and, second, they may be defined to stand for a
 text sequence appearing in the file being edited, or the secondary
 input file, using the Define Macro ("^") command.

==== ecslib/emas-2900/oldgeneraly_ecceview_i.txt ====
!TITLE PROGRAMMED COMMANDS

   This section describes facilities for constructing more powerful
commands from simple commands.  So far, the only form of compound
command structure introduced has been the facility to type more than one
command in a single command line, with the consequential capability of
repeating the complete sequence by subsequently typing a repetition
number instead of another command.

!<Caution

    The structuring facilities described in the following paragraphs can
 be used to carry out some quite complicated operations, but commands
 making heavy use of them tend to become rather difficult to understand.
 It is not sensible to try to devise a programmed command of any
 significant complexity while working at the terminal.  Contemplation in
 tranquillity is required.  Some users note in a log-book those which
 they have found useful in the past.
!>
!<Command sequences


==== ecslib/emas-2900/oldgeneraly_ecceview_j.txt ====
!TITLE IMPLEMENTATIONS

   One of the objectives of the design of ECCE is that it should not be
system-dependent, but should be implementable on a range of machines.
This video version as described in earlier sections is implemented
uniformly on EMAS 2900, VAX/VMS and the Computer Science Department's
Advanced Personal Machine.  The syntax checking capability is a
by-product of work on the programming environment for the APM.

   The detail of some features, for example those involving naming of
files, is inevitably bound up with a particular operating system.  The
performance of the editor as seen by the user is also affected by the
system, and, more especially, the mode of connection.

!<Mode of connection

   The most important factor affecting editor performance is the mode of
connection of the user's terminal.  In general, the more direct the
connection, the better the performance will be.  ECCE has a number of
options which make it possible to exercise some control over the
frequency of interaction and the volume of data transferred.

==== ecslib/emas-2900/pics_pooh.txt ====




                                                        XXXX
                                                      XX    XX
                                  XXXX              XX        XX
                                XXX   XX           XX          XX
                              XX        XX  XXXX  XX           XX
                             XX           XX    XXXX           XX
                            XX             XX       XXX        XX
                            XX             XX         XXX     XX
                             XX                         XXX  XX
                              XX                          XXX
                               XX                           XX
                                XX                           XX
                                 XXXX                          XX
                               XX                                XX
                               XX                                  XX
                               XX                              X    XX
                              XX                             XXX    XX

==== ecslib/emas-2900/lpd_jlaydcls.txt ====
$A ESCAPE='@';INVERT=0;PAGE=60
@A TAB=4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72
@A CAPO=0;CAPSHO=0;MARK=2
@A CAP=0;CAPSH=0
@A PAGENO=1;BOTTOM=3; LINE=80
@C21 EDINBURGH REGIONAL COMPUTING CENTRE@C67 September 1977
@B3 @L1CMU
layout: a document formatting program
@P2
LAYOUT is a document formatting program, written in IMP. Its
input is a character file consisting for the most part of the
text of the document to be produced. This source file is read once by
LAYOUT and the output document file is produced as it is read. Optionally,
LAYOUT can also produce an updated source file, the purpose of which is
described later.
@P1The source file is treated as a sequence of 'text atoms' separated by
delimiters, a delimiter being any number of spaces or newlines or both.
A text atom thus corresponds to a normal word,
possibly followed by punctuation. The program reads the text atoms and
places them one by one, separated by %single spaces, in a line buffer
until the next text atom would exceed the line length defined by the

==== ecslib/emas-2900/basicpd_bass.txt ====
%EXTERNALSTRING(15) IFILE,OFILE
%EXTERNALROUTINESPEC RUN(%STRING(63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINESPEC LIST(%STRING(63) S)
%EXTERNALINTEGER STREAM
%EXTERNALROUTINESPEC SET MARGINS(%INTEGER A,B,C)
%EXTERNALROUTINE BASIC(%STRING(63) IF)
    OFILE='.TT' %UNLESS IF->IF.('/').OFILE
    %IF IF='' %OR IF='.TT' %START
        IF='.TT' ; STREAM=0
    %FINISHELSE STREAM=1
    IFILE = IF %UNLESS OFILE->OFILE.(',').IFILE
    OFILE='.TT' %IF OFILE=''
    %IF IF#'.TT' %AND ( OFILE=IF %OR OFILE=IFILE) %START
        PRINTSTRING('INVALID PARAMETERS')
        NEWLINE ; %STOP
    %FINISH
    DEFINE('ST01,'.IF)
    DEFINE('ST02,'.OFILE)
    DEFINE('ST03,'.IFILE)
    SELECTOUTPUT(2)

==== ecslib/emas-2900/lpd_qls.txt ====

!*
!*      * $VM$BN NOW WORKS IN ALL CASES - N  BLANK LINES NOW SENT TO
!*        OUTPUT FILE AFTER PAGE TURN CAUSED BY $V.
!*      * 'READ ATOM OR DIRECTIVE' REWRITTEN WITH SWITCH.  ESC SYMBOL IS
!*        ALWAYS GIVEN PRIORITY ON INPUT.  E.G. _$% WOULD NOW PRODUCE AN
!*        UNDERLINED PERCENT.
!*        CAP, CAPSH, UND, UNDSH CAN NOW BE COMBINED IN ANY ORDER, ALTHOUGH
!*        CAPSH IS STILL ONLY RECOGNISED IF THE FIRST SYMBOL READ OF THE
!*        ATOM.
!*      * THE UPDATED SOURCE IS NOT GENERATED IF NO FILE HAS BEEN GIVEN
!*        FOR IT.
%EXTERNAL %INTEGER %FN %SPEC EXIST(%STRING (63) S)
!*
!*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!*
!* ROUTINE REQUIRED TO DECODE AND SET STREAMS FOR EMAS.
!*
%EXTERNAL %ROUTINE %SPEC DEFINE(%STRING (63) S)
%EXTERNAL %ROUTINE %SPEC SETMARGINS(%INTEGER J,K,L)
%ROUTINE %SPEC PROCESSDOCUMENT

==== ecslib/emas-2900/gamefpd_fullgame.txt ====
%CONTROL 0
%ROUTINE CHECKSTUDENT
%BYTEINTEGER I
;!%MCODE
I=0
*XC_80(16,11),80(11); ! CLEAR BUFFER
*MVI_81(11),160
*MVI_95(11),7
*LD_0,80(11)
*LD_2,88(11)
*SVC_254
*STD_4,80(11)
*MVC_I(1),81(11)
*NI_I,1

PRINTSTRING("No access to Student users
")%ANDSTOPIF I#0
%END
%DYNAMICROUTINESPEC CLEAR(%STRING(63)K)
%DYNAMICROUTINESPEC DEFINE(%STRING(63)K)
%EXTERNALROUTINESPEC PROMPT(%STRING(15)S)

==== ecslib/emas-2900/generals_whoiss.txt ====
! Source of WHOIS

%external %routine WHOIS (%string (255) S)
   %external %routine %spec MAIL (%string (255) S)
   %external %routine %spec DEFINE (%string (255) S)

   DEFINE ("75,.NULL")
   SELECTINPUT (75)
   MAIL ("DIR,".S)
%end

%end %of %file

==== ecslib/emas-2900/gt_view_preface.txt ====
To analyse Tony Gibbons 'Trojan Horse' file,
type..
#CONNECT ERCC04.VIEWLOG
#DEC <Number given above>
DEFINE 1,USERLIST
RUN ANALYSE

==== ecslib/emas-2900/generals_build_obey1.txt ====
mail
dir */m#userlist
stop
e m#userlist
k3
m0m-k
m-0
f/ EDEE  /k;0
m-0
f/vax  /k;0
m-0
f/  Dlist  /k3;0
m-0
f/  EDXA /k;0
m-0
v/empty/\m,k;0
m-0
f/  BUSH  /l6i/;/m;0
m-0
f/  EMAS  /l6i/;/m;0
m-0

==== ecslib/emas-2900/generals_build_obey2.txt ====
copy m#userlist,t#userlist
copy2 ecslib.generals_build_userbuild,t#builds
imp80 t#builds,t#buildy
run t#buildy
copy2 ecslib.generals_usnames,t#users
v t#users
f/!*start/m
%s=t#usertext
^
m0
$
%c
imp80 t#users,t#usery
delete t#users,t#builds,t#buildy,t#userlist,t#usertext


==== ecslib/emas-2900/vlsiuse_a1.txt ====
SIZE 80 56

==== ecslib/emas-2900/vlsiuse_a2.txt ====
SIZE 56 40

==== ecslib/emas-2900/pdp16pd_mynewsam.txt ====

!**                  *     *  *    *            *    **  *******  **   **            *****      *     *     * 
!**                  **   **  *    *            **   **  **       **   **           **   **    * *    **   **         
!**                  *** ***  **  **            ***  **  **       **   **           **        *   *   *** ***         
!**                  ** * **   ****             ** * **  *****    **   **            *****   **   **  ** * **         
!**                  **   **    **              **  ***  **       ** * **                **  *******  **   **         
!**                  **   **    **              **   **  **       *** ***           **   **  **   **  **   **         
!**                  **   **    **              **   **  *******   *   *             *****   **   **  **   **         
%ENDOFLIST
%CONTROL X'8000'

%CONSTSHORTINTEGERARRAY SMAIN(1: 150) = %C
    1,    0,    4,    8,   12,   15,   19,   25,   30,   35,   39,   43,
   47,   50,   54,   58,   63,   69,   74,   79,   84,   88,   92,   96,
  100,  104,  108,  112,  116,  121,  125,  128,  129,  133,    0,  135,
  138,    0,  141,  144,    0,  148,  150,    0,  152,  154,    0,  156,
  160,    0,  162,  167,    0,  169,    0,  172,  177,    0,  179,  182,
    0,  184,  187,  190,  193,  196,  199,    0,  202,  207,    0,  209,
  211,    0,  213,  215,    0,  217,  220,  223,    0,  226,  228,    0,
  230,  234,  235,  238,  239,  243,    0,  245,  251,  255,    0,  258,
  262,  266,  273,    0,  275,    0,  278,  281,    0,  283,  286,  289,

==== ecslib/emas-2900/include_imppredef.txt ====
! Please change the above line to include "ECSLIB.INCLUDE_UTIL" <<<<<<<<<<<<<<<<
! Useful pre-definitions for portable Imp programs

%external %string (15) %fn %spec Date
%external %string (15) %fn %spec Time
%dynamic %string (255) %fn %spec ItoS %alias "IMP_I_TO_S" (%integer I, P)
%dynamic %string (255) %fn %spec RtoS %alias "IMP_R_TO_S" (%long %real R,
                                                           %integer A, B)
%dynamic %integer %fn      %spec StoI %alias "IMP_S_TO_I" (%string (255) S)
%dynamic %integer %fn      %spec REM  %alias "IMP_REM"    (%integer A, B)

%external %routine %spec Prompt (%string (63) STR)

! Lattice Imp stream handling facilities

%dynamic %routine %spec Open Input  %alias "IMP_OPEN_INPUT" (%integer S,
                                                             %string (255) ST)
%dynamic %routine %spec Close Input %alias "IMP_CLOSE_INPUT"
%dynamic %routine %spec Reset Input %alias "IMP_RESET_INPUT"
%dynamic %integer %fn %spec Input Stream %alias "IMP_INPUT_STREAM"
%dynamic %string (255) %fn %spec Input Name %alias "IMP_INPUT_NAME"

==== ecslib/emas-2900/vlsiuse_a3.txt ====
SIZE 40 28


==== ecslib/emas-2900/vlsiuse_a4.txt ====
SIZE 28 20


==== ecslib/emas-2900/vlsiuse_nmos.txt ====
IDENT *
ND  3  1  0  18
NP  4  2  0  15
NM  2  4  0  18
NI  4  8  1   5
NB  1  7  1   5
NC  1  0  0  10
NG  1 12  0   1
NT  1 15  0   1
NV  1 15  0   3
ZZZ

==== ecslib/emas-2900/generals_cleans.txt ====
! A CLEAN command for EMAS
! Gordon Hughes, September 1982
! The file fitting code from J. Wexler

%const %integer SSPDFILETYPE = 6
%record %format ARF (%string (31) NAME, %integer TYPE %or %string (11) SNAME, %integer SP12, KBYTES,
    %byte %integer ARCH, CODES, CCT, OWNP, EEP, USE, CODES2, SSBYTE, FLAGS, SP29, SP30, SP31)
%record %format PDHF (%integer DATAEND, DATASTART, SIZE, FILETYPE, SUM, DATETIME, ADIR, COUNT)
%record %format RF (%integer CONAD, FILETYPE, DATASTART, DATAEND)
%record %format AFRECF (%string (11) NAME, %integer KBYTES, %string (8) DATE, %string (6) TAPE, %INTEGER CHAPTER, FLAGS)
%system %routine %spec PRINTMESS (%integer M)
%system %integer %fn %spec STOREMATCH (%integer L, A1, A2)
%system %routine %spec MOVE (%integer LENGTH, FROM, TO)
%external %integer %fn %spec DFILENAMES (%string (6) USER,
   %record (AFRECF) %array %name INF, %integer %name FILENUM, MAXREC, NFILES, %integer FSYS, TYPE)
%external %integer %fn %spec DDESTROY (%string (6) USER, %string (11) FILE,
   %string (8) DATE, %integer FSYS, TYPE)
%system %routine %spec SETWORK (%integer %name AD, FLAG)
%system %integer %map %spec COMREG (%integer I)
%system %routine %spec CONNECT (%string (31) FILE, %integer MODE, HOLE, PROT, %record (RF) %name R, %INTEGER %NAME FLAG)
%external %integer %fn %spec UINFI (%integer I)

==== ecslib/emas-2900/include_connect.txt ====
%external %routine %spec Connect File %alias "IMP_CONNECT_FILE" %c
   (%string(255) File, %integer Writeable,
    %integer %name Start Addr, Bytes Mapped)

%external %routine %spec Disconnect File %alias "IMP_DISCONNECT_FILE" %c
                                      ( %integer File Base Addr )

{values for Writeable}
%const %integer Read Only       = 0, {section not writeable}
                Read Write      = 1, {section writeable, file affected}
                Read Write Temp = 2  {changes do not affect file}

%end %of %file

==== ecslib/emas-2900/toals_view_preface.txt ====
To analyse Tony Gibbons 'Trojan Horse' file,
type..
#CONNECT ERCC04.VIEWLOG
#DEC <Number given above>
DEFINE 1,USERLIST
RUN ANALYSE

==== ecslib/emas-2900/generals_usnames.txt ====
!TITLE  Source of S#USERNAME
!<
%systemstring(255)%fn username(%string(255) User,%integer Machine)

!*START*!
!*END*!

%string (255) line
   %integer Lower,Upper,test

   length(line)=6
   Lower = 1; Upper = max Users
   %while Lower<Upper %cycle
      Test = (Upper + Lower)//2
      %if User<Users(Test) %then %start
         Upper=Test
      %finishelsestart
         Lower=Test+1
      %finish
   %repeat


==== ecslib/emas-2900/pics_jerry.txt ====




















                                                           MMMMMMMM

==== ecslib/emas-2900/pdp16pd_arthur.txt ====
!**                   *     ******    ******  **   **  **   **  ******
!**                  * *    **   **     **    **   **  **   **  **   **
!**                 *   *   **   **     **    **   **  **   **  **   **
!**                **   **  ******      **    *******  **   **  ******
!**                *******  **   **     **    **   **  **   **  **   **
!**                **   **  **   **     **    **   **  **   **  **   **
!**                **   **  **   **     **    **   **   *****   **   **
!**

!*****************       FULLY WORKING VERSION    **********************
%ENDOFLIST
%CONTROL 0

%CONTROL 0
%ENDOFLIST

%CONSTSHORTINTEGERARRAY MAIN(1: 174) = %C
    1,    0,    4,    9,   16,   20,   24,   31,   36,   40,   46,   51,
   56,   61,   66,   70,   74,   85,   89,   93,   97,  100,  108,  112,
  116,  117,  119,    0,  121,  125,    0,  127,  130,    0,  134,  137,
  138,  141,    0,  144,  147,  150,  153,  156,  159,    0,  165,  165,

==== ecslib/emas-2900/generals_uinfss.txt ====
!TITLE UINFS interface procedures

!             The following procedures call
%EXTERNAL %STRING(255) %FN %SPEC  UINFS(%INTEGER Function)

!< S# owner
!%SYSTEM %STRING(6) %FN %SPEC owner
!>
%SYSTEM %STRING(6) %FN owner
   %RESULT = UINFS(1)
%END

!< S# delivery
!%SYSTEM %STRING(255) %FN %SPEC delivery
!>
%SYSTEM %STRING(255) %FN delivery
   %RESULT = UINFS(2)
%END

!< S# start time
!%SYSTEM %STRING(8) %FN %SPEC start time

==== ecslib/emas-2900/vlsiuse_felt.txt ====
LAYERS I+B+G

==== ecslib/emas-2900/fundsparam.txt ====
AFTER=19/08/85 08.00.00
.END

==== ecslib/emas-2900/pdp16pd_graph16s.txt ====
!!!                                           *******  **        *****
!!!                                           **       **       **   **
!!!                                           **       **       **   **
!!!                                           *****    **       **   **
!!!                                           **       **       **   **
!!!                                           **       **       **   **
!!!                                           **       *******   *****










%CONTROL 0

%EXTERNALROUTINE FLO(%STRING (63) S)
%STRING (63) INFILE, OUTFILE

==== ecslib/emas-2900/pdp16pd_appendix.txt ====
$A UNDO=0;UND=0;LEFT=10
$A MARK=2;INVERT=0;CAP=0;CAPSH=0;CAPSHO=0;CAPO=0
$A ESCAPE='@';UNDSHO=0;UNDSH=0;PAGENO=82;PAGE=57;TOP=2;BOTTOM=5
@L0
      
*
*       APPENDIX 1
*
*
* PHRASE STRUCTURE DEFINITION OF ARTHUR
*
* BUILT-IN PHRASES ARE ENCLOSED IN SQUARE BRACKETS
*
*
*
* THE FIRST PHRASE IS THE DEFAULT ENTRY POINT
*
      
P(STAT)
      (SS) [SEPERATOR];
      

==== ecslib/emas-2900/pics_calender_august.txt ====




                      X X XXXXXXXXX
                    XXXXX          OO
                   XXXX X            OO
                  XX X     //         OO
                 XXXX     //           OO
                 XX      //            OO 
                LL                      OO
               LLL                       OO
              LLL L         ****   ****  OO
              LLL L         *****  *****  O
              LLL L         *****  *****  OO
             LLLLLL         *****  *****   OOOOO
             LLL LL         ****    ****        OOO
            LLLL LL                                OO
            LLLLLLL                                  OO
            LLLLLL                                    OOO
            LLLLLLL                                    OOO

==== ecslib/emas-2900/pics_calender_july.txt ====



                        XXXXXXXXXX
                       XXXXXXXXXXXXXX
                     XXXX          XXX
                    XXXX            XXX
                   XX                XXX
                  XXX                 XX
                 XXX                    XX
                 XXX                     XX
                 XXX                     XXX
                 XX              XX XXX   XXXXXXXXXXX
                 XX           XXXXX   XXXX  XXXXX   XXXX
                 XX          XX                        XXX
                 X                                       XX
                 X                                        XX
                XX                                        OX7
               X                                            XX
              XX X  XX                                       XX
              X XX XXXX                                       XX

==== ecslib/emas-2900/generals_compares.txt ====
!TITLE Source of COMPARE
!<
%SYSTEMINTEGERFNSPEC pd addr(%STRING(255) FILE)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER I)
%EXTERNALINTEGERFN SSFAIL
   %RESULT=COMREG(24)
%END
%EXTERNALROUTINESPEC DEFINE(%STRING(255) STREAMS)
%EXTERNALROUTINESPEC SSFOFF
%SYSTEMSTRINGFNSPEC FAILURE MESSAGE(%INTEGER I)

%EXTERNALROUTINE COMPARE(%STRING(255)STREAMS); !COMPARE FILES A LA hd
%STRING(63)IN1,IN2,OUT
%CONSTINTEGER MAX=16, LINEMAX=128
%CONSTINTEGER NONE=0
%INTEGER ASTREAM,BSTREAM
%OWNINTEGER SKIP=1;  !TO IGNORE BLANK LINES
%OWNINTEGER ABASE=0, BBASE=0, ACOUNT=0, BCOUNT=0
%INTEGER ANUM,BNUM,INSTREAM,END OF FILE,IN1END,IN2END
%INTEGERARRAY AA,BB(1:MAX*LINEMAX)


==== ecslib/emas-2900/lpd_hlayouts.txt ====
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! ROUTINE REQUIRED TO DECODE AND SET STREAMS FOR EMAS.
!
%EXTERNALROUTINESPEC DEFINE (%STRING (63) S)
%EXTERNALROUTINESPEC SET MARGINS (%INTEGER J,K,L)
%ROUTINESPEC PROCESS DOCUMENT
%EXTERNALROUTINE LAYOUT (%STRING (63) S)
%EXTERNALINTEGERFNSPEC SSFAIL
%STRING (63) INFILE,OUTFILE,TIDYFILE
     %UNLESS S->INFILE.('/').OUTFILE %THENSTART
        SELECT OUTPUT (0)
        PRINTSTRING ('FAULTY PARAMETERS')  ;  NEWLINE
        %RETURN
     %FINISH
     %UNLESS OUTFILE->OUTFILE.(',').TIDYFILE %THEN TIDYFILE='.NULL'
!
! IF NO FILE NAME IS GIVEN FOR THE UPDATED SOURCE
! TAKE THE NULL FILE AS THE DEFAULT.
!

==== ecslib/emas-2900/generals_hasps.txt ====
! HASP for EMAS
%external %routine %spec DETACH (%string (255) STR)
%external %routine %spec DOCUMENTS (%string (255) PARAM)
%include "ECSC17.IMP77SPECS"

%external %routine HASP (%string (255) PARM)
   %integer NC
   %routine READ COMMANDS
      %on 9 %start
          %return
      %finish
      %cycle
         READ SYMBOL (NC)
         PRINT SYMBOL (NC)
      %repeat
   %end
   PARM = ",29" %if PARM=""
   PROMPT ("Hasp: ")
   OPEN OUTPUT (13, "T#HASP")
   SELECT INPUT (0)
   SELECT OUTPUT (13)

==== ecslib/emas-2900/pics_calender_june.txt ====


                         $$$$$$$$$$$$$$$$$$$$$
                       $$$                   $$$
                     $$                         $$
                   $$          $$$$$$$$$$         $$
                  $                      $          $
                 $                       $           $
               $$         $   $$       $$             $
              $                                         $
              $                                         $
              $            $$$   $$$$  $$               $
              $           $$$        $ $$$              $
              $                                         $
              $                $$$$$$                   $$
           $$$                                          $ $$
           $                                 $          $ $$
           $                                 $$$        $ $$
           $           $$$                  $          $$$
            $$$           $               $$           $
                $          $$$$$$$$$$$$$$$            $

==== ecslib/emas-2900/oldgeneraly_hasp.txt ====

   HASP options

This command allows a user to type in a batch job at the terminal, and it is
then entered on the batch queue, and will normally execute in parallel with
the users foreground work.  The default CPU limit is 29 seconds, so that the
job will run on the batch queue with the fastest turn a round.  The following
example show how the HASP command can be used.  The output from the batch job
is sent to the default line printer.

!< Basic example
   Command: HASP
   Hasp: IMP80 FILE1,FILE1Y
   Hasp: IMP80 FILE2,FILE2Y
   Hasp: RUN TEST
   Hasp: ^Y                                      { end of input }
   Batch job T#HASP entered on BATCH queue with cpu limit 29 sec.
!>
!< Increased CPU time

   Command: HASP ,1200

==== ecslib/emas-2900/whichemas.txt ====
! Program to inform you which EMAS it is running on, (2900 range).

%EXTERNAL %ROUTINE WHICHEMAS (%STRING(255) PARM)
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,RATION,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)
%CONSTSTRING (4) %ARRAY OCPTYPE(1 : 6) =  "2950","2960","2970",
     "2980","2972","2976"
%RECORDNAME R(COMF)

==== ecslib/emas-2900/basicpd_bhelpi.txt ====
      E.C.S.D. BASIC Interpreter Version 1D.


     To run the program type BASIC. The highest level in the interpreter
is the edit phase (The prompt is ':'). Any BASIC line can be typed (in
any order) at this point. Also valid are the commands RUN,LIST,SAVE,DUMP
,NODUMP,RESEQUENCE, & STOP
    Should the running BASIC program require data via an INPUT statement
the prompt is '?'.

     It is possible to interrupt the running program by hitting 'ESC'
and typing 'EXIT'.

     By typing 'BASIC(<file>)', BASIC statements will be read from
<file> and control returned to the console when <file> has been
exhausted. Commands, as above, are not accepted.

  Differences from 'standard' BASIC are as follows.

     A) Redimensioning in MAT instructions is not yet implemented


==== ecslib/emas-2900/contents.txt ====



____________       _______________   __________    ____________________

PROGRAM NAME       LIBRARY/PROGRAM   ORIGINATOR    DOCUMENTATION SOURCE

ARTHUR             CSDEPT.PDP16LIB   P.S.Robertson   Departmental Report

Compatible Context CSDEPT.EDLIB      H.Dewar         Departmental Report

Editor

Interdata          CSDEPT.ISKMPLIB   D.J.Rees        D.J.Rees
SKIMP

IMP Interpreter    CSDEPT.IMPILIB    P.S.Robertson   CSDEPT.IMPIDOC

LAYOUT             CSDEPT.LAYOLIB    H.Dewar         Departmental Report

BASIC              CSDEPT.BASICLIB   W.A.Paterson    BHELP [1]

SOAP               CSDEPT.IMPILIB    P.S.Robertson   CSDEPT.SOAPDOC

==== ecslib/emas-2900/edwin_pas.txt ====
{ NB: Specs for Version 4 of EDWIN :  See ECSLIB.EDWIN_PSPECS for latest info }
{ EDWIN procedure specs in PASCAL format.}

{ Routines for initialisation and termination}
procedure initialise_for ( devicetype : integer); extern;
procedure terminate_edwin; extern;

{ Output primitives}
procedure move_abs ( x, y : integer); extern;
procedure move_rel ( dx, dy : integer); extern;
procedure line_abs ( x, y : integer); extern;
procedure line_rel ( dx, dy : integer); extern;
procedure marker_abs ( n, x, y : integer); extern;
procedure marker_rel ( n, dx, dy : integer); extern;
procedure character ( sym : char); extern;

{ Control}
procedure newframe; extern;
procedure update; extern;
procedure store_on ( stream : integer); extern;
procedure store_off; extern;

==== ecslib/emas-2900/vlsiuse_cifview.txt ====
!<ANALYSE
  ANALYSE <cif file>

     These commands are used to read a CIF description into  the  internal
  data structure in preparation for drawing.   A syntax check is performed
  on the CIF as it is read in.  If an error  is  detected  then  the  cell
  containing  the  error is marked and only the Bounding Box for this cell
  will be drawn if an attempt is made to draw the cell.   There are  three
  types of error, namely  WARNINGS (given for the users information):

     ?  Line 234  Cell FRED contains no geometry

  FAULTS (which allow only the bounding box of a cell to be drawn):

     *  Line 545  Point only contains one digit

  and DISASTERS (the ones which never happen?):

     #  Line 999  Internal data structure corrupt - please seek assistance

     The  number  typed  is  the  line number of the source text where the

==== ecslib/emas-a/unixforall.txt ====
			The GNU Manifesto

Copyright (C) 1985 Richard M. Stallman
  (Copying permission notice at the end.)

What's GNU?  Gnu's Not Unix!

GNU, which stands for Gnu's Not Unix, is the name for the complete
Unix-compatible software system which I am writing so that I can give it
away free to everyone who can use it.  Several other volunteers are helping
me.  Contributions of time, money, programs and equipment are greatly
needed.

So far we have a portable C and Pascal compiler which compiles for Vax and
68000 (though needing much rewriting), an Emacs-like text editor with Lisp
for writing editor commands, a yacc-compatible parser generator, a linker,
and around 35 utilities.  A shell (command interpreter) is nearly
completed.  When the kernel and a debugger are written, it will be possible
to distribute a GNU system suitable for program development.  After this we
will add a text formatter, an Empire game, a spreadsheet, and hundreds of
other things, plus on-line documentation.  We hope to supply, eventually,

==== ecslib/emas-a/commands/createcon/helpfile.txt ====
!TITLE CREATECON
!TOPIC CREATECON
!<CREATECON
!ADDKEY CONTROL,UNDERGRADUATE,STUDENT
                    
  Command:CREATECON SpecFile,SourceName[,ObjName,NewSpecFile]

  This command writes an IMP program that can be used to control a student
subsystem.
  The command has been provided to help course supervisors make use of the
mechanisms available to control their student system environment. Using these
mechanisms the supervisor can control the commands and files accessable by the
student, as well as providing an initialisation routine.
  In most cases the supervisor will not have to do any programming at all, he
need simply call this command. However, where more complex control is required
the program written by the command CREATECON can be used as a base for a more
complex system.
       
!<The IMP program
!PAGE
  

==== ecslib/emas-a/commands/createcon/alert.txt ====
RJG 17-FEB-87
NEWCRCON is a version of CREATECON which produces a control file which allows
student processes to connect to other student object files.
NEWCRCON is used in exactly the same way as is CREATECON.  It is useful to
include the EXPORT command in the specfile in ECSC97.

==== ecslib/emas-a/commands/createcon/ncc.txt ====
%externalroutine NEWCRCON %alias "C#NEWCRCON"

!*******************************************************************************
!    
!                       Undergraduate Control Program Writer
!                       ------------------------------------
!   This program is designed to help student course supervisors write the
!  controlling routines for their student subsystem. It can be used to write
!  all the control software that is needed in the simplest case or it can be
!  used as a basis for more complicated routines if necessary.
!   The program is written in the form of a command to make its use as simple
!  and as quick as possible.
!   Since it is written using PAM ,full online help ( should ) be available.
!
!   Note that it will be neccessary to change the 'HelpFile' constant if the
!  program is renamed or moved to another file area.
!
!                                         ( Paul Clenahan    August 1986 )
!
!*******************************************************************************
!AMENDMENTS

==== ecslib/emas-a/commands/createcon/createcon1.txt ====
%externalroutine CREATECON %alias "C#CREATECON"

!*******************************************************************************
!    
!                       Undergraduate Control Program Writer
!                       ------------------------------------
!   This program is designed to help student course supervisors write the
!  controlling routines for their student subsystem. It can be used to write
!  all the control software that is needed in the simplest case or it can be
!  used as a basis for more complicated routines if necessary.
!   The program is written in the form of a command to make its use as simple
!  and as quick as possible.
!   Since it is written using PAM ,full online help ( should ) be available.
!
!   Note that it will be neccessary to change the 'HelpFile' constant if the
!  program is renamed or moved to another file area.
!
!                                         ( Paul Clenahan    August 1986 )
!
!*******************************************************************************


==== ecslib/emas-a/commands/createcon/createcon2.txt ====
%externalroutine CREATECON %alias "C#CREATECON"

!*******************************************************************************
!    
!                       Undergraduate Control Program Writer
!                       ------------------------------------
!   This program is designed to help student course supervisors write the
!  controlling routines for their student subsystem. It can be used to write
!  all the control software that is needed in the simplest case or it can be
!  used as a basis for more complicated routines if necessary.
!   The program is written in the form of a command to make its use as simple
!  and as quick as possible.
!   Since it is written using PAM ,full online help ( should ) be available.
!
!   Note that it will be neccessary to change the 'HelpFile' constant if the
!  program is renamed or moved to another file area.
!
!                                         ( Paul Clenahan    August 1986 )
!
!*******************************************************************************
!AMENDMENTS

==== ecslib/emas-a/commands/createcon/newcrcon.txt ====
%externalroutine NEWCRCON %alias "C#NEWCRCON"

!*******************************************************************************
!    
!                       Undergraduate Control Program Writer
!                       ------------------------------------
!   This program is designed to help student course supervisors write the
!  controlling routines for their student subsystem. It can be used to write
!  all the control software that is needed in the simplest case or it can be
!  used as a basis for more complicated routines if necessary.
!   The program is written in the form of a command to make its use as simple
!  and as quick as possible.
!   Since it is written using PAM ,full online help ( should ) be available.
!
!   Note that it will be neccessary to change the 'HelpFile' constant if the
!  program is renamed or moved to another file area.
!
!                                         ( Paul Clenahan    August 1986 )
!
!*******************************************************************************
!AMENDMENTS

==== ecslib/emas-a/commands/createcon/createcon.txt ====
%externalroutine CREATECON %alias "C#CREATECON"

!*******************************************************************************
!    
!                       Undergraduate Control Program Writer
!                       ------------------------------------
!   This program is designed to help student course supervisors write the
!  controlling routines for their student subsystem. It can be used to write
!  all the control software that is needed in the simplest case or it can be
!  used as a basis for more complicated routines if necessary.
!   The program is written in the form of a command to make its use as simple
!  and as quick as possible.
!   Since it is written using PAM ,full online help ( should ) be available.
!
!   Note that it will be neccessary to change the 'HelpFile' constant if the
!  program is renamed or moved to another file area.
!
!                                         ( Paul Clenahan    August 1986 )
!
!*******************************************************************************
!AMENDMENTS

==== ecslib/emas-a/impis-unpacked/sints.txt ====


%ENDOFLIST
%CONSTSHORTINTEGERARRAY MAIN(1 : 359) =  %C
    1,    7,   13,   18,   22,   25,   29,   33,   37,   40,   47,   51,
   54,   59,   62,   65,   68,   72,   76,   80,   84,   90,   94,   98,
  103,  108,  113,  118,  122,  127,  135,  139,    0,  141,  144,  145,
  152,    0,  157,  159,  161,  163,    0,  165,  167,  168,  169,  174,
    0,  178,  181,  182,  186,  187,  188,  189,    0,  199,  202,    0,
  205,  206,  207,  209,    0,  211,  213,    0,  215,  218,    0,  220,
  226,  230,  233,  235,  238,  241,  243,  245,  247,  249,    0,  251,
  253,  254,  256,  257,  259,  261,  263,    0,  265,  267,  268,  269,
  272,  274,  275,  277,  279,  281,    0,  283,  285,    0,  287,  289,
    0,  291,  294,  298,  301,  303,  304,  305,  306,  308,  309,  311,
  312,    0,  316,  320,  321,  324,  325,  331,    0,  333,  338,  339,
  341,  343,  347,    0,  351,  353,  355,  356,  357,  359,  361,  363,
  365,  367,  369,  371,  373,  375,  377,  379,    0,  381,  382,  383,
    0,  389,  396,  402,  403,  409,  410,  416,  417,  419,  422,    0,
  424,  426,    0,  428,  435,  439,    0,  442,  444,  445,  447,  449,
  451,  453,  455,  457,  459,    0,  461,  464,    0,  466,  469,  472,
  476,  479,  481,  483,  485,  487,  490,  493,  495,  498,  501,  504,

==== ecslib/emas-a/impis-unpacked/newintps.txt ====


* PHRASE STRUCTURE DEFINITION FOR IMP INTERPRETER

B[S] = 15
B[NAME] = 14
B[C LIST] = 12
B[FAIL] = 11
B[C TEXT] = 10
B[STRING] = 9
B[NAMELIST] = 8
B[MARK] = 7
B[HOLE] = 6
B[CONSTANT] = 5
B[NUMBER] = 4
B[MC]      = 2
B[INTEGER] = 3


P(SS)
     [HOLE](UI)[MARK](R SS1)[S]:

==== ecslib/emas-a/impis-unpacked/utilits.txt ====


%EXTERNALROUTINESPEC PROTECT(%STRING (63) S)
%EXTERNALROUTINESPEC CHERISH(%STRING (63) S)
%EXTERNALROUTINESPEC DEFINE(%STRING (63) S)

%EXTERNALROUTINE FAULTS(%STRING (63) FILE)

%ROUTINE READ LINE(%STRINGNAME L)
%INTEGER S
             L = ''
             READCH(S)
             %IF S = 25 %START
                PRINTCH(7);  NEWLINE
                *LM_4,15,16(8)
                *BCR_15,15
             %FINISH

             %CYCLE
                L = L.TOSTRING(S)
                %RETURN %IF S = NL

==== ecslib/emas-a/impis-unpacked/intexts.txt ====


!
!**************************************************
!*                                                *
!*    VARIOUS EXTERNAL ROUTINES FOR IMPI          *
!*                                                *
!***************************************************
!
%TRUSTEDPROGRAM
%EXTERNALINTEGER MON REP = 0;           ! REPETITION COUNTER FOR RESUMES
%EXTERNALBYTEINTEGER MONLOCK
%EXTRINSICINTEGER MONFRAME, MONINFO, BRKR9AD
%OWNSHORTINTEGER TRAP BLOCK, TRAP LINE
!

%EXTERNALROUTINE EXTINIT
          *MVI_4(13),X'55';             ! FLAG FOR MDIAG
%END

%EXTERNALROUTINE HEX(%INTEGER N)

==== ecslib/emas-a/impis-unpacked/soapdoc.txt ====




















                           _________________

                           SOAP USER'S GUIDE

==== ecslib/emas-a/impis-unpacked/soaps.txt ====


%CONSTSHORTINTEGERARRAY MAIN(1 : 217) =    %C
    1,    5,   14,   20,   26,   38,   43,   48,   54,   61,   68,   74,
   79,   82,   84,   89,   96,  102,  108,  115,  122,  126,    0,  129,
  133,  137,  142,  145,  152,  156,  161,  164,  168,    0,  171,    0,
  178,  184,  185,  189,  190,  193,  196,  199,    0,  202,  205,  206,
  208,    0,  211,  213,  215,  216,  219,  222,  225,    0,  228,  231,
  236,  241,  244,  249,    0,  253,  259,  260,  264,  266,  267,  270,
  271,  274,  277,  279,  280,  283,  286,  289,  292,  295,  298,  302,
  305,  308,  311,  314,  317,  320,  324,  328,  332,  336,  340,  344,
  348,  352,  355,  358,    0,  361,  363,  365,  373,    0,  381,    0,
  385,  392,  393,  396,  397,  400,  403,  405,  406,  410,    0,  413,
  418,  425,  432,    0,  435,  437,    0,  440,  445,  446,  450,  453,
  456,    0,  459,  462,  463,    0,  469,  472,  473,  475,    0,  477,
  489,  499,  506,    0,  509,  511,  512,  517,    0,  520,    0,  530,
  534,  535,  538,  539,    0,  543,  546,  547,    0,  558,  565,  566,
  571,  572,  576,  579,    0,  585,  587,  588,  591,    0,  594,  597,
    0,  600,  602,  603,  608,  609,  614,  615,  618,    0,  620,  622,
  623,  627,  628,  631,  634,  637,    0,  640,  646,    0,  651,  656,
  657,  660,  661,  665,    0,  667,    0,  670,  674,  675,  678,  681,

==== ecslib/emas-a/impis-unpacked/intsyss.txt ====


!
!*******************************************************************
!*                                                                 *
!*       SYSTEM ROUTINES FOR IMP INTERPRETER VERSION 8             *
!*                                                                 *
!*******************************************************************
!
!
%TRUSTEDPROGRAM
%RECORDFORMAT AGFM(%INTEGER EP, %STRING (17) NAME,  %C
          %INTEGER P1, P2, %INTEGERNAME FLAG)
%EXTERNALINTEGER INTSIZE = 16;          ! DEFAULT OF 16 PAGES
%EXTERNALBYTEINTEGER INIMPI = 0
%EXTERNALINTEGER INTGLA = 0
%OWNSTRING (6) INT OWNER = 'CONLIB'
%EXTERNALSTRING (8) OBJECT = 'IMPIOBJ'
%EXTRINSICBYTEINTEGER INSTREAM, COMPMODE, IOFLAG, MDACTIVE
%SYSTEMINTEGERFNSPEC COMREG(%INTEGER N);! TO GIVE ADDRESSES
%EXTERNALINTEGER REG9 = -1

==== ecslib/emas-a/impis-unpacked/intperms.txt ====


*
*
**********************************************************************
*                                                                    *
*                                                                    *
*              PERM FOR  IMP INTERPRETER VERSION 8                   *
*                                                                    *
*                                                                    *
**********************************************************************
*
*
*
*  PERM CONVENTIONS
*    GPR 0 : 3 ARE ALWAYS AVAILABLE FOR WORK REGISTERS
*    ALL OTHERS MUST BE SAVED AND RESTORED
*
*  ALL PERM ROUTINES ARE ENTERED BY '*BAL_15,PERM00'
*  EXCEPT WHERE OTHERWISE STATED
*

==== ecslib/emas-a/impis-unpacked/neweds.txt ====
%CONTROL 0
%EXTERNALROUTINESPEC RIM(%INTEGER CNSL, %STRING (15) MES)
%EXTERNALINTEGERFNSPEC TESTINT(%INTEGER C %STRING(15) S)
%EXTERNALROUTINE EDINNER(%INTEGER INTOP,INSIZE,SINTOP,SINSIZE,TOP %C
%INTEGERNAME SIZE)
%SHORTROUTINE
%OWNINTEGER MON;                        !MONITOR INDIC
%OWNINTEGER PRINT1, PRINT2;             !PRINT INDICS
%OWNINTEGER STOP = -5000;               !LOOP STOP (CONST)
%INTEGER I, J, FP0, FP1, SYM
%BYTEINTEGER K
%OWNINTEGER PFLIP;                      !PROMPT FLIP-FLOP
%OWNSTRING (2) PROM = '>';              !COMMAND PROMPT
%OWNINTEGER CMAX;                       !COMMAND CELL MAX
%INTEGER CI;                            !COMMAND INDEX
%INTEGER TI;                            !TEXT INDEX
%INTEGER CODE;                          !COMMAND CODE
%INTEGER LIM;                           !SEARCH LIM
%INTEGER CODELIM;                       !LIM/CODE
%INTEGER TEXT;                          !TEXT STRING POINTER
%INTEGER NUM;                           !REPETITION NUMBER

==== ecslib/emas-a/impis-unpacked/pdiags.txt ====


!
!******************************************
!*                                        *
!*  MODIFIED MDIAG TO CO-OPERATE WITH     *
!*  THE IMP INTERPRETER (FLAG = 5)        *
!*                                        *
!******************************************
!
%DYNAMICROUTINESPEC DEFINE(%STRING(63) S)
%SYSTEMINTEGERFNSPEC I8DIAG(%INTEGER EP, EXTRA)
%OWNINTEGER MON HEX ADDR, BRIEF ADDR
%OWNINTEGER DTLAST = 0
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)

%ROUTINE SIGNAL(%INTEGER J,K,L,%INTEGERNAME FLAG)
%RECORDFORMAT AGFM(%INTEGER EP,%STRING(17) S,%INTEGER P1,P2,%C
%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC AGENCY(%INTEGER P1,%RECORDNAME P)
%RECORD P(AGFM)

==== ecslib/emas-a/impis-unpacked/intdoc.txt ====


=                                                              =









                     _____________________________

                     IMP8 INTERPRETER USER'S GUIDE


    The IMP8 INTERPRETER is an interactive IMP compiler with editing
    facilities,  which  runs under the EDINBURGH MULTI-ACCESS SYSTEM
    on the ICL 4/75.

    IMP statements are read in from the console, compiled,  executed
    immediately,  and  then  discarded.    Compound  statements  and

==== ecslib/emas-a/impis-unpacked/vagrens.txt ====


%CONTROL 0

!
!VAGRANCY AIDS FOR USERS MK.1
!J.C.A.     17:05:74
!
%EXTERNALROUTINE VAGRANCY(%STRING(63) S)
!
!TAKES A FILE OF TRACE INFO FROM BUGGED COMPILER OR INTERPRETER
!GIVES SUMMARY OF RESULTS IN FILE
!GIVES PAGE TURNS & CPU USED IN EACH CALL OF A ROUTINE
!PLUS RATIOS OF PAGEFAULTS  V CPU TIME
!
%EXTERNALROUTINESPEC DEFINE(%STRING(63) S)
%EXTERNALROUTINESPEC SET MARGINS(%INTEGER STREAM,LHM,RHM)
!
%RECORDFORMAT HOLDE(%INTEGER CPU,PTURN,%SHORTINTEGER ENTRY,EXIT)
%INTEGER FILE,DATAPTR,ENDPTR,F
%INTEGER RTWAS,CPUIS,CPUWAS,PTURNIS,PTURNWAS

==== ecslib/emas-a/neweds.txt ====
%CONTROL 0
%EXTERNALROUTINESPEC RIM(%INTEGER CNSL, %STRING (15) MES)
%EXTERNALINTEGERFNSPEC TESTINT(%INTEGER C %STRING(15) S)
%EXTERNALROUTINE EDINNER(%INTEGER INTOP,INSIZE,SINTOP,SINSIZE,TOP %C
%INTEGERNAME SIZE)
%SHORTROUTINE
%OWNINTEGER MON;                        !MONITOR INDIC
%OWNINTEGER PRINT1, PRINT2;             !PRINT INDICS
%OWNINTEGER STOP = -5000;               !LOOP STOP (CONST)
%INTEGER I, J, FP0, FP1, SYM
%BYTEINTEGER K
%OWNINTEGER PFLIP;                      !PROMPT FLIP-FLOP
%OWNSTRING (2) PROM = '>';              !COMMAND PROMPT
%OWNINTEGER CMAX;                       !COMMAND CELL MAX
%INTEGER CI;                            !COMMAND INDEX
%INTEGER TI;                            !TEXT INDEX
%INTEGER CODE;                          !COMMAND CODE
%INTEGER LIM;                           !SEARCH LIM
%INTEGER CODELIM;                       !LIM/CODE
%INTEGER TEXT;                          !TEXT STRING POINTER
%INTEGER NUM;                           !REPETITION NUMBER

==== ecslib/emas-a/impis.txt ====

 NEWEDS,SINTS,INTPERMS,INTSYSS,PDIAGS,SOAPS,UTILITS,INTEXTS,VAGRENS,NEWINTPS,SOA
PDOC,INTDOC


%CONTROL 0
%EXTERNALROUTINESPEC RIM(%INTEGER CNSL, %STRING (15) MES)
%EXTERNALINTEGERFNSPEC TESTINT(%INTEGER C %STRING(15) S)
%EXTERNALROUTINE EDINNER(%INTEGER INTOP,INSIZE,SINTOP,SINSIZE,TOP %C
%INTEGERNAME SIZE)
%SHORTROUTINE
%OWNINTEGER MON;                        !MONITOR INDIC
%OWNINTEGER PRINT1, PRINT2;             !PRINT INDICS
%OWNINTEGER STOP = -5000;               !LOOP STOP (CONST)
%INTEGER I, J, FP0, FP1, SYM
%BYTEINTEGER K
%OWNINTEGER PFLIP;                      !PROMPT FLIP-FLOP
%OWNSTRING (2) PROM = '>';              !COMMAND PROMPT
%OWNINTEGER CMAX;                       !COMMAND CELL MAX
%INTEGER CI;                            !COMMAND INDEX
%INTEGER TI;                            !TEXT INDEX

==== ecslib/emas-a/impidoc.txt ====





                     _____________________________

                     IMP8 INTERPRETER USER'S GUIDE


    The IMP8 INTERPRETER is an interactive IMP compiler with editing
    facilities, which runs under the EDINBURGH  MULTI-ACCESS  SYSTEM
    on the ICL 4/75.

    IMP  statements are read in from the console, compiled, executed
    immediately,  and  then  discarded.    Compound  statements  and
    complete procedures are saved pending later execution.




                        _______________________

                        CALLING THE INTERPRETER


==== ercc07/xgen25s.txt ====
!* modified 16/07/86
!*
%ownstring(31) Versiontext="Fortran77 Compiler Version 0.1"
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)

==== ercc07/icom3s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER N)
%EXTERNALSTRINGFNSPEC HTOS(%INTEGER N,P)

==== ercc07/ienter3s.txt ====
!
! Chenge for enter3
!    1) Changes to storef for larger AMTs
!
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
!
%recordformat parmf(%integer dest,srce,p1,p2,p3,p4,p5,p6)
!
%routine sos;                           ! flash 'SOS' on system console lights
%longinteger loop ext psw,wait ext psw,sos timer
%constlonginteger sec=x'00000000f4240000'; ! 1 second
%constlonginteger hsec=sec>>1;             ! half second
%constlonginteger qsec=sec>>2
%constlonginteger wpsw=psw0!x'0106000000000000'
%integer i,count
   sos timer=-1
   *sckc_sos timer;                     ! maximum
   *basr_15,0; *using_15
   *la_0,<loopint>; *st_0,i; *la_0,<waitint>; *st_0,count; *drop_15
   loop ext psw=psw0!i

==== ercc07/gldgen02s.txt ====
!
! Recent Changes
! **************
!
!      23 JUne 87 Unecessary top bits maked out in recordelad. These
!            caused no trouble till NP1 which has 32 bit addressing
!              Also check removed on convert longinteger to integer
!     8 May 87 Change so RT Params are double word aligned
!     20Apr 87 Changes so that array heads (Long integers) are double word aligned
!     Feb 87 Substantial changes to support 64 bit integers
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION

==== ercc07/idev11s.txt ====
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
%include "ercc07:ibmsup_dtform1s"
%include "ercc07:IBMSUP_xaioform"
%record %format PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %or %string (23) TEXT))
%record %format PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%if VA MODE=YES %start
   %const %record (PARMXF) %array %name PARM=PARM0AD
%finish %else %start
!* %externalintegerspec parmad
   %own %record (PARMXF) %array %name PARM
!* %ownrecord(parmxf)%arrayformat parmaf(0:128)
%finish
!
%external %integer %fn %spec REALISE(%integer VAD)
%external %integer %fn %spec HSCH(%integer SLOTADDR)
%external %integer %fn %spec TSCH(%integer SLOTADDR, %record (IRBF) %name IRB)
%external %integer %fn %spec SSCH(%integer SLOTADDR,CCWA,KEY)

==== ercc07/ibmgen02s.txt ====
%INCLUDE "ERCC07:ITRIMP_HOSTCODES"
%CONSTINTEGER HOST=IBMXA
%CONSTINTEGER TARGET=AMDAHL
%CONSTINTEGER FOURKTDISP=0
%INCLUDE "ERCC10:OPOUTS"
!
%CONSTINTEGER LGR=X'58',AND=X'54',ICP=X'59';      ! VARIANT MNEMONICS
%IF TARGET=IBM %THEN %START
      %OWNINTEGER BALCODE=BAL
%FINISH %ELSE %START
      %OWNINTEGER BALCODE=BAS
%FINISH
%CONSTINTEGER MARGIN=512;               ! MARGIN FOR ADRESSABILITY
%CONSTINTEGER MAXREG=19;                ! FOR DECLARING REGISTER ETC
%CONSTINTEGER CODER=12
%CONSTINTEGER  WSPR =11
%CONSTINTEGER  GLAREG =13
%CONSTINTEGER LINKREG=15;               ! REGISTER FOR RETURN ADDRESS
%CONSTINTEGER EPREG=14;                 ! REGISTER HOLDING RT ENTRYPOINT
%CONSTINTEGER CTABLEREG=14;             ! REGISTER HOLDING CONSTANT TABLE
%CONSTINTEGER GR0=X'000F0000';          ! ANY GR FROM 0-15

==== ercc07/xgen26s.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/pdriver01s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3(%STRING (255) %NAME Command,Param,
   %INTEGER %NAME Flag)
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %STRING (15) %FN %SPEC ItoS %ALIAS "S#ITOS"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,

==== ercc07/makep3_gen.txt ====
offer p3gens
parm nocheck
edit perq3gen02s,p3gens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes5>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs2>
e
imp p3gens,.null
offer p3gens,ercs01

==== ercc07/icom4s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF((%INTEGER DEST,SRCE %ORSHORT DSNO,DACT,SSNO,SACT),(%INTEGER P1,P2,P3,P4,
   P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER N)

==== ercc07/pnxgen05s.txt ====
%INCLUDE "ERCC07:iTRIMP_HOSTCODES"
%CONSTINTEGER HOST=AMDAHL
%CONSTINTEGER TARGET=PNX
%INCLUDE "ERCS04:PNX_CCODES"
%INCLUDE "ERCC07:TRIPCNSTS"
%INCLUDE "ERCC07:ITRIMP_TFORM2S"
%CONSTINTEGER ESTK=0,BR0=1,BR1=2,BR2=3,BR3=4,FR0=5,FR1=6,FR2=7,FR3=8,
               BRN=BR0<<16!BR3,FRN=FR0<<16!FR3
%RECORDFORMAT REGF(%INTEGER CL,(%INTEGER USE %ORHALF SECUSE,PRIMUSE), %INTEGER INF1,INF2,AT,
   LINK)
%OWNINTEGER CABUF,GLACABUF,GLABEL,FPPTR,FPHEAD
%OWNINTEGERNAME CA,GLACA,PPCURR
%OWNINTEGERARRAYNAME CTABLE,TAGS
!%OWNBYTEINTEGERARRAYNAME CODE
%OWNRECORD (LISTF) %ARRAYNAME ASLIST
%EXTRINSICINTEGERARRAY CAS(0:12)
%EXTRINSICRECORD (WORKAF) WORKA
%EXTRINSICRECORD (PARMF) PARM
%CONSTINTEGER MAXREG=8
%OWNRECORD (REGF) %ARRAY REGS(0:MAXREG)
%EXTERNALROUTINESPEC FLAGAND FOLD(%RECORD (TRIPF) %ARRAYNAME T)

==== ercc07/pdfiletogps.txt ====
!*
!*          Record and array formats
!*
%RECORDFORMAT HF(%INTEGER DATAEND,DATASTART,FILESIZE,FILETYPE,SUM,DATETIME,FORMAT,RECORDS)
%RECORDFORMAT PDF(%INTEGER START, %STRING (11) NAME, %INTEGER HOLE,S5,S6,S7)
%RECORDFORMAT PDHF(%INTEGER DATAEND,DATASTART,SIZE,FILETYPE,SUM,DATETIME,ADIR,COUNT)
%RECORDFORMAT RF(%INTEGER CONAD,FILETYPE,DATASTART,DATAEND)
%OWNRECORD (PDF) %ARRAYFORMAT DIRAF(0:4095)
%EXTERNALROUTINESPEC EMAS3 INTEGER(%STRINGNAME VECTOR, %INTEGERNAME VALUE)
%EXTERNALROUTINESPEC EMAS3 STRING(%STRINGNAME VECTOR,VALUE)
%EXTERNALROUTINESPEC SET RETURN CODE %ALIAS "S#SETRETURNCODE"(%INTEGER N)
%RECORDFORMAT CHDRFORM(%INTEGER CONAD,FILETYPE,DATASTART,DATAEND)
%EXTERNALROUTINESPEC COPY %ALIAS "s#copy"(%STRING (255) F,T, %INTEGERNAME FLAG)
%EXTERNALROUTINESPEC DISCONNECT %alias "S#DISCONNECT" (%STRING (255) FILE, %INTEGERNAME FLAG)
%RECORDFORMAT OINFF(%STRING (11) NAME, %INTEGER SP12,NKB, %BYTEINTEGER ARCH,CODES,CCT,OWNP,
   EEP,USE,CODES2,SSBYTE,FLAGS,PHEAD,DAYNO,GROUP)
!
      { if PHEAD is non zero, this record has been permitted }
      { to one or more users                                 }
      { if GROUP is non zero, this record refers to a group  }
%EXTERNALINTEGERFNSPEC DFILENAMES(%STRINGNAME GROUP, %INTEGERNAME FILENO,MAXREC,NFILES,FSYS,

==== ercc07/gldgen03s.txt ====
!
! Recent Changes
! **************
!
!      23 JUne 87 Unecessary top bits maked out in recordelad. These
!            caused no trouble till NP1 which has 32 bit addressing
!              Also check removed on convert longinteger to integer
!     8 May 87 Change so RT Params are double word aligned
!     20Apr 87 Changes so that array heads (Long integers) are double word aligned
!     Feb 87 Substantial changes to support 64 bit integers
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION

==== ercc07/idev12s.txt ====
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
%include "ercc07:ibmsup_dtform1s"
%include "ercc07:IBMSUP_xaioform"
%record %format PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %or %string (23) TEXT))
%record %format PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%if VA MODE=YES %start
   %const %record (PARMXF) %array %name PARM=PARM0AD
%finish %else %start
!* %externalintegerspec parmad
   %own %record (PARMXF) %array %name PARM
!* %ownrecord(parmxf)%arrayformat parmaf(0:128)
%finish
!
%external %integer %fn %spec REALISE(%integer VAD)
%external %integer %fn %spec HSCH(%integer SLOTADDR)
%external %integer %fn %spec TSCH(%integer SLOTADDR, %record (IRBF) %name IRB)
%external %integer %fn %spec SSCH(%integer SLOTADDR,CCWA,KEY)

==== ercc07/algtests_at24a.txt ====
'BEGIN'
    'INTEGER' 'ARRAY'
        A(/1 : 9/);
    'INTEGER'
        I,
        S;
    'PROCEDURE' DUMMY(A);
        'VALUE'
            A;
        'ARRAY'
            A;
        SUM(A);
    'PROCEDURE' SUM(A);
        'ARRAY'
            A;
        'FOR' I := 1 'STEP' 1 'UNTIL' 9 'DO'
            'BEGIN'
            S := S + A(/I/);
            A(/I/):= 0
            'END';
    S := 0;

==== ercc07/ibmgen03s.txt ====

!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.

==== ercc07/xgen27s.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/fbench1s.txt ====
      PROGRAM teste
c     floating point, double precision arithmetic test
C     MAIN PROGRAM - EVALUATES INTEGRAL TO AN ACCURACY OF 8D
C                    INCREASING THE NUMBER OF STRIPS UNTIL REQUIRED
C                    ACCURACY IS REACHED
C               (A)  USING TRAPEZOIDAL RULE
C               (B)  USING SIMPSON'S RULE
C
      implicit double precision (a-h,o-z)
      character*18 type
C     (A)
C
      type='Trapezoidal Rule  '
      A=1.0
      B=2.2
C
      N=2
      ICOUNT=0
      WRITE(unit=6,fmt=103)type
   10 W=(B-A)/N
      ICOUNT=ICOUNT+1

==== ercc07/pdriver02s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

!%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3(%STRING (255) %NAME Command,Param,
   %INTEGER %NAME Flag)
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %STRING (15) %FN %SPEC ItoS %ALIAS "S#ITOS"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,

==== ercc07/icom5s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF((%INTEGER DEST,SRCE %ORSHORT DSNO,DACT,SSNO,SACT),(%INTEGER P1,P2,P3,P4,
   P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC REALISE(%INTEGER VIRTAD)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)

==== ercc07/drslink3.txt ====
LINK
ERCC07:dP1Y
ERCC07:DP22Y
ERCC07:DOPT3Y
ERCC07:DGEN3Y
ERCC07:CSERV01x
ercs01:EBITS_etrput1y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
eGENERATEOBJECT,ICL9CEZDRSIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/drslink4.txt ====
LINK
ERCC07:dP1Y
ERCC07:DP22Y
ERCC07:DOPT3Y
ERCC07:DGEN4Y
ERCC07:CSERV01x
ercs01:EBITS_etrput1y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
eGENERATEOBJECT,ICL9CEZDRSIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/pnxgen06s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/drslink5.txt ====
LINK
ERCC07:dP1Y
ERCC07:DP23Y
ERCC07:DOPT3Y
ERCC07:DGEN5Y
ERCC07:CSERV01x
ercs01:EBITS_etrput2y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
eGENERATEOBJECT,ICL9CEZDRSIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/docs_lpool.txt ====

           Notes on a Visit to Liverpool University Computing Service

Present: Ian Stimpson   LUCS
         P.Stephens     EUCS
         J.Livingstone  EUCS

     Liverpool Computing Service is small in terms of people (17 Academics) and
has standardised on IBM Hardware and Software.  It also operates 3 VMS machines
as departmental resource. No departments operate their own MUMs as a matter of
computing policy. There is at present no Unix on the campus but LUCS expect to
operate a Unix service for engineers before next academic year.

     The main service is VM/CMS on a 32 Mbyte 6Mip 3081 which supports 200+
users. Interactive response is said to be good but shortage of CPU is noticeable.
Terminals, and also almost all micros on the campus, are IBM PC clones bought by
LUCS. These emulate Ibm 3270 full screen terminals which reduce the mainframe
demand for operations like editing.

     LUCS also operate separate IBM machines for the Library using the
specialist IBM software package xxxxxx-yyyyyy and for the Data processing

==== ercc07/gldgen04s.txt ====
!
! Recent Changes
! **************
!
!      23 JUne 87 Unecessary top bits maked out in recordelad. These
!            caused no trouble till NP1 which has 32 bit addressing
!              Also check removed on convert longinteger to integer
!     8 May 87 Change so RT Params are double word aligned
!     20Apr 87 Changes so that array heads (Long integers) are double word aligned
!     Feb 87 Substantial changes to support 64 bit integers
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION

==== ercc07/idev13s.txt ====
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
%include "ercc07:ibmsup_dtform1s"
%include "ercc07:IBMSUP_xaioform"
%record %format PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %or %string (23) TEXT))
%record %format PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%if VA MODE=YES %start
   %const %record (PARMXF) %array %name PARM=PARM0AD
%finish %else %start
!* %externalintegerspec parmad
   %own %record (PARMXF) %array %name PARM
!* %ownrecord(parmxf)%arrayformat parmaf(0:128)
%finish
!
%external %integer %fn %spec REALISE(%integer VAD)
%external %integer %fn %spec HSCH(%integer SLOTADDR)
%external %integer %fn %spec TSCH(%integer SLOTADDR, %record (IRBF) %name IRB)
%external %integer %fn %spec SSCH(%integer SLOTADDR,CCWA,KEY)

==== ercc07/ibmgen04s.txt ====

!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.

==== ercc07/pdriver03s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %STRING (15) %FN %SPEC ItoS %ALIAS "S#ITOS"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,
   %STRING %NAME Name)
%EXTERNAL %ROUTINE %SPEC Edataref(%INTEGER Area,Offset,Length,

==== ercc07/timp01s.txt ====
%CONSTSTRING(9) LADATE="31 Jan 85";       ! LAST ALTERED
%CONSTINTEGER NO OF SNS=66
%CONSTINTEGER LRLPT=X'62'
%UNLESS HOST=PERQ %OR HOST=DRS %OR HOST=ACCENT %THEN %START
      %CONSTINTEGER PTSHIFT=16,FLAGSHIFT=0
%FINISH %ELSE %START
      %CONSTINTEGER PTSHIFT=0,FLAGSHIFT=16
%FINISH
!
%CONSTINTEGER MAXLEVELS=31,CONCOP=13
!
%INCLUDE "ERCC07:TRIPCNSTS"
%INCLUDE "ERCC07:TFORM1S"
%CONSTINTEGER SNPT=X'1006';         ! SPECIALNAME PTYPE
%CONSTINTEGER UNASSPAT=X'80808080'
%CONSTINTEGER LABUSEDBIT=X'01000000'
%CONSTINTEGER LABSETBIT=X'02000000'
%CONSTINTEGER MAXDICT=X'100';         ! PARM MAXDICT BIT
!
%INTEGER I, K, DUMMYFORMAT, P1SIZE, STARSIZE, ASL, ARSIZE, OLDLINE,
         NEXTP, SNUM, RLEVEL, NMAX, PLABEL, LEVEL, PROFAAD, LAST INST,

==== ercc07/icom6s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF((%INTEGER DEST,SRCE %ORSHORT DSNO,DACT,SSNO,SACT),(%INTEGER P1,P2,P3,P4,
   P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC REALISE(%INTEGER VIRTAD)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)

==== ercc07/ibmgen05s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/pdriver04s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %STRING (15) %FN %SPEC ItoS %ALIAS "S#ITOS"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,

==== ercc07/timp02s.txt ====
!
! Recent Source CHanges
!**********************
!
! 8May87 Chenges in FPlist so that RT Parameters are aligned according
!        the rules of array Rnding
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations%c
like
! passing Labels this still applies, this adhocery has caused problems with%c
arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.

==== ercc07/gbits_gcode67s.txt ====
! 20/11/87 - TRVE only if  in Vector loop                       gcode67i3
!          - Replace SUI by ADI
! 10/aug/87 - Plant gla ad for diagnostics if imp               gcode67i2
!
! 06/Aug/87 - Fix Check conflict to watch for byte access        gcode67i
!             Make profiling conditional on IMP. 
!                                                                gcode67
! 25/04/87 - revise Gop Bit
!                                                                gcode66
! 18/04/87 - update Gop Bit for Concept
!                                                                gcode65
! 17/04/87 - reduce PLT min space to 16
!                                                                gcode64
! 16/04/87 - version change to allign with ggen
!                                                                gcode61
! 14/04/87 - upgrade for C
! 01/04/87 - add Gop Bit
! 17/03/87 - Alter V release reg pair  Alan Ft.L.                gcode60
!
!                                                                gcode59
! 28/02/87 - incorporate integer*8 changes (ex gcode36u)

==== ercc07/idev15s.txt ====
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
%include "ercc07:ibmsup_dtform1s"
%include "ercc07:IBMSUP_xaioform"
%record %format PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %or %string (23) TEXT))
%record %format PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%if VA MODE=YES %start
   %const %record (PARMXF) %array %name PARM=PARM0AD
%finish %else %start
!* %externalintegerspec parmad
   %own %record (PARMXF) %array %name PARM
!* %ownrecord(parmxf)%arrayformat parmaf(0:128)
%finish
!
%external %integer %fn %spec REALISE(%integer VAD)
%external %integer %fn %spec HSCH(%integer SLOTADDR)
%external %integer %fn %spec TSCH(%integer SLOTADDR, %record (IRBF) %name IRB)
%external %integer %fn %spec SSCH(%integer SLOTADDR,CCWA,KEY)

==== ercc07/ebits_ecodes1.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES1                                          26/09/85          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- 32-bit (Etos) ----------------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/pdriver05s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/ebits_ecodes2.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES2                                          06/01/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/timp03s.txt ====
!
! Recent Source Changes
!**********************
!
! DEc88 Version 3 produced
! Changes to note included procedures for Gould and others
! Also change to allow LINT &LINTPT to compile when lonlongs are treated as longs
!
! 8May87 Changes in FPlist so that RT Parameters are aligned according
!        the rules of array Rnding
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations%c
like
! passing Labels this still applies, this adhocery has caused problems with%c
arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.

==== ercc07/icom8s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF((%INTEGER DEST,SRCE %ORSHORT DSNO,DACT,SSNO,SACT),(%INTEGER P1,P2,P3,P4,
   P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC REALISE(%INTEGER VIRTAD)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)

==== ercc07/ebits_ecodes3.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES3                                          31/03/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/usysgen00s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/ebits_ecodes4.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES4                                          22/04/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/ebits_ecodes5.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES5                                          25/04/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/trimp_accponeas.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=ACCENT
! PRODUCED BY OLDPS FROM TRIMP_PERQPS01 ON 06/09/83
%CONSTBYTEINTEGERARRAY CLETT(0: 436)=   1,
  40,   1,  41,   1,  42,   1,  44,   2, 201, 198,   6, 213, 206, 204,
 197, 211, 211,   5, 215, 200, 201, 204, 197,   5, 213, 206, 212, 201,
 204,   3, 198, 207, 210,   1,  61,   5, 193, 204, 201, 193, 211,   7,
 201, 206, 212, 197, 199, 197, 210,   4, 210, 197, 193, 204,   4, 204,
 207, 206, 199,   4, 194, 217, 212, 197,   6, 211, 212, 210, 201, 206,
 199,   4, 200, 193, 204, 198,   5, 211, 200, 207, 210, 212,   6, 210,
 197, 195, 207, 210, 196,   7, 210, 207, 213, 212, 201, 206, 197,   2,
 198, 206,   3, 205, 193, 208,   8, 198, 213, 206, 195, 212, 201, 207,
 206,   4, 206, 193, 205, 197,   9, 193, 210, 210, 193, 217, 206, 193,
 205, 197,   9, 207, 198, 208, 210, 207, 199, 210, 193, 205,   6, 207,
 198, 198, 201, 204, 197,   6, 207, 198, 204, 201, 211, 212,   6, 198,
 207, 210, 205, 193, 212,   3, 206, 207, 212,   3, 193, 206, 196,   2,
 207, 210,   1,  58,   4, 211, 208, 197, 195,   5, 193, 210, 210, 193,
 217,   3, 207, 215, 206,   8, 197, 216, 212, 197, 210, 206, 193, 204,
   9, 197, 216, 212, 210, 201, 206, 211, 201, 195,   8, 195, 207, 206,
 211, 212, 193, 206, 212,   5, 195, 207, 206, 211, 212,   5, 197, 214,

==== ercc07/ebits_ecodes6.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES6                                          29/05/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/ibmsup_comf370.txt ====
!
%include "Ercc07:ibmsup_comformat"
!
%if VA MODE=YES %start
   %constrecord (COMF) %name COM=COM SEG<<SSHIFT
%finishelsestart
   %ownrecord (COMF) %name COM
%finish
%endoffile

==== ercc07/idev16s.txt ====
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%include "ercc07:ibmsup_comf370"
%include "ercc07:ibmsup_page0f"
%include "ercc07:ibmsup_dtform1s"
%include "ercc07:IBMSUP_xaioform"
%record %format PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %or %string (23) TEXT))
%record %format PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%if VA MODE=YES %start
   %const %record (PARMXF) %array %name PARM=PARM0AD
%finish %else %start
!* %externalintegerspec parmad
   %own %record (PARMXF) %array %name PARM
!* %ownrecord(parmxf)%arrayformat parmaf(0:128)
%finish
!
%external %integer %fn %spec REALISE(%integer VAD)
%external %integer %fn %spec HSCH(%integer SLOTADDR)
%external %integer %fn %spec TSCH(%integer SLOTADDR, %record (IRBF) %name IRB)
%external %integer %fn %spec SSCH(%integer SLOTADDR,CCWA,KEY)

==== ercc07/ebits_ecodes8.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES8                                          26/06/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/ebits_ecodes9.txt ====
!
!************************************************************************
!*                                                                      *
!*                                                    G.E.Millard       *
!*   ECODES8                                          26/06/86          *
!*                                                                      *
!************************************************************************
!
{00} %constinteger      HALT =   0
!
!--------------------------------------- generic int operations -------
!
{01} %constinteger      IADD =   1     { (Etos-1) + (Etos) => (Etos)   }
{02} %constinteger      ISUB =   2     { (Etos-1) - (Etos) => (Etos)   }
{03} %constinteger     IMULT =   3     { (Etos-1) * (Etos) => (Etos)   }
{04} %constinteger      IDIV =   4     { (Etos-1) / (Etos) => (Etos)   }
{05} %constinteger      INEG =   5     {          - (Etos) => (Etos)   }
{06} %constinteger      IABS =   6     {     abs( (Etos) ) => (Etos)   }
{07} %constinteger      IREM =   7     { remainder from                }
                                       {  (Etos-1) / (Etos)=> (Etos)   }
!

==== ercc07/xgen30s.txt ====
!* modified 16/07/86
!*
%constinteger increports=1
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)

==== ercc07/trimp_pnxoptas.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PNX

==== ercc07/pdriver06s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/timp04s.txt ====
!
! Recent Source Changes
!**********************
!
! DEc88 Version 3 produced
! Changes to note included procedures for Gould and others
! Also change to allow LINT &LINTPT to compile when lonlongs are treated as longs
!
! 8May87 Changes in FPlist so that RT Parameters are aligned according
!        the rules of array Rnding
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations%c
like
! passing Labels this still applies, this adhocery has caused problems with%c
arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.

==== ercc07/icom9s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
!
%INCLUDE "ercc07:ibmsup_page0f"
!
%RECORDFORMAT PARMF((%INTEGER DEST,SRCE %ORSHORT DSNO,DACT,SSNO,SACT),(%INTEGER P1,P2,P3,P4,
   P5,P6 %ORSTRING (23) TEXT))
!
%CONSTINTEGER SLEN=63;                  ! string length in RT calls
%EXTERNALROUTINESPEC DISPLAY TEXT(%INTEGER V,L,P, %STRING (41) TEXT)
%EXTERNALROUTINESPEC DPON(%RECORD (PARMF) %NAME P, %INTEGER DELAY)
%EXTERNALINTEGERFNSPEC STOI(%STRINGNAME S)
%EXTERNALROUTINESPEC PKMONREC(%STRING (23) S, %RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC PON(%RECORD (PARMF) %NAME P)
%EXTERNALROUTINESPEC MONITOR(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS(%STRING (SLEN) S)
%EXTERNALROUTINESPEC OPMESS3(%STRING (SLEN) S)
%EXTERNALROUTINESPEC INHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC UNINHIBIT(%INTEGER SERVICE)
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER T,A,L)
%EXTERNALINTEGERFNSPEC REALISE(%INTEGER VIRTAD)
%EXTERNALINTEGERFNSPEC RTV(%INTEGER RAD)

==== ercc07/linkv7.txt ====
parm map
link ,separeas
ercc07:isupv710y
ercc07:ifastv75y
ercc07:idevv712y
ercc07:ioperv73y
ercc07:icomv76y
ercc08:iprintv72y
ercc15:itape.Y6
ercc27:icomms.y9
ercc08:ienterv72y
ercc07:indiagv72y
.end
isupz
isupfix isupz,isupt,isupl
disconnect isupt
parm nocheck

==== ercc07/idev17s.txt ====
! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM
!* %OWNRECORD(parmxf)%ARRAYFORMAT parmaf(0:128)
      %FINISH
!
%EXTERNAL %INTEGER %FN %SPEC REALISE(%INTEGER VAD)
%EXTERNAL %INTEGER %FN %SPEC HSCH(%INTEGER SLOTADDR)
%EXTERNAL %INTEGER %FN %SPEC TSCH(%INTEGER SLOTADDR, %RECORD (IRBF) %NAME IRB)
%EXTERNAL %INTEGER %FN %SPEC SSCH(%INTEGER SLOTADDR,CCWA,KEY)

==== ercc07/xgen31s.txt ====
!* modified 16/07/86
!*
%constinteger increports=1
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)

==== ercc07/portenv03_exps.txt ====
%include "itrimp_hostcodes"
!
%CONSTINTEGER TARGET=M88K
!%EXTERNALROUTINESPEC IOCP %ALIAS "s#iocp"(%INTEGER EP,N)
!
! crude versions of the fortran exponentiation functions used by imp
!
%EXTERNALINTEGERFN POWII %ALIAS "F_POWII" %C
         (%%INTEGER ARG, %INTEGER NARG)
!
!     CALCULATES ARG**NARG
!
%integer XX,YY
%INTEGER N

%IF NARG<0 %THEN %signal %event 5,5

%IF NARG=0 %then %result=1

%IF ARG=0 %START
    %RESULT= 0

==== ercc07/pdriver07s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/timp05s.txt ====
!
! Recent Source Changes
!**********************
!
! Oct 89   Version 5
! Chnages (mostly in CRCALL) to pass record values via work area & pointer
! for risc chips. Controlled by const integer in steering file
!
! DEc88 Version 3 produced
! Changes to note included procedures for Gould and others
! Also change to allow LINT &LINTPT to compile when lonlongs are treated as longs
!
! 8May87 Changes in FPlist so that RT Parameters are aligned according
!        the rules of array Rnding
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations%c
like

==== ercc07/ebits_especs1.txt ====
!* modified 19/08/85
!*
%externalroutinespec Egenerate Object(%stringname Name)
%externalroutinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%externalroutinespec Eterminate(%integer adareasizes)
%externalroutinespec Ecommon(%integer area, %stringname Name)
%externalroutinespec Eendcommon(%integer area, Length)
%externalroutinespec Elinestart(%integer lineno)
%externalroutinespec Elinedecode
%externalroutinespec Emonon
%externalroutinespec Emonoff
%externalroutinespec Efaulty
%externalintegerfnspec Estkmarker
%externalroutinespec Esetmarker(%integer Markerid, New Value)
%externalintegerfnspec Eswapmode
!*
%externalroutinespec Estklit(%integer Val)
%externalroutinespec Estkconst(%integer Len, Ad)
%externalroutinespec Estkdir(%integer Area, Offset, Adid, Bytes)
%externalroutinespec Estkind(%integer Area, Offset, Adid, Bytes)

==== ercc07/ebits_especs2.txt ====
!* modified 19/08/85
!*
%externalroutinespec Egenerate Object(%stringname Name)
%externalroutinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%externalroutinespec Eterminate(%integer adareasizes)
%externalroutinespec Ecommon(%integer area, %stringname Name)
%externalroutinespec Eendcommon(%integer area, Length)
%externalroutinespec Elinestart(%integer lineno)
%externalroutinespec Elinedecode
%externalroutinespec Emonon
%externalroutinespec Emonoff
%externalroutinespec Efaulty
%externalintegerfnspec Estkmarker
%externalroutinespec Esetmarker(%integer Markerid, New Value)
%externalintegerfnspec Eswapmode
!*
%externalroutinespec Estklit(%integer Val)
%externalroutinespec Estkconst(%integer Len, Ad)
%externalroutinespec Estkrconst(%integer Len,Ad)
%externalroutinespec Estkdir(%integer Area, Offset, Adid, Bytes)

==== ercc07/idev18s.txt ====
! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM
!* %OWNRECORD(parmxf)%ARRAYFORMAT parmaf(0:128)
      %FINISH
!
%EXTERNAL %INTEGER %FN %SPEC REALISE(%INTEGER VAD)
%EXTERNAL %INTEGER %FN %SPEC HSCH(%INTEGER SLOTADDR)
%EXTERNAL %INTEGER %FN %SPEC TSCH(%INTEGER SLOTADDR, %RECORD (IRBF) %NAME IRB)
%EXTERNAL %INTEGER %FN %SPEC SSCH(%INTEGER SLOTADDR,CCWA,KEY)

==== ercc07/vaxcom_newilink.txt ====
$ link 'p1',imp_sup/lib,sys$input/opt
sys$share:vaxcrtl.exe/share

==== ercc07/ebits_especs5.txt ====
%externalroutinespec Einitialise (%integer Lang,Aver,Astackca,Aglaca,options)
%externalroutinespec Eterminate (%integer adareasizes)
%externalroutinespec Ecommon (%integer area,%stringname Name)
%externalroutinespec Eendcommon (%integer area,Length)
%externalroutinespec Elinestart (%integer lineno)
%externalroutinespec Elinedecode 
%externalintegerfnspec Estkmarker 
%externalroutinespec Esetmarker (%integer Markerid,New Value)
%externalintegerfnspec Eswapmode 
%externalroutinespec Emonon 
%externalroutinespec Emonoff 
%externalroutinespec Efaulty 
%externalroutinespec Estklit (%integer Val)
%externalroutinespec Estkconst (%integer Len,Ad)
%externalroutinespec Estkrconst (%integer Len,Ad)
%externalroutinespec Estkdir (%integer Area,Offset,Adid,Bytes)
%externalroutinespec Estkind (%integer Area,Offset,Adid,Bytes)
%externalroutinespec Estkglobal (%integer Level,Offset,Adid,Bytes)
%externalroutinespec Estkglobalind (%integer Level,Offset,Adid,Bytes)
%externalroutinespec Estkgind (%integer Level,Offset,Adid,Bytes)
%externalroutinespec Estkpar (%integer Level,Offset,Adid,Bytes)

==== ercc07/xgen32s.txt ====
! changes for xgen32s
!    1) Rearrange initialisation so that Exnamesva initialised before
!       Pascal specific initialisation calls Exname
!    2) Insert three missing pusings
!    3) Minor correction to Epromote to keep register uses OK
!*
%constinteger increports=1
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,

==== ercc07/timp06s.txt ====
!
! Recent Source Changes
!**********************
!
! Dec 89 Version 6
! Changes so that functions in parameters are prefetched so there are no
! recursive calls which tend to be inefficient on RISC machines
!
! Also move rounding of own variables back from pass4 to pass2 so
! that the global rules are used.
! Also more careful rounding of tempoaries and ON space
!
! Oct 89   Version 5
! Changes (mostly in CRCALL) to pass record values via work area & pointer
! for risc chips. Controlled by const integer in steering file
!
! DEc88 Version 3 produced
! Changes to note included procedures for Gould and others
! Also change to allow LINT &LINTPT to compile when lonlongs are treated as longs
!
! 8May87 Changes in FPlist so that RT Parameters are aligned according

==== ercc07/idev19s.txt ====
! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM
!* %OWNRECORD(parmxf)%ARRAYFORMAT parmaf(0:128)
      %FINISH
!
%EXTERNAL %INTEGER %FN %SPEC REALISE(%INTEGER VAD)
%EXTERNAL %INTEGER %FN %SPEC HSCH(%INTEGER SLOTADDR)
%EXTERNAL %INTEGER %FN %SPEC TSCH(%INTEGER SLOTADDR, %RECORD (IRBF) %NAME IRB)
%EXTERNAL %INTEGER %FN %SPEC SSCH(%INTEGER SLOTADDR,CCWA,KEY)

==== ercc07/trimp_oldps.txt ====

%EXTERNALROUTINE OLDPS(%STRING(63) S)
%EXTERNALSTRINGFNSPEC DATE
%INTEGER I, J, K, SS, NBIP
%STRING(31) ST49,ST50,ST51
%STRING(127)HEADER
%EXTERNALROUTINESPEC DEFINE(%STRING(63)S)
%INTEGERARRAY CLETT(0:1000), SYMBOL(1300:3000), CC(0:300)
%INTEGER CNEXT, DNEXT, CNUM, DNUM, ALT, DEF, ASL, NIDFLAG
%INTEGERARRAY KK, PUSE, DWORD(1001:1200), DLETT(0:1000), CWORD(1:200)
%ROUTINESPEC READ STRING(%INTEGER TERMINATOR)
%ROUTINESPEC RECORD(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGERNAME NUM, NEXT)
%ROUTINESPEC LOOK UP(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGER FIRST, LAST, INSERT)
%ROUTINESPEC PDDICT
%ROUTINESPEC PRINT STR(%INTEGERARRAYNAME CC, %INTEGER PTR)
%ROUTINESPEC PCDICT
         %UNLESS S->ST49.(",").ST50.(",").ST51 %THEN %C
            PRINTSTRING("PARAMS?????") %AND NEWLINE %AND %RETURN
         DEFINE("ST49,".ST49)

==== ercc07/xgen33s.txt ====
! changes for xgen32s
!    1) Rearrange initialisation so that Exnamesva initialised before
!       Pascal specific initialisation calls Exname
!    2) Insert three missing pusings
!    3) Minor correction to Epromote to keep register uses OK
!*
%constinteger increports=1
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,

==== ercc07/stuenv01s.txt ====
%EXTERNALINTEGERMAPSPEC COMREG %ALIAS "S#COMREGMAP"(%INTEGER N)
%CONSTLONGREAL LOG10A=2.3025850929940456840179914546843642076011
%CONSTLONGREAL PI=3.141592653589793238462643
%CONSTLONGREAL R1= 1.2595802263029547@  1{R'41C98867F42983DF'}
%CONSTLONGREAL R2=-8.6186317517509520@  1{R'C2562FB2813C6014'}
%CONSTLONGREAL R3=-1.2766919133361079@  0{R'C1146D547FED8A3D'}
%CONSTLONGREAL R4=-8.3921038065840512@ -2{R'C0157BD961F06C89'}
%CONSTLONGREAL S1= 2.7096164294378656@  1{R'421B189E39236635'}
%CONSTLONGREAL S2= 6.5581320451487386@  0{R'4168EE1BDE0C3700'}
%CONSTLONGREAL S3= 2.1441643116703661@  0{R'41224E7F3CBDFE41'}
%CONSTLONGREAL S4= 1.2676256708212610@  0{R'41144831DAFBF542'}
%CONSTLONGREAL RT3= 1.7320508075688772@  0{R'411BB67AE8584CAA'}
%CONSTLONGREAL PIBY6= 5.2359877559829887@ -1{R'40860A91C16B9B2C'}
%CONSTLONGREAL PIBY2M1= 5.7079632679489661@ -1{R'40921FB54442D184'}
%CONSTLONGREAL RT3M1=7.3205080756887728@ -1{R'40BB67AE8584CAA7'}
%CONSTLONGREAL TANPIBY12= 2.6794919243112271@ -1{R'404498517A7B3559'}
%CONSTLONGREAL PIBY4= 7.8539816339744816@ -1{R'40C90FDAA22168C2'}
%CONSTLONGREAL A1= 7.5000000000000000@ -1{R'40C0000000000000'}
%CONSTLONGREAL A2= 3.5398163397448309@ -2{R'3F90FDAA22168C23'}
%CONSTLONGREAL SQRTHALF= 7.0710678118654753@ -1{R'40B504F333F9DE65'}
%CONSTLONGREAL DEFALLT=SQRTHALF

==== ercc07/docs_enotes.txt ====

Current ambiguities in the Ecode machine

     While going through the Ecode generator for Amdahl it  has  become  obvious
that  varying  interpretations  are  possible for some Ecode operations and that
these interpretaions conflict.   These notes are intended to  clarify  the  more
important areas.

      1) Locations and addresses.

     Ecode operations are normally between items  in  store  (locations).    The
     locations  are  notified  by stacking them as area and offset or otherwise.
     The address of a location can be obtatined by eop(Eaddress) or by  stacking
     the address of a location(Estkaddr). An address once stacked has the status
     of a litval ie it does not have an address itself nor  is  it  possible  to
     store  into  an  address.    To  convert  an  address  into  a location use
     Erefer(0,size).

      2) Storing results.

     The operations ESTORE and EDUPSTORE are  provided  for  storing  arithmetic

==== ercc07/makeusys_opt.txt ====
edit opt03s,Upos
i<itrimp_Usysoptas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
a'
d1i<tripcnsts>
e
imp Upos,.null
offer Upos,zepz01

==== ercc07/consources.txt ====
%recordformat Emashf(%integer dataend,datastart,filesize,filetype,s1,s2,s3,ofm)
%recordformat fidf(%integer dev,%short ino0,ino1,ino2,mode,%integer nlink,
      uid,%short gid,%integer charad,filesize,atime,mtime,ctime,
      %byte rfm,rat,%integer mrs)
%owninteger srcelink
%externalintegerfnspec Fstat(%integer filedes,bufad)
%externalintegerfnspec Open(%integer adname,mode,prot)
%externalintegerfnspec read(%integer id,bytead,bytesize)
%externalintegerfnspec Malloc(%integer Bytesize)
%externalroutinespec Free(%integer bytead)
%externalroutinespec Cstring(%string(*)%name Impstring,%integer adcstr)
%externalstring(255)%fnspec Impstring(%integer acstring)
%externalroutine filenames(%integer asrce,aobj,alist)
!***********************************************************************
!*    The command source name is a cstring at asrce                    *
!*     Generate in Imp the source,object&listing file names            *
!*    Tell put via pset source and put back in the cstrings            *
!***********************************************************************
%string(255) base,srce,obj,list,gen
%externalroutinespec Psetfiles(%string(*)%name srce,obj)
      srce=Impstring(Asrce)

==== ercc07/idev20s.txt ====
! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM
!* %OWNRECORD(parmxf)%ARRAYFORMAT parmaf(0:128)
      %FINISH
!
%EXTERNAL %INTEGER %FN %SPEC REALISE(%INTEGER VAD)
%EXTERNAL %INTEGER %FN %SPEC HSCH(%INTEGER SLOTADDR)
%EXTERNAL %INTEGER %FN %SPEC TSCH(%INTEGER SLOTADDR, %RECORD (IRBF) %NAME IRB)
%EXTERNAL %INTEGER %FN %SPEC SSCH(%INTEGER SLOTADDR,CCWA,KEY)

==== ercc07/xgen27as.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/xgen35s.txt ====
!
! Changes for XGEN34s
!    1) Introduction of UMULT and UMULTST (previously omitted
!    2) Introduction of CONVERT UU and greater care over conversion for C
!
! changes for xgen32s
!    1) Rearrange initialisation so that Exnamesva initialised before
!       Pascal specific initialisation calls Exname
!    2) Insert three missing pusings
!    3) Minor correction to Epromote to keep register uses OK
!*
%constinteger increports=1
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*

==== ercc07/ibmconvert_sibmload.txt ====
%RECORDFORMAT NAMEF(%C
 %STRING(8)    NAME,
 %INTEGER      ID,
               ADDR,                    {-1=NOT KNOWN,OTHERWISE ABSOLUTE ADRS}
                                        {OF NAME}
               CHAIN,                   {0 NO OUTSTANDING RELOCATIONS OTHERWISE}
                                        {PTR TO HEAD OF CHAIN OF RELOCATIONS}
               LNTH,                    {OF AREA FOR SD, HOME SD NO FOR AN LD}
               OFFSET,                  { OFFSET OF LD WITHIN HOME SD}
 %BYTE         TYPE,                    {STANDARD TYPES SD,LD ETC}
               COMMON)
!
!
!
%RECORDFORMAT RR(%INTEGER CONAD,FTYPE,DSTART,DEND)
%SYSTEMINTEGERFNSPEC PSTOI(%STRING(63)S)
%EXTERNALSTRING(8)%FNSPEC IBM NAME(%STRING(1) PREFIX,%STRINGNAME NAME)
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(255)PARM)
%SYSTEMROUTINESPEC OUTFILE(%STRING(31)FILE,%INTEGER SIZE,HOLE,PROT,
         %INTEGERNAME CONAD,FLAG)

==== ercc07/idev21s.txt ====
! Changes for idev21
!    1) attempt to make recoverying FEPs easier
!    2)  Clear subchannel on deallocation
!    3) Revised timeout handling with no sense
!    4) Discard of ints with halt or clear fn bit set (Did not happen nonXA)
!    5) Icorporation of deferred CC into PSEUDOTERM
!
!! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM

==== ercc07/xgen27bs.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/opt01s.txt ====
%INCLUDE "ERCC07:TFORM1S"
%INCLUDE "ERCC07:TRIPCNSTS"
%EXTRINSICRECORD (WORKAF) WORKA
%EXTRINSICRECORD (PARMF) PARM
%EXTERNALROUTINESPEC IMPABORT
%IF HOST#TARGET %START
      %EXTERNALROUTINESPEC REFORMATC(%RECORD(RD)%NAME OPND)
%FINISH
%EXTERNALROUTINESPEC MOVE BYTES(%INTEGER L,FB,FO,TB,TO)
%EXTERNALROUTINESPEC FAULT(%INTEGER N,DATA,IDENT)
%EXTERNALROUTINESPEC PRINT TRIPS(%RECORD (TRIPF) %ARRAYNAME TRIPLES)
%CONSTBYTEINTEGERARRAY BYTES(0:7)=0(3),1,2,4,8,16;
%CONSTBYTEINTEGERARRAY WORDS(0:7)=0(3),1,1,1,2,4;
%EXTERNALROUTINE CTOP(%INTEGERNAME FLAG,MASK, %INTEGER XTRA,
    %RECORD (RD) %NAME OPND1,OPND2)
!***********************************************************************
!*    AN OPERATION HAS BEEN FOUND WHERE BOTH OPERANDS ARE              *
!*    CONSTANTS OR KNOWN AT COMPILE TIME. THIS ROUTINE INTERPRETS      *
!*    THE OPERATION                                                    *
!*    ON EXIT FLAG=0 IF INTERPRETED. REFRAINS FROM INTERPRETING        *
!*    X=1/0 FOR EXAMPLE. CODE IS PLANTED FOR THESE FUNNIES             *

==== ercc07/algtests_at10.txt ====
'BEGIN'
    'PROCEDURE' P( ST, A ); 'STRING' ST, A;
        ;
    P( <;'COMMENT'> )VALID:( <;> );
    'COMMENT' COULD FAIL TOO FEW PARAMETERS;
'END'

==== ercc07/algtests_at11.txt ====
'BEGIN'
    'REAL' X )INVALID PARAMETER LIKE COMMENTS:(Y;
        X := Y := 0.0
'END'

==== ercc07/algtests_at12.txt ====
'BEGIN'
    'PROCEDURE' Q( ST ) INVALID PARAMETER LIKE COMMENTS ( A );
        'STRING' ST; 'REAL' A; ;
        Q( <AZ> ) ALSO IN THE CALL( 1.0 )
'END'

==== ercc07/algtests_at13.txt ====
'BEGIN'
    LABELSCANNOTPRECEEDCOMMENTS: 'COMMENT' SHOULD FAIL;
        'GOTO' LABELSCANNOTPRECEEDCOMMENTS
'END'

==== ercc07/trimp_pnxptwoas.txt ====
%EXTERNALROUTINE ICL9CEZPNXIMP
%CONSTINTEGER RELEASE=4
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PNX
%CONSTINTEGER STANDARDPT=X'51'
%CONSTINTEGER MINAPT=X'51';             ! MINIMUM PTYPE FOR WHICH ARITHMETIC
                                        ! OPERATORS ARE AVAILABLE
%CONSTINTEGER MINAPREC=MINAPT>>4
%CONSTHALFINTEGERARRAY TYPEFLAG(0:12)=0,
                                        X'51'{%INTEGER},
                                        X'52'{%REAL},
                                        X'8009'{%LONG SOMETHING},
                                        X'4031'{%BYTE},
                                        X'35'{%STRING},
                                        X'4041'{%HALF},
                                        X'6051'{%SHORT->%INTEGER+WARNING},
                                        X'33'{%RECORD},
                                        0,
                                        X'1051'{%LONG INTEGER FAULT},
                                        X'62'{%LONG REAL},

==== ercc07/algtests_at14.txt ====
       'BEGIN'
                'PROCEDURE' Q( ST )INVALID PARAMETER 'COMMENT' :( A );
                        'STRING' ST; 'REAL' A; ;
                Q( <STR> ) AZ09:( 1.0 )
        'END'

==== ercc07/algtests_at15.txt ====
'BEGIN'
    'PROCEDURE' Q( ST1 )P:( ST2 ); 'COMMENT' ;
        'STRING' ST1, ST2; ;
    Q( <;'COMMENT' ) AZ: (>;> )INVALID:( <ST2> )
'END'

==== ercc07/gbits_gcodes5.txt ====
!*************************************************************************
!*                                                                       *
!*    Mnemonics for Gould code generator        Version 5    18/04/87    *
!*                                                                       *
!*************************************************************************
!*
%if Cpu = Concept %thenstart
!*
!*************************************************************************
!*                                                                       *
!*                               Concept                                 *
!*                                                                       *
!*************************************************************************
!*
%constinteger L      =   1 { RX }
%constinteger LM     =   2 { RX }
%constinteger LN     =   3 { RX }
%constinteger ST     =   4 { RX }
%constinteger STM    =   5 { RX }
%constinteger ZM     =   6 { RX }
%constinteger ADM    =   7 { RX }

==== ercc07/algtests_at16.txt ====
'BEGIN'
    'COMMENT'   STRING TESTS;
    'PROCEDURE' P(ST);
        'STRING'
            ST;
        ;
    P( <*STRING 'STRING' <NESTED<<>>> 'BEGIN' 'END';> );
    P( < ,
        > )
'END'

==== ercc07/idev22s.txt ====
! Changes for idev21
!    1) attempt to make recoverying FEPs easier
!    2)  Clear subchannel on deallocation
!    3) Revised timeout handling with no sense
!    4) Discard of ints with halt or clear fn bit set (Did not happen nonXA)
!    5) Icorporation of deferred CC into PSEUDOTERM
!
!! 17-05-88 Semaphoring added for dual nass PDS
!09-09-85..statistics gathering for auscom
!05-09-85..use tio in case mag tape off-line..sh
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform2s"
%INCLUDE "ercc07:IBMSUP_xaioform"
%RECORD %FORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %OR %STRING (23) TEXT))
%RECORD %FORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
      %IF VA MODE=YES %START
      %CONST %RECORD (PARMXF) %ARRAY %NAME PARM=PARM0AD
      %FINISH %ELSE %START
!* %EXTERNALINTEGERSPEC parmad
      %OWN %RECORD (PARMXF) %ARRAY %NAME PARM

==== ercc07/xgen27cs.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/algtests_at17.txt ====
'BEGIN'
    'REAL'
        REAL,
        INTEGER,
        BEGIN,
        END;
    REAL := 0.0
'END'

==== ercc07/opt02s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/algtests_at18.txt ====
'BEGIN'
    'REAL'
        A,
        AB,
        ABC,
        ABCD,
        ABCDE,
        ABCDEF,
        ABCDEFG,
        ABCDEFGH,
        ABCDEFGHI,
        ABCDEFGHIJ,
        ABCDEFGHIJK,
        ABCDEFGHIJKL,
        ABCDEFGHIJKLM,
        ABCDEFGHIJKLMN,
        ABCDEFGHIJKLNMO,
        ABCDEFGHIJKLNMOP,
        ABCDEFGHIJKLMNOPQ,
        ABCDEFGHIJKLNMOPQR,
        ABCDEFGHIJKLMNOPQRS,

==== ercc07/gbits_gcodes8.txt ====
!*************************************************************************
!*                                                                       *
!*    Mnemonics for Gould code generator        Version 7    06/03/88    *
!*                                                                       *
!*************************************************************************
!*
!*
!*************************************************************************
!*                                                                       *
!*                                    NP1                                *
!*                                                                       *
!*************************************************************************
!*
%constinteger L      =   1 { RX }
%constinteger LBS    =   2 { RX }
%constinteger LN     =   3 { RX }
%constinteger ST     =   4 { RX }
%constinteger ZM     =   6 { RX }
%constinteger ADM    =   7 { RX }
%constinteger ARM    =   8 { RX }
%constinteger SUM    =   9 { RX }

==== ercc07/algtests_at19.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
    'REAL' 'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                A(/1/)+ A(/2/)+ A(/3/)
            'ELSE'
                SUM2(A);
    'REAL' 'PROCEDURE' SUM2(A);
        'ARRAY'
            A;
        SUM2 := A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)+
            A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/);

==== ercc07/emaslink2.txt ====
LINK
EP1Y
EP22Y
EOPT2Y
EGEN2Y
CSERV01Y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIOPT
SUPPRESS DATA
.ALL
CLOSE
NEWGEN P0Y,IOPT02Y

==== ercc07/algtests_at20.txt ====
'BEGIN'
    'INTEGER''ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
     'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'INTEGER''ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                A(/1/)+ A(/2/)+ A(/3/)
            'ELSE'
                SUM2(A);
     'PROCEDURE' SUM2(A);
        'INTEGER''ARRAY'
            A;
        SUM2 := A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)+
            A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/);

==== ercc07/algtests_at21.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
    'REAL' 'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                (A(/1/)+ A(/2/)+ A(/3/))
            'ELSE'
                (A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)
                    + A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/));
    'INTEGER'
        I,
        J;
    'FOR' I := 1,

==== ercc07/trimp_ibmoptas.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=IBMXA

==== ercc07/algtests_at22.txt ====
'BEGIN'
    'PROCEDURE' RECURSIVE(LEVEL, L);
        'VALUE'
            LEVEL;
        'INTEGER'
            LEVEL;
        'LABEL'
            L;
        'BEGIN'
        'IF' LEVEL # 0 'THEN'
            RECURSIVE(LEVEL - 1, EXIT)
        'ELSE'
            'GOTO' L;
       EXIT :;
        OUTREAL(99,LEVEL)
        'END';
    RECURSIVE(10, EXIT);
   EXIT :;
'END'

==== ercc07/makedrs_p1.txt ====
offer dp1s
edit poneb02s,dp1s
i<itrimp_drsponeas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
m/%constlonglongreal/
ta/host=/r6i/DRS/
e
imp dp1s,.null
transfer dp1s,castle(ercc07,pete)impdir/sources/d386p1s10.i,file

==== ercc07/algtests_at23.txt ====
'BEGIN'
    'INTEGER'
        I;
    'BOOLEAN'
        B;
    'PROCEDURE' LABELBYVALUE(L);
        'VALUE'
            L;
        'LABEL'
            L;
        ;
    'PROCEDURE' LABELBYNAME(L);
        'LABEL'
            L;
        'BEGIN'
        I := 1;
        'IF' B 'THEN'
            'GOTO' L
        'END';
    'SWITCH' S :=
        L1,

==== ercc07/makedrs_p2.txt ====
edit timp04s,dp2s
i<itrimp_drsptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
ta/host=/r6i/DRS/
e
parm nocheck,nolist
imp dp2s,.null
transfer dp2s,castle(ercc07,pete)impdir/sources/d386p2s11.i,file


==== ercc07/algtests_at24.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 9/);
    'INTEGER'
        I,
        S;
    'PROCEDURE' DUMMY(A);
        'VALUE'
            A;
        'ARRAY'
            A;
        SUM(A);
    'PROCEDURE' SUM(A);
        'ARRAY'
            A;
        'FOR' I := 1 'STEP' 1 'UNTIL' 9 'DO'
            'BEGIN'
            S := S + A(/I/);
            A(/I/):= 0
            'END';
    S := 0;

==== ercc07/algtests_at25.txt ====
'BEGIN'
    'REAL'
        X,
        Y;
    'INTEGER'
        I;
    'FOR' X := &6,
        &+6,
        &-6,
        .6,
        6,
        6.6,
        .6&6,
        .6&+6,
        .6&-6,
        6&6,
        6&+6,
        6&-6,
        6.6&6,
        6.6&+6,
        6.6&-6 'DO'

==== ercc07/vaxcom_ilinkd.txt ====
$ link/debug 'p1',i,penv,fortout,vndiag,sys$input/opt
sys$share:vaxcrtl.exe/share

==== ercc07/algtests_at26.txt ====
'BEGIN'
    'PROCEDURE' P(L);
        'INTEGER'
            L;
       L : 'BEGIN'
        'REAL'
            A;
        'GOTO' L;
       L :;
        'GOTO' LL
        'END';
    P(1);
   LL :;
'END'

==== ercc07/xgen27ds.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/algtests_at27.txt ====
'BEGIN'
    'INTEGER'
        S;
    'PROCEDURE' P(F, G);
        'PROCEDURE'
            F,
            G;
        'BEGIN'
        'INTEGER'
            X;
        'PROCEDURE' R;
            'BEGIN'
            OUTREAL(99, S);
            OUTREAL(99, X)
            'END';
        S := S + 1;
        X := S;
        'IF' S = 1 'THEN'
            P(F, R)
        'ELSE'
            F(G, R)

==== ercc07/opt03s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/algtests_at28.txt ====
'BEGIN'
    'INTEGER'
        N1,
        N2;
    'PROCEDURE' DUMMY;
        ;
    'PROCEDURE' P(X, L);
        'VALUE'
            X;
        'INTEGER'
            X;
        'PROCEDURE'
            L;
        'BEGIN'
        'PROCEDURE' GOTOL1;
            'GOTO' L1;
        'IF' X = N1 'THEN'
            P(X - 1, GOTOL1)
        'ELSE'
'IF' X = N2 'THEN'
            L

==== ercc07/trimp_drslink.txt ====
LINK
ERCC07.P1Y
ERCC07.DP2Y
ERCC07.DOPTY
ERCC07.DGENY
ERCC07.CSERV01Y
ERCS02.DRS_EPUTY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
PGENERATEDRSOBJECT,ICL9CEZDRSIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/algtests_at29.txt ====
'BEGIN'
    'INTEGER'
        S;
    'PROCEDURE' P(F, G);
        'PROCEDURE'
            F,
            G;'COMMENT'(X,Y):'PROCEDURE' X,Y;
        'BEGIN'
        'INTEGER'
            X;
        'PROCEDURE' R(F, G);
        'PROCEDURE' F, G;'COMMENT'(X,Y):'PROCEDURE' X,Y;
            'BEGIN'
            OUTREAL(99, S);
            OUTREAL(99, X)
            'END';
        S := S + 1;
        X := S;
        'IF' S = 1 'THEN'
            P(F, R)
        'ELSE'

==== ercc07/algtests_at30.txt ====
'BEGIN'
    'INTEGER'
        N1,
        N2;
    'PROCEDURE' P(X, L);
        'VALUE'
            X;
        'INTEGER'
            X;
        'LABEL'
            L;
        'BEGIN'
        'IF' X = N1 'THEN'
            P(X - 1, L1)
        'ELSE' 'IF' X = N2 'THEN'
            'GOTO' L
        'ELSE'
            P(X - 1, L);
        L1 :;
                OUTREAL(99, X)
        'END' P;

==== ercc07/algtests_at31.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    I := J := 0;
    I :=
        'IF' I = 0 'THEN'
                'IF' J = 0 'THEN'
                    1
                'ELSE'
                    2
        'ELSE'
            3;
    'IF' I = 1 'THEN'
        'IF' J = 0 'THEN'
            J := 2
        'ELSE'
            J := 3
        'ELSE'
            J := 4;
    OUTREAL(99, I);

==== ercc07/algtests_at32.txt ====
'BEGIN'
    'INTEGER'
        I;
    'REAL'
        X;
    'PROCEDURE' ASS(X, I);
        'REAL'
            X;
        'INTEGER'
            I;
        'IF' I < 0 'THEN'
            X := I + 3
        'ELSE'
            I := 2.0 * X;
    ASS(X, - 1);
    I := 2;
    ASS(X, I);
    ASS(I, I);
    ASS(I, X);
    OUTREAL(99, I);
    OUTREAL(99, X)

==== ercc07/algtests_at33.txt ====
'BEGIN'
    'PROCEDURE' A0;
        'BEGIN'
        'PROCEDURE' A1;
            'BEGIN'
            'PROCEDURE' A2;
                'BEGIN'
                'PROCEDURE' A3;
                    'BEGIN'
                    'PROCEDURE' A4;
                        'BEGIN'
                        'PROCEDURE' A5;
                            'BEGIN'
                            'END';
                        ;
                        'END';
                    ;'END';
                ;'END';
            ;'END';
        ;'END';
    ;'END'

==== ercc07/makepas.txt ====
edit ercs12:psource.main5s,totals
m/main program/m0
i<ercs12:psource.options8s>
i<ercs12:psource.source6s>
i<ercs12:psource.diags6s>
i<ercs12:psource.lexical4s>
i<ercs12:psource.syntax1s>
i<ercs12:psource.semantics8s>
i<ercs12:psource.analyser11s>
i<ercs12:psource.generator4s>
i<ercs12:psource.datareps9s>
i<ercs12:psource.storage15s>
i<ercs12:psource.objvalue10s>
i<ercs12:psource.blocks18s>
i<ercs12:psource.varref10s>
i<ercs12:psource.expeval11s>
i<ercs12:psource.codeutil23s>
i<ercs12:psource.assgncode6s>
i<ercs12:psource.withstmts2s>
i<ercs12:psource.stdprocs9s>
i<ercs12:psource.ctlstruc10s>

==== ercc07/powers.txt ====
%constinteger powerll=-78
! from ibm assembler which claims to evaluate exactly and round to 128 bits
%CONSTLONGLONGREALARRAY    POWERS (-78:75)=                  %C
       {Ten to the -78}           R'001DA48CE468E7C772026520247D3556' ,
       {Ten to the -77}           R'011286D80EC190DC73617F3416CE4156' ,
       {Ten to the -76}           R'01B94470938FA89B73CEF808E40E8D5B' ,
       {Ten to the -75}           R'0273CAC65C39C96174615B058E891859' ,
       {Ten to the -74}           R'03485EBBF9A41DDC75DCD8E37915AF38' ,
       {Ten to the -73}           R'042D3B357C0692AA760A078E2BAD8D83' ,
       {Ten to the -72}           R'051C45016D841BAA774644B8DB4C7872' ,
       {Ten to the -71}           R'0611AB20E472914A786BEAF3890FCB47' ,
       {Ten to the -70}           R'06B0AF48EC79ACE878372D835A9DF0C7' ,
       {Ten to the -69}           R'076E6D8D93CC0C1179227C7218A2B67C' ,
       {Ten to the -68}           R'084504787C5F878A7AB58DC74F65B20E' ,
       {Ten to the -67}           R'092B22CB4DBBB4B67BB1789C919F8F49' ,
       {Ten to the -66}           R'0A1AF5BF109550F27C2EEB61DB03B98D' ,
       {Ten to the -65}           R'0B10D9976A5D52977D5D531D28E253F8' ,
       {Ten to the -64}           R'0BA87FEA27A539E97DA53F2398D747B3' ,
       {Ten to the -63}           R'0C694FF258C744327E0747763F868CD0' ,
       {Ten to the -62}           R'0D41D1F7777C8A9F7F448CA9E7B41802' ,
       {Ten to the -61}           R'0E29233AAAADD6A3008AD7EA30D08F01' ,

==== ercc07/algtests_at34.txt ====
'BEGIN' 'REAL' A;
 'BEGIN' 'REAL' A;
  'BEGIN' 'REAL' A;
   'BEGIN' 'REAL' A;
    'BEGIN' 'REAL' A;
     'BEGIN' 'REAL' A;
      'BEGIN' 'REAL' A;
       'BEGIN' 'REAL' A;
        'BEGIN' 'REAL' A;
         'BEGIN' 'REAL' A;
          'BEGIN' 'REAL' A;
           'BEGIN' 'REAL' A;
            'BEGIN' 'REAL' A;
             'BEGIN' 'REAL' A;
              'BEGIN' 'REAL' A;
              'END'
             'END'
            'END'
           'END'
          'END'
         'END'

==== ercc07/vaxput1s.txt ====
!*****************************
!*                           *
!*   Vax VMS PUT INTERFACE   *
!*                           *
!*****************************

!
! Put interface for VAX VMS copyright P.D.Stephens
!
! The problem of a put for VMS is dominated by two problems
!    1) The horrendous object module format which must be tholed
!    2) The jumps which can be short or long PC relative or absolute
!       with the horrid proviso that even the long jump may not reach
!       and absolute jumps are unconditional. Thus put has to
!       be prepared to change jumps to jumps around a long jump.
!
! Outline of a solution
! Code and data is recieved in fragments and built up in areas as images
! The areas are as defined by EMAS and apart from code built up as images
! in space obtained by malloc or eqivalent. The areas start small and are
! expanded if required.

==== ercc07/algtests_at35.txt ====
'BEGIN'
    'REAL'
        A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12,
        A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24,
        A25, A26, A27, A28, A29, A30, A31, A32, A33, A34, A35, A36,
        A37, A38, A39, A40, A41, A42, A43, A44, A45, A46, A47,
        A48, A49, A50, A51, A52, A53, A54, A55, A56, A57, A58,
        A59, A60, A61, A62, A63, A64, A65, A66, A67, A68, A69,
        A70, A71, A72, A73, A74, A75, A76, A77, A78, A79, A80,
        A81, A82, A83, A84, A85, A86, A87, A88, A89, A90, A91,
        A92, A93, A94, A95, A96, A97, A98, A99, A100, A101,
        A102, A103, A104, A105, A106, A107, A108, A109, A110,
        A111, A112, A113, A114, A115, A116, A117, A118, A119,
        A120, A121, A122, A123, A124, A125, A126, A127, A128,
        A129, A130, A131, A132, A133, A134, A135, A136, A137,
        A138, A139, A140, A141, A142, A143, A144, A145, A146,
        A147, A148, A149, A150, A151, A152, A153, A154, A155,
        A156, A157, A158, A159, A160, A161, A162, A163, A164,
        A165, A166, A167, A168, A169, A170, A171, A172, A173,
        A174, A175, A176, A177, A178, A179, A180, A181, A182,
        A183, A184, A185, A186, A187, A188, A189, A190, A191,

==== ercc07/algtests_at36.txt ====
SIN: COS:
'BEGIN'
    'REAL' SIN;
        SIN := 0.0
'END'

==== ercc07/trimp_ibmptwoas.txt ====
%EXTERNALROUTINE ICL9CEZIBMIMP
%CONSTINTEGER RELEASE=4
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=IBMXA
%CONSTINTEGER STANDARDPT=X'51'
%CONSTINTEGER MINAPT=X'51';             ! MINIMUM PTYPE FOR WHICH ARITHMETIC
                                        ! OPERATORS ARE AVAILABLE
%CONSTINTEGER MINAPREC=MINAPT>>4
%CONSTHALFINTEGERARRAY TYPEFLAG(0:12)=0,
                                        X'51'{%INTEGER},
                                        X'52'{%REAL},
                                        X'8009'{%LONG SOMETHING},
                                        X'4031'{%BYTE},
                                        X'35'{%STRING},
                                        X'6051'{%HALF->%INTEGER+WARNING},
                                        X'4041'{%SHORT->%SHORTINTEGER},
                                        X'33'{%RECORD},
                                        0,
                                        X'61'{%LONG INTEGER},
                                        X'62'{%LONG REAL},

==== ercc07/docs_mar83.txt ====
                              EMAS System
                              ===========

     The main changes to the software have concerned DAP scheduling;  however, a
new  Director  which  supports  multiple file indexes per user has been put into
service.   This is currently inaccessible until a subsystem which accesses these
features is available.   A distressing amount of skilled time has disappeared in
investigating curious faults in the service.  Many symptoms have been tracked to
OCP3 executing conditional branches incorrectly about 1 time in 10**9.  However,
with the reduced level of engineering cover and fewer OCP specialists around too
much effort here has fallen on software people.

     The discussions at Bush83 were encouraging,  particularly the near  support
for  an  advanced  user interface;   a collection of bad features in the present
system has been compiled together with a large  number  of  possible  ideas  and
improvements.    Contacts  with UKC have proved helpful but producing a coherent
design from the very large kit of parts  is  difficult.    Enough  material  for
several  subsystems  is  available  and many good ideas will perforce have to be
rejected.

     Further rounds of discussions have taken place with ICL about their  future

==== ercc07/make386_opt.txt ====
offer d386pos
edit opt03s,d386pos
i<itrimp_drsoptas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
a'
d1i<tripcnsts>
e
imp d386pos,.null
offer d386pos,zepz06

==== ercc07/xgen27es.txt ====
!* modified 16/07/86
!*
%owninteger Report=0
%owninteger Decode
%owninteger Language
!*
%constinteger IMP      =  1
%constinteger FORTRAN  =  2
%constinteger CCOMP    = 11
%constinteger PASCAL   = 14
!*
!***********************************************************************
!* Exports                                                             *
!***********************************************************************
!*
%routinespec Einitialise(%integer Lang, Avertext, Astackca,
                                                    Aglaca, Options)
%routinespec Eterminate(%integer adareasizes)
%routinespec Ecommon(%integer area, %stringname Name)
%routinespec Eendcommon(%integer area, Length)
%routinespec Elinestart(%integer lineno)

==== ercc07/algtests_at37.txt ====
'BEGIN'
 'INTEGER'
  A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11;
 'INTEGER'
  SUM;
 SUM := 0;
 'FOR' A0 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
  'FOR' A1 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
   'FOR' A2 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
    'FOR' A3 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
     'FOR' A4 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
      'FOR' A5 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
       'FOR' A6 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
        'FOR' A7 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
         'FOR' A8 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
          'FOR' A9 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
           'FOR' A10 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
            'FOR' A11 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
             'END'
            'END'
           'END'

==== ercc07/opt04s.txt ====
!
! 25Sep90   Correction to base adjust array in ctop which was wrong
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare

==== ercc07/algtests_at38.txt ====
'BEGIN'
 'INTEGER'
  I,
  J,
  SUM;
 I := 1;
 J := 2;
 SUM := 0;
 'IF' I > J 'THEN''BEGIN'
  'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
  'IF' I > J 'THEN''BEGIN'
   'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
   'IF' I > J 'THEN''BEGIN'
    'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
    'IF' I > J 'THEN''BEGIN'
     'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
     'IF' I > J 'THEN''BEGIN'
      'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
      'IF' I > J 'THEN''BEGIN'
       'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
       'IF' I > J 'THEN''BEGIN'

==== ercc07/algtests_at39.txt ====
'BEGIN'
    'INTEGER'
        I,
        J,
    SUM;
    I := 1;
    J := 2;
    SUM := 1 + ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE'
        ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I
        > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J
        'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'
        0 'ELSE' 1)))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/algtests_at40.txt ====
'BEGIN'
    'SWITCH' SS :=
        A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
        A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
        A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
        A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
        A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
        A50, A51, A52, A53, A54, A55, A56, A57, A58, A59,
        A60, A61, A62, A63, A64, A65, A66, A67, A68, A69,
        A70, A71, A72, A73, A74, A75, A76, A77, A78, A79,
        A80, A81, A82, A83, A84, A85, A86, A87, A88, A89,
        A90, A91, A92, A93, A94, A95, A96, A97, A98, A99,
        A100, A101, A102, A103, A104, A105, A106, A107, A108, A109,
        A110, A111, A112, A113, A114, A115, A116, A117, A118, A119,
        A120, A121, A122, A123, A124, A125, A126, A127, A128, A129,
        A130, A131, A132, A133, A134, A135, A136, A137, A138, A139,
        A140, A141, A142, A143, A144, A145, A146, A147, A148, A149,
        A150, A151, A152, A153, A154, A155, A156, A157, A158, A159,
        A160, A161, A162, A163, A164, A165, A166, A167, A168, A169,
        A170, A171, A172, A173, A174, A175, A176, A177, A178, A179,
        A180, A181, A182, A183, A184, A185, A186, A187, A188, A189,

==== ercc07/pdriver14s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc(%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry(%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname(%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry(%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/algtests_at41.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' P(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
        A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20,
        A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31,
        A32, A33, A34, A35, A36, A37, A38, A39, A40, A41, A42,
        A43, A44, A45, A46, A47, A48, A49, A50, A51, A52, A53,
        A54, A55, A56, A57, A58, A59);
        'VALUE'
            A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
            A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
            A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
            A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
            A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
            A50, A51, A52, A53, A54, A55, A56, A57, A58, A59;
        'INTEGER'
            A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
            A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
            A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
            A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
            A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
            A50, A51, A52, A53, A54, A55, A56, A57, A58, A59;

==== ercc07/docs_emasprot.txt ====
@h(Protection in EMAS 2900)


[This document is in the form of an addendum to Reference 1.]

   2900 Architecture provides a variety of methods to enable an operating system
to maintain its own integrity.

   a) @b(Privilege).   A bit in the PSW is required to execute
      privileged instructions.

   b) @b(Activate).    A privileged instruction to start executing
      a less trusted program at a lower ACR level and on a new
      stack.

   c) @b(Out).   An instruction exactly comparable to the IBM @b(SVC).
      Enables an untrusted program to return to Supervisor in a
      controlled and secure way.

   d) @b(ACR levels).   Four bits in the @b(PSW) define the @b("Access)
      @b(Control") status of the running program.   All store accesses

==== ercc07/algtests_at42.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 :
            2, 1 : 2, 1 : 2, 1 : 2, 1 : 2/);
    A(/1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1/):= 1.0;
    OUTREAL(99, A(/1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1/));
'END'

==== ercc07/algtests_at43.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    'REAL'
        SUM;
    A0 := 1.0;  A1 := 1.0;  A2 := 1.0;
    A3 := 1.0;  A4 := 1.0;  A5 := 1.0;
    A6 := 1.0;  A7 := 1.0;  A8 := 1.0;
    A9 := 1.0;  A10 := 1.0;  A11 := 1.0;
    A12 := 1.0;  A13 := 1.0;  A14 := 1.0;
    SUM := A0 + (A1 + (A2 + (A3 + (A4 + (A5 + (A6 + (A7 + (A8 + (A9
        + (A10 + (A11 + (A12 + (A13 + (A14))))))))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/algtests_at44.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    'REAL'
        SUM;
    A0 := 1.0;  A1 := 1.0;  A2 := 1.0;
    A3 := 1.0;  A4 := 1.0;  A5 := 1.0;
    A6 := 1.0;  A7 := 1.0;  A8 := 1.0;
    A9 := 1.0;  A10 := 1.0;  A11 := 1.0;
    A12 := 1.0;  A13 := 1.0;  A14 := 1.0;
    SUM := 2.0 * A0 + .5 * (2.0 * A1 + .5 * (2.0 * A2 + .5 * (2.0
        * A3 + .5 * (2.0 * A4 + .5 * (2.0 * A5 + .5 * (2.0 * A6
        + .5 * (2.0 * A7 + .5 * (2.0 * A8 + .5 * (2.0 * A9 + .5
        * (2.0 * A10 + .5 * (2.0 * A11 + .5 * (2.0 * A12 + .5 *
        (2.0 * A13 + .5 * (A14))))))))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/vaxput2s.txt ====
!*****************************
!*                           *
!*   Vax VMS PUT INTERFACE   *
!*                           *
!*****************************

!
! Put interface for VAX VMS copyright P.D.Stephens
!
! The problem of a put for VMS is dominated by two problems
!    1) The horrendous object module format which must be tholed
!    2) The jumps which can be short or long PC relative or absolute
!       with the horrid proviso that even the long jump may not reach
!       and absolute jumps are unconditional. Thus put has to
!       be prepared to change jumps to jumps around a long jump.
!
! Outline of a solution
! Code and data is recieved in fragments and built up in areas as images
! The areas are as defined by EMAS and apart from code built up as images
! in space obtained by malloc or eqivalent. The areas start small and are
! expanded if required.

==== ercc07/algtests_at45.txt ====
'BEGIN'
    'REAL'
        X;
    X := 8.4;
    OUTREAL(99,
        SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(X^9)))))))))
        );
'END'

==== ercc07/algtests_at46.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    I := 1;
    J := 2;
    L1 :;
    'GOTO'
        'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'
            L1
        'ELSE'
            L2;
    L2 :;
'END'

==== ercc07/algtests_at47.txt ====
'BEGIN'
    A0 :; A1 :; A2 :; A3 :; A4 :; A5 :;
'END'

==== ercc07/algtests_at48.txt ====
'BEGIN'
  'INTEGER'
    SUM;
  SUM := 0;
  'BEGIN' SUM := SUM + 1;
    'BEGIN' SUM := SUM + 1;
      'BEGIN' SUM := SUM + 1;
        'BEGIN' SUM := SUM + 1;
          'BEGIN' SUM := SUM + 1;
            'BEGIN' SUM := SUM + 1;
              'BEGIN' SUM := SUM + 1;
                'BEGIN' SUM := SUM + 1;
                  'BEGIN' SUM := SUM + 1;
                    'BEGIN' SUM := SUM + 1;
                      'BEGIN' SUM := SUM + 1;
                        'BEGIN' SUM := SUM + 1;
                          'BEGIN' SUM := SUM + 1;
                            'BEGIN' SUM := SUM + 1;
                              'BEGIN' SUM := SUM + 1;
                                'BEGIN' SUM := SUM + 1;
                                  'BEGIN' SUM := SUM + 1;

==== ercc07/algtests_at49.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    A0 := A1 := A2 := A3 := A4 := A5 := A6 := A7 := A8 :=
        A9 := A10 := A11 := A12 := A13 := A14 := 1.0;
    OUTREAL(99, A0 + A1 + A2 + A3 + A4 + A5 + A6 + A7 + A8 + A9 + A10
        + A11 + A12 + A13 + A14);
'END'

==== ercc07/docs_divfac.txt ====

Divinity Faculty

Current computing in divinity is text orientated and heavily influenced by
the need to have English Hebrew and Greek in the same document or even ion the
same page. This requires highly specialized word processing which is mainly
performed on IBM PCs.

a) Computing in Research

In addition to word processing there is considerable
concordance, searching and statistical analysis performed on ancient texts. Some of
these are held on EMAS others on the IBYCUS micro with local CD rom. There is
also continuing use of electronic mail for co-operation both in the UK
and world wide.

b) Computer in teaching

There is a trial project to assist students learning Greek Grammar by a question
and answer technique that has been devised locally. Students also have access
to a version of the Greek New Testament where every word has been grammatically

==== ercc07/algtests_at50.txt ====
'BEGIN'
    'INTEGER'
        I,
        SUM;
    SUM := 0;
    'FOR' I := 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1 'DO'
        SUM := SUM + I;
    OUTREAL(99, SUM);
'END'

==== ercc07/docs_may85.txt ====

                       Central Systems Group

     Although the impression seems to be around that the sole raison  d'etre  of
CSG  is  to  write  ever more sophisticated operating systems,   it is the other
activities that absorbed most effort this term.

     1) The Filestore is receiving substantial software  effort  in  preparation
     for direct attachment to the CPSE.  This involves a change of communication
     protocols from NSI to X25.

     2) The 2976 has had a spate of crashes due primarily to faults in the  DAPs
     when acting as store.   DAP store appears to go incommunicado after certain
     hardware faults unlike normal store.   To  live  through  such  faults  the
     Supervisor  has  been altered to ensure all vital pages are kept out of DAP
     store and EMAS now runs through DAP multibit failures.

     3) The 2988 is about to move to Kings Buildings and share peripherals  with
     the 2976.  The changes needed to device driving and archiving strategies to
     accommodate shared peripherals are being evaluated.


==== ercc07/pdriver15s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc %alias "E#PROC" (%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry%alias "E#ENTRY" (%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname %alias "E#XNAME" (%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry %alias "E#DATAENTRY" (%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/algtests_at51.txt ====
'BEGIN'
    'ARRAY'
        A0(/1 : 10/), A1(/1 : 10/), A2(/1 : 10/), A3(/1 : 10/),
        A4(/1 : 10/), A5(/1 : 10/), A6(/1 : 10/), A7(/1 : 10/),
        A8(/1 : 10/), A9(/1 : 10/), A10(/1 : 10/), A11(/1 : 10/),
        A12(/1 : 10/), A13(/1 : 10/), A14(/1 : 10/), A15(/1 : 10/),
        A16(/1 : 10/), A17(/1 : 10/), A18(/1 : 10/), A19(/1 : 10/),
        A20(/1 : 10/), A21(/1 : 10/), A22(/1 : 10/), A23(/1 : 10/),
        A24(/1 : 10/), A25(/1 : 10/), A26(/1 : 10/), A27(/1 : 10/),
        A28(/1 : 10/), A29(/1 : 10/), A30(/1 : 10/), A31(/1 : 10/),
        A32(/1 : 10/), A33(/1 : 10/), A34(/1 : 10/), A35(/1 : 10/),
        A36(/1 : 10/), A37(/1 : 10/), A38(/1 : 10/), A39(/1 : 10/),
        A40(/1 : 10/), A41(/1 : 10/), A42(/1 : 10/), A43(/1 : 10/),
        A44(/1 : 10/), A45(/1 : 10/), A46(/1 : 10/), A47(/1 : 10/),
        A48(/1 : 10/), A49(/1 : 10/), A50(/1 : 10/), A51(/1 : 10/),
        A52(/1 : 10/), A53(/1 : 10/), A54(/1 : 10/), A55(/1 : 10/),
        A56(/1 : 10/), A57(/1 : 10/), A58(/1 : 10/), A59(/1 : 10/);
    A0(/1/):= 1.0;    A1(/1/):= 1.0;    A2(/1/):= 1.0;    A3(/1/):= 1.0;
    A4(/1/):= 1.0;    A5(/1/):= 1.0;    A6(/1/):= 1.0;    A7(/1/):= 1.0;
    A8(/1/):= 1.0;    A9(/1/):= 1.0;    A10(/1/):= 1.0;    A11(/1/):= 1.0;
    A12(/1/):= 1.0;    A13(/1/):= 1.0;    A14(/1/):= 1.0;    A15(/1/):= 1.0;

==== ercc07/algtests_at52.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' IABS(I);
        'VALUE'
            I;
        'INTEGER'
            I;
        IABS :=
            'IF' I < 0 'THEN'
                - I
            'ELSE'
                I;
    'INTEGER'
        I,
        J,
        K;
    I := J := K := 1;
    'BEGIN'
        'ARRAY'
            A(/('IF' IABS(J * K 'DIV' I) > 3 * I - K 'THEN'- 60 'ELSE' 1) :
                ('IF' IABS(J * K 'DIV' I) > 3 * I - K 'THEN'- 60 'ELSE' 1)
                * 3.0 - 1.6 + 10.2/),

==== ercc07/algtests_at53.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    'FOR' I := - 2,
         - 1,
        1,
        2 'DO'
        'FOR' J := - 2 'STEP' 1 'UNTIL' 2 'DO'
            'IF' J 'DIV' I # SIGN(J / I) * ENTIER(ABS(J / I))
                'THEN'
                'BEGIN'
                OUTREAL(99, J);
                OUTREAL(99, I);
                OUTREAL(99, J 'DIV' I)
                'END';
'END'

==== ercc07/algtests_at54.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' TSIGN(X);
        'VALUE'
            X;
        'REAL'
            X;
        TSIGN :=
            'IF' X > 0 'THEN'
                1
            'ELSE' 'IF' X < 0 'THEN'
                 - 1
            'ELSE'
                0;
    'INTEGER' 'PROCEDURE' TENTIER(X);
        'VALUE'
            X;
        'REAL'
            X;
        TENTIER := X - .5;
    'REAL' 'PROCEDURE' TABS(X);
        'VALUE'

==== ercc07/vaxput3s.txt ====
!*****************************
!*                           *
!*   Vax VMS PUT INTERFACE   *
!*                           *
!*****************************

!
! Put interface for VAX VMS copyright P.D.Stephens
!
! The problem of a put for VMS is dominated by two problems
!    1) The horrendous object module format which must be tholed
!    2) The jumps which can be short or long PC relative or absolute
!       with the horrid proviso that even the long jump may not reach
!       and absolute jumps are unconditional. Thus put has to
!       be prepared to change jumps to jumps around a long jump.
!
! Outline of a solution
! Code and data is recieved in fragments and built up in areas as images
! The areas are as defined by EMAS and apart from code built up as images
! in space obtained by malloc or eqivalent. The areas start small and are
! expanded if required.

==== ercc07/algtests_at55.txt ====
'BEGIN'
    'INTEGER' 'ARRAY'
        EQ(/1 : 9/);
    'INTEGER'
        I;
    'REAL'
        X,
        Y;
    'PROCEDURE' PRINT EQ;
        'FOR' I := 1 'STEP' 1 'UNTIL' 9 'DO'
            OUTREAL(99, EQ(/I/));
    'PROCEDURE' TEST(A, B, C);
        'VALUE'
            A,
            B,
            C;
        'REAL'
            A,
            B,
            C;
        'BEGIN'

==== ercc07/ebits_especs4h.txt ====
%externalroutine Einitialise %alias"E#INITIALISE"(%integer Lang,Aver,Astackca,Aglaca,options)
%externalroutine Eterminate %alias"E#TERMINATE"(%integer adareasizes)
%externalroutine Ecommon %alias"E#COMMON"(%integer area,%stringname Name)
%externalroutine Eendcommon %alias"E#ENDCOMMON"(%integer area,Length)
%externalroutine Elinestart %alias"E#LINESTART"(%integer lineno)
%externalroutine Elinedecode %alias"E#LINEDECODE"
%externalintegerfn Estkmarker %alias"E#STKMARKER"
%externalroutine Esetmarker %alias"E#SETMARKER"(%integer Markerid,New Value)
%externalintegerfn Eswapmode %alias"E#SWAPMODE"
%externalroutine Emonon %alias"E#MOMON"
%externalroutine Emonoff %alias"E#MONOFF"
%externalroutine Efaulty %alias"E#FAULTY"
%externalroutine Estklit %alias"E#STKLIT"(%integer Val)
%externalroutine Estkconst %alias"E#STKCONST"(%integer Len,Ad)
%externalroutine Estkrconst %alias"E#STKRCONST"(%integer Len,Ad)
%externalroutine Estkdir %alias"E#STKDIR"(%integer Area,Offset,Adid,Bytes)
%externalroutine Estkind %alias"E#STKIND"(%integer Area,Offset,Adid,Bytes)
%externalroutine Estkglobal %alias"E#STKGLOBAL"(%integer Level,Offset,Adid,Bytes)
%externalroutine Estkglobalind %alias"E#STKGLOBALIND"(%integer Level,Offset,Adid,Bytes)
%externalroutine Estkgind %alias"E#STKIND"(%integer Level,Offset,Adid,Bytes)
%externalroutine Estkpar %alias"E#STKPAR"(%integer Level,Offset,Adid,Bytes)

==== ercc07/docs_stratbit.txt ====
@make[report]
@majorheading[Developments in Computing Technology]
The following section indicates the assumptions made by the University in
drawing up this document.  It is of course subject to the normal hazards
of forcasting changes in technology.
@subheading[a) Processor & Storage]
It is expected that chip advances will reduce the cost of processing power
and main store over the period.  Work stations are expected to get much
cheaper; entry level micros will stay about current prices but have
improvements in cpu speed and storage.  The distinction between personal
micro and work stations will disappear.

Mainframe machines will also become cheaper under threat from both the
100 Mip personal machine and highly parallel machines like the computing
surface.  Main frames will have vector processors almost as a matter of
course although proper exploration of these will involve the use of very
complex (and expensive) compilers.
@subheading[b) Backing Store]
Rotating Discs and industry standard magnetic tapes seem likely to
dominate backing storage for some years to come.  Packing densities will
increase providing for some reductions in cost per megabyte stored.  As

==== ercc07/algtests_at56.txt ====
'BEGIN'
    'INTEGER'
        I,
        J,
        CASE;
    'REAL'
        X,
        Y;
    'PROCEDURE' REQUAL(A, B);
        'VALUE'
            A,
            B;
        'REAL'
            A,
            B;
        'IF' A # B 'THEN'
            'BEGIN'
            OUTREAL(99, A);
            OUTREAL(99, B);
            OUTREAL(99, CASE)
            'END'

==== ercc07/algtests_at57.txt ====
'BEGIN'
    'INTEGER'
        I;
    'REAL'
        X;
    I := 0;
    X := 0.0;
    OUTREAL(99, X^I)
'END'

==== ercc07/algtests_at58.txt ====
'BEGIN'
    'INTEGER'
        I;
    I := 0;
    OUTREAL(99, I^I)
'END'

==== ercc07/algtests_at59.txt ====
'BEGIN'
    'REAL'
        X;
    X := - 1.0;
    OUTREAL(99, 0.0^X)
'END'

==== ercc07/algtests_at60.txt ====
'BEGIN'
    'REAL'
        X;
    X := - 1.0;
    OUTREAL(99, 0^X)
'END'

==== ercc07/ebits_enames1.txt ====
!* enames1        02/11/85
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,""     ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "","","","", "","","","",
{58} "","","","", "","","","",
{60} "","","","", "","","","",
{68} "","","","", "","","","",
{70} ""     ,"RADD" ,"RSUB" ,"RMULT","RDIV" ,"RNEG" ,"RABS",""   ,
{78} "","","","", "","","","",
{80} "","","","", "","","","",
{88} "CVTII","CVTIR","CVTRR","TNCRI", "RNDRI","","","",

==== ercc07/pdriver16s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc %alias "E#PROC" (%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry%alias "E#ENTRY" (%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname %alias "E#XNAME" (%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry %alias "E#DATAENTRY" (%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/algtests_at61.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    X := 3.2;
    I := - 2;
    OUTREAL(99, I^X)
'END'

==== ercc07/ebits_enames2.txt ====
!***********************************************************************
!*                                                                     *
!* ebits_enames2                                       13/01/86        *
!*                                                                     *
!***********************************************************************
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,"BNOT" ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "UADD","USUB","UGT","ULT", "UEQ","UNE","UGE","ULE",
{58} "JUGT","JULT","JUEQ","JUNE", "JUGE","JULE","JUGTZ","JULTZ",
{60} "JUEQZ","JUNEZ","JUGEZ","JULEZ", "UCVTII","IADDST","ISUBST","IMULTST",
{68} "IDIVST","INEGST","","", "IANDST","IORST","INOTST","IXORST",

==== ercc07/algtests_at62.txt ====

'BEGIN'
    'COMMENT' LIBRARY 99;
    'INTEGER'
        I,
        J;
    I := 0;
    J := - 2;
    OUTREAL(99, I^J)
'END'

==== ercc07/ebits_enames3.txt ====
!***********************************************************************
!*                                                                     *
!* ebits_enames2                                       13/01/86        *
!*                                                                     *
!***********************************************************************
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,"BNOT" ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "UADD","USUB","UGT","ULT", "UEQ","UNE","UGE","ULE",
{58} "JUGT","JULT","JUEQ","JUNE", "JUGE","JULE","JUGTZ","JULTZ",
{60} "JUEQZ","JUNEZ","JUGEZ","JULEZ", "UCVTII","IADDST","ISUBST","IMULTST",
{68} "IDIVST","INEGST","","", "IANDST","IORST","INOTST","IXORST",

==== ercc07/algtests_at63.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    X := 0.0;
    I := - 2;
    OUTREAL(99, X^I)
'END'

==== ercc07/ebits_enames4.txt ====
!***********************************************************************
!*                                                                     *
!* ebits_enames4                                       03/04/86        *
!*                                                                     *
!***********************************************************************
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,"BNOT" ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "UADD","USUB","UGT","ULT", "UEQ","UNE","UGE","ULE",
{58} "JUGT","JULT","JUEQ","JUNE", "JUGE","JULE","JUGTZ","JULTZ",
{60} "JUEQZ","JUNEZ","JUGEZ","JULEZ", "UCVTII","IADDST","ISUBST","IMULTST",
{68} "IDIVST","INEGST","","", "IANDST","IORST","INOTST","IXORST",

==== ercc07/algtests_at64.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER''PROCEDURE' P(B);
        'VALUE'
            B;
        'BOOLEAN'
            B;
        P := ('IF' B 'THEN' 1 'ELSE' 3.3) 'DIV' 6;
    OUTREAL(99, P('TRUE'));
    OUTREAL(99, P('FALSE'))
'END'

==== ercc07/ebits_enames5.txt ====
!***********************************************************************
!*                                                                     *
!* ebits_enames4                                       03/04/86        *
!*                                                                     *
!***********************************************************************
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,"BNOT" ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "UADD","USUB","UGT","ULT", "UEQ","UNE","UGE","ULE",
{58} "JUGT","JULT","JUEQ","JUNE", "JUGE","JULE","JUGTZ","JULTZ",
{60} "JUEQZ","JUNEZ","JUGEZ","JULEZ", "UCVTII","IADDST","ISUBST","IMULTST",
{68} "IDIVST","INEGST","","", "IANDST","IORST","INOTST","IXORST",

==== ercc07/algtests_at65.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J;
    I := 2;
    J := 3;
    OUTREAL(99, I^J 'DIV' J)
'END'

==== ercc07/ebits_enames6.txt ====
!***********************************************************************
!*                                                                     *
!* ebits_enames4                                       03/04/86        *
!*                                                                     *
!***********************************************************************
!*
%conststring(9)%array Eopname(0:255) = %c
{00} "HALT","IADD","ISUB","IMULT",  "IDIV" ,"INEG" ,"IABS" ,"IREM" ,
{08} "IAND","IOR" ,"INOT","IXOR" ,  "ISHLL","ISHRL","ISHLA","ISHRA",
{10} "IGT" ,"ILT" ,"IEQ" ,"INE"  ,  "IGE"  ,"ILE"  ,"BNOT" ,""     ,
{18} "JIGT","JILT","JIEQ","JINE" ,  "JIGE" ,"JILE" ,"JINTGZ","JINTLZ",
{20} "JINTZ","JINTNZ","JINTGEZ","JINTLEZ",  "ITWB" ,"","JUMP","",
{28} ""       ,"SFA"  ,"RETURN" ,"ASF" , "IPUSH" ,"IPOP"  ,"EXCH"  ,"DUPL",
{30} "DISCARD",""     ,""     ,"INDEX1", "INDEX2","INDEX4","INDEX8","INDEX",
{38} "MVB"    ,"CHK"  ,"TMASK" ,""     , ""      ,""      ,"CPBGT" ,"CPBLT",
{40} "CPBEQ"  ,"CPBNE","CPBGE","CPBLE" , "","","","", 
{48} "","","","", "","","","",
{50} "UADD","USUB","UGT","ULT", "UEQ","UNE","UGE","ULE",
{58} "JUGT","JULT","JUEQ","JUNE", "JUGE","JULE","JUGTZ","JULTZ",
{60} "JUEQZ","JUNEZ","JUGEZ","JULEZ", "UCVTII","IADDST","ISUBST","IMULTST",
{68} "IDIVST","INEGST","","", "IANDST","IORST","INOTST","IXORST",

==== ercc07/gbits_gldiocp6s.txt ====
!Modified 22/Sept/86 - treat selectoutput(-1) as null device for IMP.
!Modified 25/June/86  use own rather than local arrays
!Modified 28/May/86   for GOULD (AK)

!***********************************************************************
!* IMP written routines supporting COMPILE TIME.                       *
!***********************************************************************

%CONSTINTEGER EMAS=10
%CONSTINTEGER PERQ=11
%CONSTINTEGER PNX=12
%CONSTINTEGER IBM=13
%CONSTINTEGER GOULD=14
%constinteger WhiteChapel = 19
%constinteger Perq3 = 20
%constinteger target = GOULD
%constinteger host = GOULD

%externalSTRING(15) %FN ITOS(%INTEGER K)
  %INTEGER REM,NUM,NF
  %STRING(15) STR

==== ercc07/algtests_at66.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J,
        K,
        CASE;
    'PROCEDURE' EQUAL(I, J);
        'VALUE'
            I,
            J;
        'INTEGER'
            I,
            J;
        'IF' I # J 'THEN'
            'BEGIN'
            OUTREAL(99, CASE);
            OUTREAL(99, I);
            OUTREAL(99, J)
            'END'

==== ercc07/ifast3s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)
                                        ! L is link in circular chain of
                                        ! services which constitute a queue

==== ercc07/algtests_at67.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J;
    I := 3;
    J := - 2;
    OUTREAL(99, (81 * I^J) 'DIV' 2);
'END'

==== ercc07/algtests_at68.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3,
        S4;
    'FOR' I := 1 'STEP' 1 'UNTIL' 4 'DO'
        'BEGIN'
        'GOTO' S[I];
        S1 :;
        'IF' I # 1 'THEN'
            OUTREAL(99, I)
        'ELSE'
            'GOTO' EXIT;
        S2 :;
        'IF' I # 2 'THEN'
            OUTREAL(99, I)

==== ercc07/ctoptn2.txt ====
!
!   Compile time options for EMAS/370
!
%constinteger YES=1,NO=0,AMDAHL=2
%constinteger XA=YES;                    ! yes for 370/XA
%constinteger VA MODE=YES;               ! yes for Supervisor, no for Chopsupe
%constinteger MULTI OCP=NO;              ! yes to include semaphoring
%constinteger CRFITTED=NO;               ! card reader
%constinteger CPFITTED=NO;               ! card punch
%constinteger SNOOZING=YES;              ! allow suspend in store
%constinteger PRODUCTION=NO;             ! yes for continuing after S/W errors
%constinteger MONLEVEL=x'3F';                ! 0 = no monitoring
                                         ! 2**0 = video updating
                                         ! 2**1 = KMONning
                                         ! 2**2 = sup timing measurements
                                         ! 2**3 = a-c for cross calls
                                         ! 2**4 = strobing
                                         ! 2**5 = cat table transitions
                                         ! 2**8 = event harvesting
%constinteger P4PERCENT=11;              ! max % of free store for large jobs
%constinteger MAXPROCS=256;              ! max concurrent procs (64,128 or 256)

==== ercc07/algtests_at69.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3,
        S4;
    'FOR' I := 1,
        2,
        3 'DO'
        'BEGIN'
        'GOTO' S[I];
        S1 :;
        'IF' I # 1 'THEN'
            OUTREAL(99, I)
        'ELSE'
            S2 : 'IF' I # 2 'THEN'
                OUTREAL(99, I)

==== ercc07/ctoptn3.txt ====
!
!   Compile time options for EMAS/370
!
%constinteger YES=1,NO=0,AMDAHL=2
%constinteger XA=YES;                    ! yes for 370/XA
%constinteger VA MODE=YES;               ! yes for Supervisor, no for Chopsupe
%constinteger MULTI OCP=NO;              ! yes to include semaphoring
%constinteger CRFITTED=NO;               ! card reader
%constinteger CPFITTED=NO;               ! card punch
%constinteger SNOOZING=YES;              ! allow suspend in store
%constinteger PRODUCTION=NO;             ! yes for continuing after S/W errors
%constinteger MONLEVEL=x'3F';                ! 0 = no monitoring
                                         ! 2**0 = video updating
                                         ! 2**1 = KMONning
                                         ! 2**2 = sup timing measurements
                                         ! 2**3 = a-c for cross calls
                                         ! 2**4 = strobing
                                         ! 2**5 = cat table transitions
                                         ! 2**8 = event harvesting
%constinteger P4PERCENT=19;              ! max % of free store for large jobs
%constinteger MAXPROCS=256;              ! max concurrent procs (64,128 or 256)

==== ercc07/algtests_at70.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3;
    I := 1;
    'GOTO' S[I];
    'FOR' I := 1,
        2,
        3 'DO'
        'BEGIN'
        S1 :;
        OUTREAL(99, 10);
        S2 :;
        OUTREAL(99, 20);
        OUTREAL(99, I)
        'END';

==== ercc07/pdriver17s.txt ====
{****************************************************************************}
{                                                                            }
{                   System dependent routines.                               }
{                                                                            }
{****************************************************************************}

%externalstring(255)%fnspec uinfs %alias "S#UINFS"(%integer n)
%EXTERNAL %ROUTINE %SPEC Define %ALIAS "S#DEFINE"(%INTEGER channel,
   %STRING (255) File, %INTEGER %NAME Afd,Flag)
%externalintegerfnspec IOCP %alias "S#IOCP"(%integer ep,adr)
%EXTERNAL %INTEGER %MAP %SPEC ComReg %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNAL %ROUTINE %SPEC ICLpascalcompiler
%ROUTINE %SPEC InitialiseCompiler
%EXTERNAL %ROUTINE %SPEC EMAS3ClaimChannel(%INTEGER %NAME Chan)
%EXTERNAL %ROUTINE %SPEC Eproc %alias "E#PROC" (%STRING %NAME Name, %INTEGER Prop,Numpars,
   Paramsize,Astacklen, %INTEGER %NAME Id)
%EXTERNAL %ROUTINE %SPEC Eentry%alias "E#ENTRY" (%INTEGER Index,Numpars,ParamSize,LocalSize,
   DiagDisp, %STRING %NAME Name)
%EXTERNAL %INTEGER %FN %SPEC Exname %alias "E#XNAME" (%INTEGER Type, %STRING %NAME Xref)
%EXTERNAL %ROUTINE %SPEC Edataentry %alias "E#DATAENTRY" (%INTEGER Area,Offset,Length,
   %STRING %NAME Name)

==== ercc07/algtests_at71.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        CASE;
    'BOOLEAN'
        B;
    'REAL'
        X;
    'INTEGER''PROCEDURE' P(K, Q);
        'VALUE'
            K;
        'INTEGER'
            K;
        'INTEGER''PROCEDURE'
            Q;
        'COMMENT' (X1) : 'VALUE' X1 : 'REAL' X1 ;
        P :=
            'IF' K = 1 'THEN'
                Q(I)

==== ercc07/algtests_at72.txt ====

'BEGIN'
    'COMMENT' LIBRARY 3;
    'INTEGER'
        I,
        CASE;
    'BOOLEAN'
        B;
    'REAL'
        X;
    'INTEGER''PROCEDURE' P(K, Q);
        'VALUE'
            K;
        'INTEGER'
            K;
        'INTEGER''PROCEDURE'
            Q;
        'COMMENT' (X1) : 'VALUE' X1 : 'INTEGER'X1 ;
        P :=
            'IF' K = 1 'THEN'
                Q(I)

==== ercc07/algtests_at73.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J,
        K,
        K1;
    'REAL'
        T1,
        T2;
    'INTEGER''PROCEDURE' ACKERMANN(M, N);
        'VALUE'
            M,
            N;
        'INTEGER'
            M,
            N;
        ACKERMANN :=
            'IF' M = 0 'THEN'
                N + 1

==== ercc07/eccepas.txt ====

{*****************************************************************************}
{**                                                                         **}
{**    Title:   Edinburgh Editor Ecce for Dec Rainbow PC 100                **}
{**    Author:  H.Whitfield                                                 **}
{**    Date:    4 October 1984                                              **}
{**             Copyright (c) H.Whitfield 1984                              **}
{**                                                                         **}
{*****************************************************************************}
 
 
PROGRAM Ecce( input, output, InFile, OutFile );
 
LABEL 
  999;   { stop }
 
CONST 
  cmax = 121;
  stop = -5000;
  inv  = -5001;
 

==== ercc07/algtests_at74.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        N;
    N := 3;
    'BEGIN'
        'ARRAY'
            A[1 : 'IF' N = 3 'THEN' 3 'ELSE' - 100];
        'INTEGER'
            N;
        N := 2;
        OUTREAL(99, N);
    'END';
    OUTREAL(99, N)
'END'

==== ercc07/algtests_at75.txt ====

'BEGIN'
    'COMMENT' LIBRARY 9;
    'INTEGER''ARRAY'
        EQ[1 : 3];
    'INTEGER'
        I;
    'REAL'
        X,
        Y;
    'PROCEDURE' INC(A, B);
        'VALUE'
            A,
            B;
        'REAL'
            A,
            B;
        'IF' A < B 'THEN'
            EQ[1] := EQ[1] + 1
        'ELSE' 'IF' A = B 'THEN'
            EQ[2] := EQ[2] + 1

==== ercc07/algtests_at76.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL'
        X,
        Y;
    'INTEGER'
        I,
        J;
    'ARRAY'
        A[1 : 10];
    X := Y := 1.0;
    I := J := 0;
    'BEGIN'
        'SWITCH' A := A1,A2,A3;
        'PROCEDURE' P;
            'BEGIN'
            X := 20;
            I := X + Y;
            Q(A[3], I + J)
            'END';

==== ercc07/ifast4s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform1s"
%INCLUDE "ercc07:ibmsup_xaioform"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)

==== ercc07/algtests_at77.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        SUM;
    'PROCEDURE' P1(S, R, I, B, RA, IA);
        'STRING'
            S;
        'REAL'
            R;
        'INTEGER'
            I;
        'BOOLEAN'
            B;
        'REAL' 'ARRAY'
            RA;
        'INTEGER''ARRAY'
            IA;
        SUM := SUM + R + I + ('IF' B 'THEN' 1 'ELSE' 0) + RA[1] +
            IA[1];
    'PROCEDURE' P2(BA, L, SW, PR, RPR, IPR, BPR);

==== ercc07/algtests_at78.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        SUM;
    'PROCEDURE' P1(S, R, I, B, RA, IA);
        'STRING'
            S;
        'REAL'
            R;
        'INTEGER'
            I;
        'BOOLEAN'
            B;
        'REAL' 'ARRAY'
            RA;
        'INTEGER''ARRAY'
            IA;
        SUM := SUM + R + I + ('IF' B 'THEN' 1 'ELSE' 0) + RA[1] +
            IA[1];
    'PROCEDURE' P2(BA, L, SW, PR, RPR, IPR, BPR);

==== ercc07/ibmconvert_sibmdriver.txt ====
%RECORDFORMAT RR(%INTEGER CONAD,FTYPE,DSTART,DEND)
%SYSTEMROUTINESPEC DISCONNECT(%STRING(31)FILE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC DESTROY(%STRING(31)FILE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC SETWORK(%INTEGERNAME AD,LEN)
%SYSTEMROUTINESPEC CHANGEFILESIZE(%STRING(31)FILE,%INTEGER SIZE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC NEWGEN(%STRING(31) FILE1,FILE2,%INTEGERNAME FLAG)
%EXTERNALROUTINESPEC DEFINE(%STRING(255)PARM)
%SYSTEMROUTINESPEC PSYSMES(%INTEGER ROOT,FLAG)
%SYSTEMROUTINESPEC SETPAR(%STRING(255)PARM)
%SYSTEMSTRINGFNSPEC SPAR(%INTEGER N)
%SYSTEMROUTINESPEC CONNECT(%STRING(31)FILE,%INTEGER MODE,HOLE,PROT,
         %RECORD(RR)%NAME FINFO,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC OUTFILE(%STRING(31)FILE,%INTEGER SIZE,HOLE,PROT,
         %INTEGERNAME CONAD,FLAG)
%SYSTEMROUTINESPEC MOVE(%INTEGER LNTH,FROMAD,TOAD)
%EXTERNALROUTINESPEC CONVTOIBM(%INTEGER ICONAD,OCONAD, %INTEGERNAME FLAG)
!
!
%EXTERNALROUTINE TOIBMOBJ(%STRING(255) PARM)
 %STRING(31) INFILE,OUTF,LIST,WOUTF
 %RECORD(RR) FINFO

==== ercc07/algtests_at79.txt ====

'BEGIN'
    'INTEGER'
        I;
    'REAL'
        R;
    'BOOLEAN'
        B;
    'ARRAY'
        A1[1 : I + B],
        A2[2 : 4, 5 : 7];
    'SWITCH' S :=
        'IF' R * P0 < 0 'THEN' L 'ELSE' L2;
    'PROCEDURE' P0;
        R := I 'DIV' R;
    'PROCEDURE' P1(F);
        'REAL'
            F;
        B := I + R;
    L :;
    B := I > S;

==== ercc07/trimp_perqlink.txt ====
LINK
ERCC07.PP1Y
ERCC07.PP2Y
ERCC07.POPTY
ERCC07.PGENY
ERCC07.CSERV01Y
ERCS04.QFILES_QCODE4Y
ERCS04.QFILES_QPUT15Y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
RENAME
ICL9CEZPERQIMP,S#PERQIMP
.END
SUPPRESS
.ALL
RETAIN

==== ercc07/algtests_at80.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'INTEGER''ARRAY'
        A[1 : 10];
    I := 1;
    'FOR' A[I] := 1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10 'DO'
        I := I + 1;
    'FOR' I := 1 'STEP' 1 'UNTIL' 10 'DO'
        'IF' A[I] # I 'THEN'

==== ercc07/algtests_at81.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'ARRAY'
        V,
        A,
        C[1 : 1];
    'INTEGER'
        K;
    'INTEGER''PROCEDURE' I;
        'BEGIN'
        I := 1;
        K := K + 1
        'END';
    K := 0;
    A[I] := 1;
    C[I] := 3;
    'FOR' V[I] := A[I] 'STEP' A[I] 'UNTIL' C[I] 'DO'
        ;
    OUTREAL(99, K)
'END'

==== ercc07/algtests_at82.txt ====

'BEGIN'
    'COMMENT' LIBRARY5;
    'INTEGER''PROCEDURE' NONE;
        NONE := 1;
    NONE;
    SIN(1.0);
    ABS(3);
    LN(.2);
    EXP(4);
    ENTIER(NONE);
    SIGN(SQRT(8));
    OUTREAL(99, NONE)
'END'

==== ercc07/algtests_at83.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        NN;
    'SWITCH' A :=
        B[1],
        B[2];
    'SWITCH' B :=
        A[G],
        A[2];
    'INTEGER''PROCEDURE' F(N, S);
        'VALUE'
            N;
        'INTEGER'
            N;
        'SWITCH'
            S;
        'BEGIN'
        NN := N;
        'GOTO' S[1];

==== ercc07/algtests_at84.txt ====

'BEGIN'
'COMMENT' LIBRARY 3;
'INTEGER'I,CL,N,REP;
'ARRAY' R,A,B[1:30],C[1:10];
'REAL' J,ROOT,X;
'INTEGER''PROCEDURE' EVEN(X);
    'VALUE' X;
    'INTEGER'X;
    EVEN:='IF' X'DIV'2*2 = X 'THEN' 1 'ELSE' -1;
'PROCEDURE' GAMM(R,A,B,C);
    'ARRAY' R,A,B,C;
    'BEGIN'    'INTEGER'REP,I,CL;
        'REAL' J,ROOT,X;
        REP:=100*N;
        OUTREAL(99,CPUTIME);
        'FOR' CL:= 1 'STEP' 1 'UNTIL' REP 'DO'
            ;
        OUTREAL(99,CPUTIME);
        REP:=N;
        OUTREAL(99,CPUTIME);

==== ercc07/algtests_at85.txt ====

'BEGIN'
'COMMENT' LIBRARY 1;
    'REAL'
        X,
        Y;
    'PROCEDURE' DUM;
        ;
    'REAL' 'PROCEDURE' A;
        A := X + ('IF' B 'THEN' 1 'ELSE' 0);
    'BOOLEAN'
        B;
    S2 :;
    B := (('TRUE'));
    G :;
    'BEGIN'
        'INTEGER'
            I;
        X := - 3;
        'IF' 'NOT' B 'THEN'
            'GOTO' S2;

==== ercc07/wwclink1.txt ====
LINK
ERCC07:wP1Y
ERCC07:wP22Y
ERCC07:wOPT2Y
ERCC07:wGEN1Y
ERCC07:CSERV01x
ercs01:EBITS_etrput1y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
eGENERATEOBJECT,ICL9CEZWWCIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/algtests_at86.txt ====
'BEGIN'
PROG :
'BEGIN'
'COMMENT' LIBRARY 1;
    'INTEGER'N,I;
    'PROCEDURE' Q;
        'BEGIN'
        'ARRAY'
            A,
            D[1 : 1, 1 : N],
            E[0 : 0];
        'PROCEDURE' P(X, L);
            'LABEL'
                L;
            'INTEGER''PROCEDURE'
                X;
                'COMMENT' (F1,G1): 'VALUE' F1: 'REAL' F1,G1;
            B : 'FOR' I := 1 'STEP' 1 'UNTIL' N,
                I + 1 'DO'
                C : 'GOTO'
                    'IF' X(A[1, 1] + I, 0) = 0 'THEN'

==== ercc07/wwclink2.txt ====
parm nocheck
imp80 ercc07:Itrimp_wwcponeas+ercc07:poneb01s,wp1y,l1
imp80 ercc07:Itrimp_wwcptwoas+ercc07:timp02s,wp22y,l2
imp80 ercc07:Itrimp_wwcoptas+ercc07:opt02s,wopt2y,lo
imp80 ercc07:wwcgen01s,wgen1y,l3
LINK
ERCC07:wP1Y
ERCC07:wP22Y
ERCC07:wOPT2Y
ERCC07:wGEN2Y
ERCC07:CSERV01x
ercs01:EBITS_etrput1y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL

==== ercc07/ifast5s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform1s"
%INCLUDE "ercc07:ibmsup_xaioform"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)

==== ercc07/algtests_at87.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    I := 1;
    'FOR' X := .1 'STEP' X 'UNTIL' 1.0&6 'DO'
        I := I + 1;
    OUTREAL(99, I)
'END'

==== ercc07/algtests_at88.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        A;
    'INTEGER''PROCEDURE' F(X, Y);
        'VALUE'
            X,
            Y;
        'INTEGER'
            X,
            Y;
        A := F := X + 1;
    'INTEGER''PROCEDURE' G(X);
        'INTEGER'
            X;
        X := G := A + 2;
    A := 0;
    OUTREAL(99, A + F(A, G(A)) / G(A))
'END'

==== ercc07/algtests_at89.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL'
        I,
        J;
    'ARRAY'
        A[1 : 2, 1 : 3];
    'REAL' 'PROCEDURE' GPS(I, N, Z, V);
        'REAL'
            I,
            N,
            Z,
            V;
        'BEGIN'
        'FOR' I := 1 'STEP' 1 'UNTIL' N 'DO'
            Z := V;
        GPS := 1
        'END';
    OUTREAL(99, GPS(J, 3.0, I, GPS(I, 2.0, A[I, J], I + J)));
    'FOR' I := 1 'STEP' 1 'UNTIL' 2 'DO'

==== ercc07/algtests_at90.txt ====

'BEGIN'
'COMMENT' LIBRARY5;
    'REAL'
        R;
    'BOOLEAN'
        B;
    'INTEGER''PROCEDURE' F(X);
        'REAL'
            X;
        F := 0;
    'INTEGER'
        I,
        N,
        S;
    'INTEGER''PROCEDURE' G(Y);
        'BOOLEAN'
            Y;
        G :=
            'IF' Y 'THEN'
                2

==== ercc07/algtests_at91.txt ====

'BEGIN'
    'COMMENT'   ET COMMENT;
    'COMMENT' LIBRARY 1;
    'REAL'
        C;
    'ARRAY'
        D[ - 0 : + 1, 0&0 : 1.0];
    'INTEGER''PROCEDURE' R(C);
        'REAL'
            C;
        R :=
            'IF' 'TRUE' 'THEN'
                C
            'ELSE'
                R(0);
    D[0, 0] := C := C := 1;
    'COMMENT' PROGRAM MODIFIED TO AVOID USE BEFORE DECLARATION;
    'BEGIN'
        'INTEGER''ARRAY'
            H,

==== ercc07/algtests_at92.txt ====

'BEGIN'
'COMMENT' LIBRARY 1;
    'INTEGER'
        N;
    'INTEGER''PROCEDURE' P(Q, R);
        'INTEGER''PROCEDURE' Q;
        'COMMENT'   (R):'INTEGER''PROCEDURE' R;
        'INTEGER''PROCEDURE' R;
        'BEGIN'
        'INTEGER'
            B;
        B := 3 * Q(R);
        P := B
        'END';
    'INTEGER''PROCEDURE' A(F);
        'INTEGER''PROCEDURE'
            F;
        A := 2 * F;
    'INTEGER''PROCEDURE' B;
        'BEGIN'

==== ercc07/algtests_at93.txt ====

'BEGIN'
    'COMMENT' LIBRARY 3;
    'REAL' 'PROCEDURE' A(K, X1, X2, X3, X4, X5);
        'VALUE'
            K;
        'INTEGER'
            K;
        'REAL'
            X1,
            X2,
            X3,
            X4,
            X5;
        'BEGIN'
        'REAL' 'PROCEDURE' B;
            'BEGIN'
            K := K - 1;
            B := A := A(K, B, X1, X2, X3, X4)
            'END';
        'IF' K <= 0 'THEN'

==== ercc07/asss[1].txt ====
%externalroutine icl9cezassemble
%EXTERNALINTEGERMAPSPEC COMREG %ALIAS "S#COMREGMAP"(%INTEGER N)
%EXTERNALROUTINESPEC IPUT %ALIAS "S#IPUT"(%INTEGER TYPE,LENGTH,LA,IA)
%ROUTINESPEC ASSEMBLE(%BYTEINTEGERARRAYNAME S, %INTEGERNAME L,F)
%INTEGER DUMMY,FLAG,FILE ADDR,FILE PTR,FILE END,L,LL
%BYTEINTEGERARRAY OPCODE(0:32*1024)
%OWNINTEGERARRAY FDI(0:5)=0,24,32,0,0,0
      L=32000
%ownstring(63) hdr=" EMAS ASSEMBLER  RELEASE  2  VERSION  23Sep85"
      NEWLINES(2); SPACES(15)
      PRINTSTRING(hdr)
      NEWLINES(4)
      FILE ADDR=COMREG(46)
      %IF FILE ADDR#0 %THENSTART
         FILE PTR=FILE ADDR+INTEGER(FILE ADDR+4)
         FILE END=FILE ADDR+INTEGER(FILE ADDR)
      %FINISH
      ASSEMBLE(OPCODE,L,FLAG)
      NEWLINES(2)
      PRINTSYMBOL('*')
      %IF FLAG=0 %THEN PRINTSTRING("ASSEMBLY SUCCESSFUL") %ELSESTART

==== ercc07/algtests_at94.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        J,
        K,
        S;
    'INTEGER''PROCEDURE' F(N);
        'VALUE'
            N;
        'INTEGER'
            N;
        'BEGIN'
        'INTEGER'
            I,
            L;
        'FOR' I := N,
            S 'DIV' 2 'WHILE' S < 16 'OR' S = 28 'DO'
            'BEGIN'
            S := S + I + N;
            L := I

==== ercc07/algtests_at95.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL' 'PROCEDURE' G(X);
        'REAL'
            X;
        G := X + 1;
    'REAL' 'PROCEDURE' A(H);
        'REAL' 'PROCEDURE'
            H;
        'COMMENT'   (H1): 'REAL' H1;
        'BEGIN'
        'REAL' 'PROCEDURE' LOC(X);
            'REAL'
                X;
            LOC := H(G(X));
        A := LOC(0);
        'END' A;
    'REAL' 'PROCEDURE' B(F, H);
        'REAL' 'PROCEDURE'
            F;

==== ercc07/algtests_at96.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'PROCEDURE' P(F);
        'REAL' 'PROCEDURE'
            F;
        'COMMENT'   (F1):'LABEL' F1;
        F((M));
    B1 :;
    'BEGIN'
        'REAL' 'PROCEDURE' Q(L);
            'LABEL'
                L;
            'BEGIN'
            'GOTO' L;
            Q := 0;
            OUTREAL(99, 1)
            'END';
        B2 :;
        'BEGIN'
            'REAL'

==== ercc07/trimp_pnxlink4.txt ====
LINK
ERCC07.P1Y
ERCC07.XP2Y
ERCC07.XOPTY
ERCC07.XGEN4Y
ERCS04.NEWPNX_PUTY
ERCS04.NEWPNX_HEAPY
ERCS04.NEWPNX_PNXIMPY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
PNXIMP,ICL9CEZPNXIMP
SUPPRESS DATA
.ALL

==== ercc07/machineoper.txt ====
!
!                       E MACHINE OPERAND FORMS
!                       -----------------------
!
! Simple Forms
! ------------
!
! Litval
! corresponding address none (but see note A)
!
!               The operand is a literal
!
! Regval& Fregval  (also Regaddr & Regvar)
! corresponding address forms:-  none (but see note A)
!
!               The operand is in a Register - the form Regaddr
!               is used when the operand is known to be an
!               address but for code generation there is no
!               difference.  Care must be taken with Regvar
!               not to overwrite it except at assignment
!

==== ercc07/algtests_at97.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        X,
        N,
        K;
    'REAL' 'PROCEDURE' SIGMA(I, K, L, T);
        'VALUE'
            L;
        'INTEGER'
            I,
            K,
            L;
        'REAL'
            T;
        'BEGIN'
        'REAL'
            X;
        X := 0;
        'FOR' I := K 'STEP' 1 'UNTIL' L 'DO'

==== ercc07/portenv03_maths.txt ====
%include "itrimp_hostcodes"
%CONSTINTEGER TARGET=M88K
!%EXTERNALROUTINESPEC IOCP %ALIAS "s_iocp"(%INTEGER EP,N)
%CONSTLONGREAL LOG10A=2.3025850929940456840179914546843642076011
%CONSTLONGREAL PI=3.141592653589793238462643
%CONSTLONGREAL R1= 1.2595802263029547@  1{R'41C98867F42983DF'}
%CONSTLONGREAL R2=-8.6186317517509520@  1{R'C2562FB2813C6014'}
%CONSTLONGREAL R3=-1.2766919133361079@  0{R'C1146D547FED8A3D'}
%CONSTLONGREAL R4=-8.3921038065840512@ -2{R'C0157BD961F06C89'}
%CONSTLONGREAL S1= 2.7096164294378656@  1{R'421B189E39236635'}
%CONSTLONGREAL S2= 6.5581320451487386@  0{R'4168EE1BDE0C3700'}
%CONSTLONGREAL S3= 2.1441643116703661@  0{R'41224E7F3CBDFE41'}
%CONSTLONGREAL S4= 1.2676256708212610@  0{R'41144831DAFBF542'}
%CONSTLONGREAL RT3= 1.7320508075688772@  0{R'411BB67AE8584CAA'}
%CONSTLONGREAL PIBY6= 5.2359877559829887@ -1{R'40860A91C16B9B2C'}
%CONSTLONGREAL PIBY2M1= 5.7079632679489661@ -1{R'40921FB54442D184'}
%CONSTLONGREAL RT3M1=7.3205080756887728@ -1{R'40BB67AE8584CAA7'}
%CONSTLONGREAL TANPIBY12= 2.6794919243112271@ -1{R'404498517A7B3559'}
%CONSTLONGREAL PIBY4= 7.8539816339744816@ -1{R'40C90FDAA22168C2'}
%CONSTLONGREAL A1= 7.5000000000000000@ -1{R'40C0000000000000'}
%CONSTLONGREAL A2= 3.5398163397448309@ -2{R'3F90FDAA22168C23'}

==== ercc07/trimp_pnxlink5.txt ====
LINK
ERCC07.XP1Y
ERCC07.XP2Y
ERCC07.XOPTY
ERCC07.XGEN5Y
ERCC07.CSERV01Y
ERCS04.PNX_PUTY
ERCS04.PNX_HEAPY
ERCS04.PNX_PNXIMPY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
PNXIMP,ICL9CEZPNXIMP
SUPPRESS DATA

==== ercc07/algtests_at98.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL' 'PROCEDURE' R(A);
        'REAL'
            A;
        'BEGIN'
        'INTEGER''PROCEDURE' P(B, C);
            'INTEGER'
                B,
                C;
            P := B + C;
        R := P(A + 1, A)
        'END' R;
    'REAL'
        X;
    'BEGIN'
        'REAL'
            Y;
        Y := 4;
        X := R(R(Y + 1))

==== ercc07/algtests_at99.txt ====

'BEGIN'
    'COMMENT' LIBRARY 1;
'COMMENT' THIS PROGRAM HAS BEEN MODIFIED TO AVOID USE BEFORE DECLARATION
         AND ALSO TO REMOVE THE TYPE CHANGES ON ARRAYS TO VALUE;
    'INTEGER''ARRAY'
        A[16384 : 16385, - 16383 : - 16382];
    'INTEGER'
        S;
    'ARRAY'
        B[1 : 2, 0 : 2];
    'PROCEDURE' P(A, B, C, D);
        'VALUE'
            B,
            C;
        'REAL'
            A,
            B;
        'ARRAY'
            C,
            D;

==== ercc07/pnxlink6.txt ====
LINK ,map
ERCC07:XP1Y
ERCC07:XP22Y
ERCC07:XOPTY
ERCC07:XGEN6Y
ERCC07:CSERV01x
ERCS04:PNX_PUTY
ERCS04:PNX_HEAPY
ercs04:pnx_ccodey
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
pnxgenerateobject,ICL9CEZPNXIMP
SUPPRESS DATA

==== ercc07/gbits_gput8s.txt ====
!************************************************************
!*** YOU MUST SET 'SYSTEM' and 'FORMAT' VARIABLE BELOW ******
!************************************************************
! 23/june/87 Fix Relafm initial bound                        gput8
!
! 15/june/87 Tidy up for release. MPX  version no            gput7
!
! 3 /june/87 Corrections mainly for sect numbers in symbols. gput6
!
! 21/may/87 Correction for FAR. Lose extra byte in dict.     gput4u
!
!  6/5/87 Move section symbols to end and get rid of         gput4
!         empty sections.
!  30/4/87  Check out BSD.                                   gput3
!
! 13/4/87 Fix bad order of .text and .nbtext .               gput2
!         And make relocs relative to section.
!
! Amalgamate NP, MPX, C and UTX versions into new root       gput1
! With COFF changes added.
! 2/mar/87

==== ercc07/trimp_emaslink.txt ====
LINK
EP1Y
EP2Y
EOPTY
EGENY
CSERV01Y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIOPT
SUPPRESS DATA
.ALL
CLOSE
NEWGEN P0Y,IOPT01Y

==== ercc07/ifast7s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform1s"
%INCLUDE "ercc07:ibmsup_xaioform"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)

==== ercc07/makedrs_gen4.txt ====
offer dgens
parm nocheck
edit drsgen04s,dgens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes8>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs2>
e
imp dgens,.null
offer dgens,zepz06

==== ercc07/editinc1s.txt ====
/*

                              EDIT


Copyright (C)   A.Gibbons   University of Edinburgh   MCMXC

*/

#define msdos 1
#define castle 2
#define metsun 4
#define hp9000 8
#define cssun 16
#define TARGET castle

#if (TARGET == msdos)

#include <graph.h>
#include <stdlib.h>
#include <process.h>

==== ercc07/makedrs_gen5.txt ====
parm nocheck
edit drsgen05s,dgens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes28>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs5>
ta/host=/r6i/DRS/
e
imp dgens,.null
transfer dgens,castle(ercc07,pete)impdir/sources/d386p4s10.i,file

==== ercc07/perq3link.txt ====
LINK
ERCC07:p3p1Y
ERCC07:p3p22Y
ERCC07:p3oPT3Y
ERCC07:P3GEN2Y
ERCC07:CSERV01x
ercs01:EBITS_etrput1y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZperq3IMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/makedrs_gen6.txt ====
parm nocheck
edit drsgen06s,dgens
a/%incl/d1i<itrimp_hostcodes>
a'd1i<ercs01:ebits_ecodes28>
a'd1i<tripcnsts>
a'd1i<itrimp_tform2s>
a'd1i<ercs01:ebits_especs5>
ta/host=/r6i/DRS/
e
imp dgens,.null
transfer dgens,epcfta(pds,peathag)d386p4s11.i,file

==== ercc07/pdsputs.txt ====
      {*********************}
      {*     EMAS 370      *}
      {*   PUT INTERFACE   *}
      {*   April 22 1985   *}
      {*********************}

%CONSTSTRING (31) PUTVERSION= "PUT: version 13th November 1985"

      { These are the low level code and object generation routines which are common}
      { to our XA compilers in the EMAS 370 environment. }

      {April 22nd - Began move to new object file format. Incorporated LPUT functions}
      { April 18th - added Fortran features: Switch Val and Entry }



      { Tracing control }

%CONSTINTEGER ON= 1, OFF = 2
%CONSTINTEGERNAME PTURNSA=x'003008d4'
%CONSTSTRING (5) %ARRAY CHEADINGS(0:15)="pinit","pterm","pjump","plabl",

==== ercc07/eamdgen00s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/ifast8s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform1s"
%INCLUDE "ercc07:ibmsup_xaioform"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)

==== ercc07/trimp_pnxponeas.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PNX
! PRODUCED BY OLDPS FROM TRIMP_PNXPS01 ON 06/09/83
%CONSTBYTEINTEGERARRAY CLETT(0: 436)=   1,
  40,   1,  41,   1,  42,   1,  44,   2, 201, 198,   6, 213, 206, 204,
 197, 211, 211,   5, 215, 200, 201, 204, 197,   5, 213, 206, 212, 201,
 204,   3, 198, 207, 210,   1,  61,   5, 193, 204, 201, 193, 211,   7,
 201, 206, 212, 197, 199, 197, 210,   4, 210, 197, 193, 204,   4, 204,
 207, 206, 199,   4, 194, 217, 212, 197,   6, 211, 212, 210, 201, 206,
 199,   4, 200, 193, 204, 198,   5, 211, 200, 207, 210, 212,   6, 210,
 197, 195, 207, 210, 196,   7, 210, 207, 213, 212, 201, 206, 197,   2,
 198, 206,   3, 205, 193, 208,   8, 198, 213, 206, 195, 212, 201, 207,
 206,   4, 206, 193, 205, 197,   9, 193, 210, 210, 193, 217, 206, 193,
 205, 197,   9, 207, 198, 208, 210, 207, 199, 210, 193, 205,   6, 207,
 198, 198, 201, 204, 197,   6, 207, 198, 204, 201, 211, 212,   6, 198,
 207, 210, 205, 193, 212,   3, 206, 207, 212,   3, 193, 206, 196,   2,
 207, 210,   1,  58,   4, 211, 208, 197, 195,   5, 193, 210, 210, 193,
 217,   3, 207, 215, 206,   8, 197, 216, 212, 197, 210, 206, 193, 204,
   9, 197, 216, 212, 210, 201, 206, 211, 201, 195,   8, 195, 207, 206,
 211, 212, 193, 206, 212,   5, 195, 207, 206, 211, 212,   5, 197, 214,

==== ercc07/trimp_ibmlink.txt ====
LINK
IP1Y
IP2Y
IOPTY
IGENY
CSERV01Y
ERCC10.IBMRECODEY
ERCS12.IPUT_IPUT01Y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIBMIMP
SUPPRESS DATA
.ALL

==== ercc07/puts.txt ====
{*********************}
{*     XA  EMAS3     *}
{*   PUT INTERFACE   *}
{*   Sept 26  1984   *}
{*********************}

{ These are those low level code and object generation routines which are common}
{ to our XA compilers in the EMAS3 environment. }



{ Tracing control }

%constinteger On= 1, Off = 2

%constinteger Tracing= Off         { Controls conditional compilation }


{ Trace all significant calls on interface if: }
{ comreg(26)&1#0 (Major calls) or }
{ ComReg(26)&2#0 (Code planting calls) }

==== ercc07/ibmsup_xaioform.txt ====
!
! orbf is format for an operation request block
! irbf is format for interrupt response block
! schibf is the format for a subchannel inf block used by MSCH
!
%recordformat orbf(%integer ip,keytags,cpaddr)
%recordformat irbf(%integer keycntr,csw1,csw2,xstatusw,%integerarray ecws(0:11))
%recordformat  schibf(%integer ip,%short flags,devno,%byte lpm,pnom,lpum,pim,
    %short mbi,%byte pom,pam,chipd0,chipd1,chipd2,chipd3,chipd4,chipd5,
    chipd6,chipd7,%integer zword,keycntrl,csw1,csw2,md0,md1,md2)
!
! end of file xaioform
!

==== ercc07/pprof01s.txt ====

%externalROUTINE PPROFILE %alias "S#PPROFILE"(%INTEGER tabad)
%INTEGER LINES,V,I,J,MAX,MAXMAX
      LINES=integer(tabad)
      MAX=0
      %CYCLE I=1,1,LINES
         %IF INTEGER(tabad+4*I)>MAX %THEN MAX=INTEGER(tabad+4*I)
      %REPEAT
      MAXMAX=MAX
      MAX=1+MAX//40;                 ! TWO&AHALF PER CENT
      %CYCLE I=1,1,LINES
         V=INTEGER(tabad+4*I)
         %IF V>=MAX %THEN %START
            WRITE(I,4)
            J=I
            J=J+1 %WHILE INTEGER(tabad+4*J+4)=V
            %IF J#I %THEN PRINTSTRING("->") %AND WRITE(J,4) %C
                  %ELSE SPACES(7)
            I=J
            WRITE(V,6)
            %IF V=MAXMAX %THEN PRINTSTRING("   ***")

==== ercc07/bootgen1s.txt ====
!
! Copyright P.D.Stephens 1988
! This is a modified Ecode generator with chenges so that it is available
! for rapid implementation of a complete compiler system. The aim is to be able
! to bring up EMAS compilers fast on another system if there is a big bang
! change in the near future. Also this version is intended to be "Definitive"
! ie to define what some of the more specialised operations have to do.
! To this aid extended commentary has been added.

!
! The following changes have been made from a standard generator
!
! 1)  All eops go via one routine(EOP). The Ef77op, Epasop etc are dummies
!
! 2)  As many specialized operations as possible are re-implemted in terms
!     of simplier Ecode operations. This makes the generator highly recursive
!
! 3)  Address and refer are implemented as far as possible via state 
!     transitions not by planting code
!
! 4)  A routine Trapjump (QV) has been introduced to tidy up error exits

==== ercc07/trimp_perqps01.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(DUMMYSTART)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/gbits_gldauxst2s.txt ====
! 06/01/89 -  Combined aux stack support for IMP and Pascal 
! The old routine iauxst is included for back compatability
! but will eventually be dropped
!
%constinteger trace=0
%constinteger auxsize=x'20000'
!*
!
! dont disturb the order of the next 3 lines assumed by IMp compiler
!
%externalinteger auxcur %alias "p_aux"
%owninteger auxtop
%owninteger auxbase=0
!*
%externalintegerfnspec malloc(%integer size)
!*
%externalroutine Initaux (%integer auxsize { in Kilobytes})
%integer amount
      %if auxbase#0 %then %return;      !  already initialised
      %if Auxsize < 16 %then Auxsize=16
      Amount = auxsize<<10

==== ercc07/vaxsup_setsigsc.txt ====
#include <signal.h>
#define DELLCCOMPILER
 
extern onsignal(); 
 
f_setsigs ()
{
         /* Set traps to take interrupts to IMP diagnostics */
 
    if ((int)signal(SIGFPE,  SIG_IGN) != SIG_IGN) signal(SIGFPE,  onsignal);
    if ((int)signal(SIGILL,  SIG_IGN) != SIG_IGN) signal(SIGILL,  onsignal);
    if ((int)signal(SIGEMT,  SIG_IGN) != SIG_IGN) signal(SIGEMT,  onsignal);
    if ((int)signal(SIGSEGV, SIG_IGN) != SIG_IGN) signal(SIGSEGV, onsignal);
    if ((int)signal(SIGIOT,  SIG_IGN) != SIG_IGN) signal(SIGIOT,  onsignal);
    if ((int)signal(SIGQUIT, SIG_IGN) != SIG_IGN) signal(SIGQUIT, onsignal);
    if ((int)signal(SIGBUS,  SIG_IGN) != SIG_IGN) signal(SIGBUS,  onsignal);
}

==== ercc07/ifast9s.txt ====
%INCLUDE "ercc07:ibmsup_comf370"
%INCLUDE "ercc07:ibmsup_page0f"
%INCLUDE "ercc07:ibmsup_dtform1s"
%INCLUDE "ercc07:ibmsup_xaioform"
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,(%INTEGER P1,P2,P3,P4,P5,P6 %ORSTRING (23) TEXT))
%CONSTINTEGER PCELLSIZE=36,MARGIN=48
%RECORDFORMAT PDOPEF(%INTEGER CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,NEXTPAGE,S1,S2,S3,S4)
%RECORDFORMAT PARMXF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%CONSTRECORD (PARMXF) %ARRAYNAME PARM=PARM0AD
%CONSTRECORD (PDOPEF) %NAME PARMDOPE=PARM0AD
%RECORDFORMAT STOREF(%SHORTINTEGER FLAGS,USERS,LINK,BLINK,FLINK)
%CONSTRECORD (STOREF) %ARRAYNAME STORE=STORE0AD
!
%EXTERNALLONGINTEGER SEMATIME=0
%OWNINTEGER PARMASL=0
%EXTERNALINTEGER MAINQSEMA=-1
%EXTERNALINTEGERSPEC STORESEMA
%OWNINTEGERARRAY GET NEW PAGE(0:14);    ! parms for call of new epage
!
%CONSTINTEGER LOCSN1=LOCSN0+MAXPROCS
%RECORDFORMAT SERVF(%INTEGER P,L)

==== ercc07/vaxsup_imp81cld.txt ====
MODULE imp80_table

DEFINE VERB IMP80
   QUALIFIER LIST, NEGATABLE
   QUALIFIER DIAG, NEGATABLE
   QUALIFIER CHECK, NEGATABLE
   QUALIFIER ARRAY, NEGATABLE
   QUALIFIER TRACE, NEGATABLE
   QUALIFIER OPT, NONNEGATABLE
   QUALIFIER LINE, NEGATABLE
   QUALIFIER MAP, NONNEGATABLE
   QUALIFIER CODE, NEGATABLE
   QUALIFIER PARMZ, NEGATABLE
   QUALIFIER PARMY, NEGATABLE
   QUALIFIER PARMX, NEGATABLE
   DISALLOW OPT AND (CHECK OR ARRAY OR DIAG)
   IMAGE "U1:[ERCC07]IMP80"
   PARAMETER P1,PROMPT="Source file",LABEL=SOURCEFILE,VALUE(REQUIRED,TYPE=$FILE)

==== ercc07/putspecs.txt ====
{* IBM XA Code Planting routinespecs *}

{******** Monitoring *********}

{ Parm CODE will cause a line by line decode of instructions }
{ Monitoring of all non-code planting is turned on by PMonOn or bit 1 of }
{ COMREG(26). Monitoring of code planting is turned on by bit 2 of COMREG(26) }
{ COMREG(26)=128 causes decoding of each instruction as planted }
{ COMREG(26)=256 causes decoding of the whole code area after fixups }

{* The following routinespecs have been provided initially, corresponding to the *}
{* formats given in the "Principles of Operation".                           *}

   %externalroutinespec PIX RR %alias "S#PIXRR" (%integer Op, R1, R2)
      { Plant RR format instruction }

   %externalroutinespec PIX RRE %alias "S#PIXRRE"(%integer Op, R1, R2)
      { Plant RRE format instruction }

   %externalroutinespec PIX RX %alias "S#PIXRX" (%integer Op, R1, X2, B2, D2)
      { Plant RX format instruction }

==== ercc07/ibmsup_config370.txt ====
!
!     4341 configuration
!
%constinteger cf entry size=32
%constinteger cfentries=8
%constintegerarray config file(0:cfentries*(cf entry size//4)-1)= %c
      cfentries*cf entry size,1,1,6,x'282',1,500,0,
      3,m'FD00',x'193',0,3,0,0,0,
      mt<<16!x'ff',10,512,0,0,x'281',m'M60',x'00ff0000',
      mt<<16!x'ff',10,512,0,0,x'282',m'M60',x'00000100',
      op<<16!x'ff',10,512+oper screen size,0,0,x'9',m'OP0',0,
      lp<<16!x'ff',60,2048,0,0,x'e',m'LP0',0,
      cr<<16!x'ff',300,512,0,0,x'c',m'CR0',0,
      cp<<16!x'ff',300,512,0,0,x'd',m'CP0',0
!

==== ercc07/makeimp.txt ====
parm nocheck,maxdict
imp ercc07:itrimp_ibmponeas+ercc07:poneb02s,ip12y,l0
imp ercc07:itrimp_ibmptwoas+timp03s,ip23y,l1
imp ercc07:itrimp_ibmoptas+opt03s,iopt3y,l2
imp ibmgen05s,igen5y,l5

==== ercc07/drsgen03s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/makep3_p1.txt ====
edit poneb01s,p3p1s
i<itrimp_perq3poneas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
m/%constlonglongreal/
(a/r'/a16d/'/i/'/)154
e
imp p3p1s,.null
offer p3p1s,ercs01

==== ercc07/makep3_p2.txt ====
edit timp02s,p3p2s
i<itrimp_perq3ptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
e
imp p3p2s,.null
offer p3p2s,ercs01

==== ercc07/perfs.txt ====
%CONSTINTEGER MAXPROCS=256
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER VAMODE=YES
%CONSTINTEGER COM SEG=31
%CONSTINTEGER LOCSN0=64
%CONSTINTEGER PAGESIZE=4096
%CONSTINTEGER SSHIFT=20
%INCLUDE "ercc07:ibmsup_comf370"
!-----------------------------------------------------------------------
%CONSTINTEGER EPAGESPERSEC=600;         !EPAGES THRU one DISC CONTROLLER PER SECOND
!----------------------------------------------------------------------

%EXtERNALSTRINGFUNCTIONSPEC ITOS %alias "S#ITOS" (%INTEGER N)


%EXTERNALROUTINESPEC MOVE %ALIAS "S#MOVE"(%INTEGER NLENGTH,NFROM,NTO)



%EXTERNALROUTINESPEC PROMPT %alias "S#PROMPT"(%STRING (255) S)


==== ercc07/pdiags1.txt ====
!*
!*
!***********************************************************************
!***********************************************************************
!*                                                                     *
!*      P A S C A L   P O S T M O R T E M   D I A G N O S T I C S      *
!*                                                                     *
!***********************************************************************
!***********************************************************************
!*
!*
!*  History
!*  -------
!*
!*  Version 1 for PERQ2.
!*
%CONST %INTEGER PERQ2= 0;
%CONST %INTEGER PERQ3= 1;
%CONST %INTEGER AMDAHL= 2;
%CONST %INTEGER GOULD= 3;
%CONST %INTEGER HOST= AMDAHL

==== ercc07/trimp_ibmponeas.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=IBMXA
! PRODUCED BY OLDPS FROM TRIMP_IBMPS01 ON 12/04/84
%CONSTBYTEINTEGERARRAY CLETT(0: 440)=   1,
  40,   1,  41,   1,  42,   1,  44,   2, 201, 198,   6, 213, 206, 204,
 197, 211, 211,   5, 215, 200, 201, 204, 197,   5, 213, 206, 212, 201,
 204,   3, 198, 207, 210,   1,  61,   5, 193, 204, 201, 193, 211,   7,
 201, 206, 212, 197, 199, 197, 210,   4, 210, 197, 193, 204,   4, 204,
 207, 206, 199,   4, 194, 217, 212, 197,   6, 211, 212, 210, 201, 206,
 199,   4, 200, 193, 204, 198,   5, 211, 200, 207, 210, 212,   6, 210,
 197, 195, 207, 210, 196,   7, 210, 207, 213, 212, 201, 206, 197,   2,
 198, 206,   3, 205, 193, 208,   8, 198, 213, 206, 195, 212, 201, 207,
 206,   4, 206, 193, 205, 197,   9, 193, 210, 210, 193, 217, 206, 193,
 205, 197,   9, 207, 198, 208, 210, 207, 199, 210, 193, 205,   6, 207,
 198, 198, 201, 204, 197,   6, 207, 198, 204, 201, 211, 212,   6, 198,
 207, 210, 205, 193, 212,   3, 206, 207, 212,   3, 193, 206, 196,   2,
 207, 210,   1,  58,   4, 211, 208, 197, 195,   5, 193, 210, 210, 193,
 217,   3, 207, 215, 206,   8, 197, 216, 212, 197, 210, 206, 193, 204,
   9, 197, 216, 212, 210, 201, 206, 211, 201, 195,   8, 195, 207, 206,
 211, 212, 193, 206, 212,   5, 195, 207, 206, 211, 212,   5, 197, 214,

==== ercc07/makep3_opt.txt ====
edit opt03s,p3pos
i<itrimp_perq3optas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
a'
d1i<tripcnsts>
e
imp p3pos,.null
offer p3pos,ercs01

==== ercc07/sldxas.txt ====
         TITLE 'EMAS 370/XA self loading dump'
*
* R.D. Eager   University of Kent   MCMLXXXVI
* P.D.Stephens University of Edinburgh upgraded to format 1 ccws
* This module is loaded at real x1008 runs in page 1
*
SLD      START
*
         DC    X'0DC0'        * BASR  12,0 set up base register
         USING *,12
*
         L     1,184(0)      * get IPL subsystem ID
*
         LA    2,8           * make upper half of EC mode PSW
         SLL   2,16          * generates X80000
         LA    3,IOINT       * address of I/O interrupt handler
         STM   2,3,120(0)    * set up I/O interrupt vector
         OI    124(0),X'80'  * Set 31 bit mode
         LA    3,PEINT       * address of program interrupt handler
         STM   2,3,104(0)    * set up program interrupt vector
         OI    108(0),X'80'  * Set 31 bit mode

==== ercc07/drsgen04s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/drsimpcmds.txt ====
%externalintegermapspec Comreg%alias "S#COMREGMAP"(%integer N)
%externalroutinespec compile%alias "S#COMPILE"(%string(255) s, %string(31) entry,
%integername flag)
%externalstringfnspec failuremessage %alias"s#failuremessage" (%integer n)
%externalroutine orionimp %alias "C#ORIONIMP"
%integer flag
%string(255) s
s=""
compile(s,"ICL(CEZORIONIMP",flag)
printstring(failuremessage(flag)) %and %stop %unless flag=0
%end
%externalroutine DRSIMP %alias "C#DRSIMP"
%integer flag
%string(32) File
compile(file,"ICL9CEZDRSIMP",flag)
printstring( failuremessage(flag)) %and %stop %unless flag=0
%return %unless comreg(24)=0 %or comreg(24)=8
%end
%externalroutine UIMP %alias "C#UIMP"
%string(32)file
%integer flag

==== ercc07/trimp_emasps01.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(DUMMYSTART)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/drsgen05s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/docs_edit.txt ====


      New Features in EMAS Editor
      ---------------------------

     A new version of the EMAS Editor (invoked by the Command EDIT) will be
introduced in October or when the 2988 hardware problems currently affecting
editors have been resolved. The most important of the new features is that the
Editor will save any editing when the process is closed down during an edit
session. The output will be written into a file E#EHA where it can be inspected
and copied to the required destination. Editing will no longer be lost for
communications breaks or user inactivity. The feature cannot guarantee to save
editing over system failures. Obviously at least one OCP, one disc controller
and the relevant file system disc must be operational before editing can be
saved. A report is left in the RECALL file whenever editing has been saved.

     Other commands changed are:

A,M (etc)  All text searching commands are now based on case independent text
           matching. Thus "M/Fred/" will move to "FRED" or "fred" as well as
           "Fred". The previous mode of case dependent matching can be restored

==== ercc07/makegld_p1.txt ====
offer gldp1s
parm nocheck,nolist
edit poneb02s,gldp1s
i<itrimp_gldponeas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
e
imp gldp1s,.null
offer gldp1s,ercs01

==== ercc07/docs_vectorp.txt ====
     In spite of the progress made recently with parallel machines and the
variety of applications which have been adapted for parallel techniques, there
remain a variety of numerically intensive applications requiring a fast single
processor. A vector processor is just such a fast single stream machine with
additional hardware to accelerate repeated similar calculations as might be
applied to arrays of data.  The University is fortunate in having a Gould NP1
machine on loan for a joint communications project and this is providing
valuable experience in this area. It is possible that the loan will be come
permanent if the University can raise fund to cover the maintenance.

     The magnitude of acceleration provided by a Vector processor is limited; a
factor of four or five seems to be the limit and the average increase in
performance of a lengthy and varied calculation is typically two to two and half
times. However Vector processors have one priceless advantage in that
reprogramming is not normally needed. The minor rearrangement of the (normally
Fortran) source is within the capabilities of current optimizing compiler
technology and the enhanced performance can usually be gained simply by
recompilation. Further accessible enhancement will come when certain scientific
subroutines like the NAG Library are available in vector form. For this reason
Vector processors are likely to have a permanent place in research orientated
computing

==== ercc07/makegld_p2.txt ====
parm nocheck,nolist
edit timp06s,gldp2s
i<itrimp_gldptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
e
imp gldp2s,.null
transfer gldp2s,epcpnb(pds,peathag)p2v12.i,file

==== ercc07/ibmsup_lcform2s.txt ====
%constinteger LSTLEN=256;               ! LOCAL SEGMENT TABLE LENGTH
%constinteger CBTLEN=299;               ! LENGTH OF CBT TABLE
%constinteger CONTEXTL=192;             ! LENGTH OF AN IBM CONTEXT
%constinteger LCONTN=5;                 ! NO OF LOCAL CONTEXTS
!
                                        ! CONTEXTF A SORT OF SSN+1
%recordformat CONTEXTF((%integer psw0,psw1 %or %longinteger PSW),
      {8}%integerarray GR(0:15),
      {72}FR(0:7),{104}CONTROLR(0:15),{168}%longinteger CPUTIMER,
      %integer ASYNI,SUSP,%short PECODE,ILC,%integer spare)
                                        ! PARMF FOR PARAMETER PASSING(32 BYTES
%recordformat PARMF((%integer DEST,SRCE %OR %short DSNO,DACT,SSNO,SACT),
      (%integer P1,P2,P3,P4,P5,P6 %OR %integerarray P(1:6) %OR %C
      %string(6)USER,%byte INCAR,%string(15)INTMESS))
!
                                        ! SIGOUTPF FOR PASSING SIGNALS(48 BYTES)
%recordformat SIGOUTPF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,TYPE,SSN,SSNAD,SUSP)
!
                                        ! CBT THE CLAIMED BLOCK FORMAT
%recordformat CBTF(%integer DA,%short AMTX,%byte LNGTH,TAGS)
                                        ! CBT FLAGS DEFINED AS FOLLOWS

==== ercc07/drsgen06s.txt ====
! 26Sep90 Chnages for Unix shared code for unix 5.4 and later
!
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand

==== ercc07/makevns_p1.txt ====
edit poneb01s,vp1s
i<itrimp_vnsponeas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<itrimp_tform2s>
m/%constlonglongreal/
e
imp vp1s,.null
offer vp1s,eepz06

==== ercc07/trimp_ibmps01.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(DUMMYSTART)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/makevns_p2.txt ====
edit timp02s,vp2s
i<itrimp_vnsptwoas>
ta/%inc/
d1i<itrimp_hostcodes>
a'
d1i<tripcnsts>
a'
d1i<itrimp_tform2s>
e
imp vp2s,.null
offer vp2s,eepz06

==== ercc07/emas-2900/perqtrimp_blurb.txt ====

      This comprises all the Perq (pos) components of triple imp together
with the latest versions of pass1 &pass2. It will not make a working
compiler since one or two more facilities are needed in Perqgen
to keep up with the latest additions to tripleimp. It does from the basis
of a further implementation should Pos every be reurrected.
                                        PDS 12/09/83

==== ercc07/emas-2900/sup26csrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP CTOPT+SUP26CSRCE_SUP26CS,SUPZZ,,.OUT
IMP CTOPT+SUP26CSRCE_COM29S,COMZZ,,.OUT
IMP CTOPT+SUP26CSRCE_PRINT04S,PRINTZZ,,.OUT
IMP SUP26CSRCE_OPER31S,OPERZZ,,.OUT
IMP SUP26CSRCE_ENTER04S,ENTERZZ,,.OUT
IMP SUP26CSRCE_GPC28S,GPCZZ,,.OUT
IMP SUP26CSRCE_NDIAG06S,NDIAGZZ,,.OUT
IMP CTOPT+SUP26CSRCE_COMMS42S,COMMSZZ,,.OUT
IMP CTOPT+SUP26CSRCE_FAST27S,FASTZZ,,.OUT
IMP SUP26CSRCE_TAPE65S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
NDIAGZZ
COMMSZZ

==== ercc07/emas-2900/pnxgen04s.txt ====
%INCLUDE  "ERCS04.PNX_CCODES"
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.TRIMP_TFORM1S"
%CONSTINTEGER ESTK=0,BR0=1,BR1=2,BR2=3,BR3=4,FR0=5,FR1=6,FR2=7,FR3=8,
               BRN=BR0<<16!BR3,FRN=FR0<<16!FR3
%RECORDFORMAT REGF(%INTEGER CL,(%INTEGER USE %OR %HALF SECUSE,PRIMUSE),
      %INTEGER INF1,INF2,AT,LINK)
%OWNINTEGER CABUF,GLACABUF,GLABEL,FPPTR,FPHEAD
%OWNINTEGERNAME CA,GLACA,PPCURR
%OWNINTEGERARRAYNAME CTABLE,TAGS
!%OWNBYTEINTEGERARRAYNAME CODE
%OWNRECORD(LISTF)%ARRAYNAME ASLIST
%EXTRINSICINTEGERARRAY CAS(0:12)
%EXTRINSICRECORD(WORKAF)WORKA
%EXTRINSICRECORD(PARMF) PARM
%CONSTINTEGER MAXREG=8
%OWNRECORD(REGF)%ARRAY REGS(0:MAXREG)
%EXTERNALROUTINESPEC FLAGAND FOLD(%RECORD(TRIPF)%ARRAYNAME T)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%EXTERNALROUTINESPEC FAULT(%INTEGER I,J,K)
%INCLUDE "ERCS04.PNX_PUTSPECS"

==== ercc07/emas-2900/dectalk.txt ====

Introduction

     Edinburgh University has run its computing service on essentially the  same
software  since  1970.    This  has been achieved by Porting an entire Operating
System twice.   The three machines used as Hosts had little in common except for
byte  addressing  and  virtual address support.   The User community have had an
exceptionally smooth transition between incompatable hardware which arrived with
very different suppliers systems.

     It would be nice to report that these 15 years  of  stabiltity  in  a  fast
changeing  world  was  the  result of immense far sightedness on the part of the
team who constructed the orignal EMAS system during 1967-70.   However it  would
also be quite incorrect to do so.

     This talk, like Gaul, is divided into three parts.   Firstly I will  describe
what actually happened.   Then I will describe some design feature of EMAS which
led to it being transported twice  and  finally  I  will  present  some  of  the
advantages and disadvantages of running on Portable software.

History.

==== ercc07/emas-2900/sup28asrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER RECONFIGURE=YES;          ! NO TO EXCLUDE DYNAMIC CONFIGURATION
%CONSTINTEGER MULTIOCP=YES;             ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=NO;             ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=NO;              ! CARD PUNCH FITTED
%CONSTINTEGER CSU FITTED=NO;            ! SWITCH UNIT
%CONSTINTEGER SNOOZING=YES;             ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER PRODUCTION=NO;            ! YES FOR CONTINUING AFTER
                                        ! SOFTWARE ERRORS(MOST OF WHICH
                                        ! ARE DUE TO HARDWARE!)
%CONSTINTEGER MONLEVEL=7;               ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING

==== ercc07/emas-2900/ibmgen02s.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=AMDAHL
%CONSTINTEGER FOURKTDISP=0
%INCLUDE "ERCC10.OPOUTS"
!
%CONSTINTEGER LGR=X'58',AND=X'54',ICP=X'59';      ! VARIANT MNEMONICS
%IF TARGET=IBM %THEN %START
      %OWNINTEGER BALCODE=BAL
%FINISH %ELSE %START
      %OWNINTEGER BALCODE=BAS
%FINISH
%CONSTINTEGER MARGIN=512;               ! MARGIN FOR ADRESSABILITY
%CONSTINTEGER MAXREG=19;                ! FOR DECLARING REGISTER ETC
%CONSTINTEGER CODER=12
%CONSTINTEGER  WSPR =11
%CONSTINTEGER  GLAREG =13
%CONSTINTEGER LINKREG=15;               ! REGISTER FOR RETURN ADDRESS
%CONSTINTEGER EPREG=14;                 ! REGISTER HOLDING RT ENTRYPOINT
%CONSTINTEGER CTABLEREG=14;             ! REGISTER HOLDING CONSTANT TABLE
%CONSTINTEGER GR0=X'000F0000';          ! ANY GR FROM 0-15

==== ercc07/emas-2900/sup26esrce_releasen.txt ====





         SUPERVISOR RELEASE NOTICE VSN 26E
         _________________________________
  



      This Supervisor incorporates the following changes:-

         1) Has code to single up duals by abandonding 1 OCP.

         2) Has revised scheduling with 5 priority queues.
            This enables batch throughput to be improved
            by discriminating against cpu-bound terminal jobs.
 
         3) Has improved COMMS(45) which supports the "FEPUP n"
            command for recovering a crashed FEP.

==== ercc07/emas-2900/sup25jsrce_makechkd.txt ====
PARM PARMX,STACK,NOCHECK,NOLIST
IMP SUP25JSRCE_SUP25JS,SUP25ZZ,,.OUT
IMP SUP25JSRCE_COM24S,COM24ZZ,,.OUT
IMP SUP25JSRCE_PRINT01S,PRINT01ZZ,,.OUT
IMP SUP25JSRCE_GPC22S,GPC22ZZ,,.OUT
IMP SUP25JSRCE_COMMS38S,COMMS38ZZ,,.OUT
PARM PARMX,OPT,STACK,NOLIST
IMP SUP25JSRCE_NDIAG06S,NDIAG06ZZ,,.OUT
IMP SUP25JSRCE_FAST24S,FAST24ZZ,,.OUT
IMP SUP25JSRCE_TAPE63S,TAPE63ZZ,,.OUT
PARM MAP
LINK
SUP25ZZ
COM24ZZ
PRINT01ZZ
GPC22ZZ
NDIAG06ZZ
COMMS38ZZ
FAST24ZZ
TAPE63ZZ
.END

==== ercc07/emas-2900/pnxgen05s.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PNX
%INCLUDE  "ERCS04.PNX_CCODES"
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.TRIMP_TFORM1S"
%CONSTINTEGER ESTK=0,BR0=1,BR1=2,BR2=3,BR3=4,FR0=5,FR1=6,FR2=7,FR3=8,
               BRN=BR0<<16!BR3,FRN=FR0<<16!FR3
%RECORDFORMAT REGF(%INTEGER CL,(%INTEGER USE %OR %HALF SECUSE,PRIMUSE),
      %INTEGER INF1,INF2,AT,LINK)
%OWNINTEGER CABUF,GLACABUF,GLABEL,FPPTR,FPHEAD
%OWNINTEGERNAME CA,GLACA,PPCURR
%OWNINTEGERARRAYNAME CTABLE,TAGS
!%OWNBYTEINTEGERARRAYNAME CODE
%OWNRECORD(LISTF)%ARRAYNAME ASLIST
%EXTRINSICINTEGERARRAY CAS(0:12)
%EXTRINSICRECORD(WORKAF)WORKA
%EXTRINSICRECORD(PARMF) PARM
%CONSTINTEGER MAXREG=8
%OWNRECORD(REGF)%ARRAY REGS(0:MAXREG)
%EXTERNALROUTINESPEC FLAGAND FOLD(%RECORD(TRIPF)%ARRAYNAME T)

==== ercc07/emas-2900/wichtests_wt1.txt ====
'BEGIN'
    'REAL' X;
    'INTEGER' I;
        I := 10000000000000000000000000;
        X := 1.0&999
'END'

==== ercc07/emas-2900/sup26fsrce_sup26fs.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) CHANGE SSERIES=NO TO SSERIES=YES IN CTOPTIONS FILE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=2048+255+LSTLEN; ! SIZE OF SMAE
                                        ! MADE UP OF 2049 FOR CBT
                                        ! LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT
%CONSTINTEGER LSTACKLEN=3;              ! LOCAL CONT. STACK ELEN

==== ercc07/emas-2900/wichtests_wt2.txt ====
'BEGIN'
    'REAL' AUTOCORRELATIONCOEFFICIENTNUMBER1;
        AUTOCORRELATIONCOEFFICIENTNUMBER1 := 0.0;
        'BEGIN'
        'REAL' AUTOCORRELATIONCOEFFICIENTNUMBER2;
            AUTOCORRELATIONCOEFFICIENTNUMBER2 := 1.0;
            OUTREAL(99, AUTOCORRELATIONCOEFFICIENTNUMBER1 +
                AUTOCORRELATIONCOEFFICIENTNUMBER2 )
        'END'
'END'

==== ercc07/emas-2900/wichtests_pete1.txt ====
'BEGIN' 'INTEGER'I,J; 'REAL' X;
J:=15;
'FOR' I:=-10 'STEP' 1 'UNTIL' 10 'DO' 'BEGIN'
      X:=9.987654321*10**I;
      PRINT(X,0,10); PRINT(X*10**15,0,10);
      PRINT(X*10**1,0,10);
      NEWLINE
      'END';
'END';

==== ercc07/emas-2900/wichtests_wt3.txt ====
L1:
'BEGIN'
    'IF' 1 = 2 'THEN'
        'GOTO' L1
'END'

==== ercc07/emas-2900/ibmgen03s.txt ====

!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands 
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.

==== ercc07/emas-2900/wichtests_pete2.txt ====
'COMMENT' CHECK THAT FAULTY ASSIGNMENT TO PROCEDURE NAME IS DETECTED;
'BEGIN'
'INTEGER'C;
'INTEGER''PROCEDURE' CHSP(U); 'INTEGER'U;
'BEGIN' 'INTEGER'X;
'IF' U<CODE({A}) 'THEN' X:=0 'ELSE' X:=1;
CHSP(U):=X
'END';
C:=0;
CHSP(C)
'END';

==== ercc07/emas-2900/perq_xspecs.txt ====
%EXTERNALROUTINESPEC RECODE(%INTEGER S,F,AD)
%EXTERNALROUTINESPEC CODEOUT
%EXTERNALROUTINESPEC PTLATE(%INTEGER WORD)
%EXTERNALROUTINESPEC PWORD(%INTEGER WORD)
%EXTERNALROUTINESPEC PB1(%INTEGER OPCODE)
%EXTERNALROUTINESPEC PB2(%INTEGER OPCODE,BYTE)
%EXTERNALROUTINESPEC PB3(%INTEGER OPCODE,BYTE1,BYTE2)
%EXTERNALROUTINESPEC PB4(%INTEGER OPCODE,B1,B3,B3)
%EXTERNALROUTINESPEC PBW(%INTEGER OPCODE,WORD)
%EXTERNALROUTINESPEC PB2W(%INTEGER OPCODE,BYTE1,WORD)
%EXTERNALROUTINESPEC PERM
%EXTERNALROUTINESPEC CAB
%EXTERNALROUTINESPEC CNOP(%INTEGER I, J)
%EXTERNALROUTINESPEC PGLA(%INTEGER BDRY, L, INF ADR)
%EXTERNALROUTINESPEC PLUG(%INTEGER AREA, AT, VALUE, BYTES)
%EXTERNALROUTINESPEC GXREF(%STRING(31) NAME,%INTEGER MODE,XTRA,AT)
%EXTERNALROUTINESPEC CXREF(%STRING(255) NAME,
                  %INTEGER MODE,AT,%INTEGERNAME AT)
%EXTERNALROUTINESPEC PINITCALL(%STRING(31) S)
%EXTERNALROUTINESPEC CSTOP
%EXTERNALROUTINESPEC CIOCP(%INTEGER N)

==== ercc07/emas-2900/wichtests_wt4.txt ====
SIN: COS:
'BEGIN'
    'REAL' SIN;
        SIN := 0.0
'END'

==== ercc07/emas-2900/wichtests_pete3.txt ====
'PROGRAM'PETE;
'BEGIN'
'PROCEDURE'JIM(L,S,ST); 'VALUE'L; 'LABEL'L; 'SWITCH'S;
         'STRING'ST; 'ALGOL';
'PROCEDURE'FRED; 'EXTERNAL';
'PROCEDURE'GILES; 'FORTRAN';
'OWN''REAL'X; 'INTEGER'I,J,K; 'BOOLEAN'B1,B2; 'ARRAY'A[1:10];
'FOR'I:=1 'STEP'1 'UNTIL'10,I+1 'WHILE'B1'AND''TRUE''DO'
     'IF'K 'GT'J 'OR'K 'GE'J 'THEN''GOTO'END 'ELSE''GO''TO'END;
B1:= I 'EQ'J 'IMPL'K 'NE'J 'EQUIV''FALSE';
B2:='NOT'K 'LE'K 'OR'K 'LT'J;
'CODEON';
'CODEOFF';
I:=(J'DIV'K)'POWER'I;
'COMMENT'ALL KEYWORDS USED;
END:'END'TEST PROG
//OPTIONS()

==== ercc07/emas-2900/wichtests_wt5.txt ====
L1:
'IF' 1 = 2 'THEN'

        'GOTO' L1

==== ercc07/emas-2900/wichtests_pete4.txt ====
'COMMENT' CHECK ON NONTERMINATING FOR LOOPS IN OPT MODE;
'BEGIN' 'INTEGER'I
;'FOR' I:= 1 'STEP' 1 'UNTIL' 3 'DO' PRINT(I,3,0);
NEWLINE;
'FOR' I:= 1 'STEP' 2 'UNTIL' 5 'DO' PRINT (I,3,0);
NEWLINE;
PRINT(I,3,0)
'END'

==== ercc07/emas-2900/wichtests_wt6.txt ====
'BEGIN'
    'INTEGER' X, Y, Z;
        X := Y := Z := 1.0;
        'IF' X < Y < Z 'THEN'
'END'

==== ercc07/emas-2900/wichtests_pete5.txt ====
'BEGIN''INTEGER'I;
'INTEGER''PROCEDURE' TCODE(S); 'STRING' S;
      TCODE:=CODE(S);
      PRINT(TCODE({A}),3,3)
'END'

==== ercc07/emas-2900/wichtests_wt7.txt ====
'BEGIN'
    'BOOLEAN'
        ASSIGN;
    'PROCEDURE' P(X);
        'REAL'
            X;
        'BEGIN'
        OUTREAL(99, X);
        'IF' ASSIGN 'THEN'
            X := 3.14;
        'END';
    'REAL'
        X,
        Y;
    ASSIGN := 'FALSE';
    P(1.0);
    X := Y := 2.0;
    P(X + Y);
    ASSIGN := 'TRUE';
    P(X);
    P(1.0);

==== ercc07/emas-2900/wichtests_pete6.txt ====
'COMMENT' CHECK ERROR ON DELN GIVES RIGHT LINE NO;
'BEGIN'
'INTEGER'I;
'INTEGER'J;
'INTEGER'K;
'CODEON';
'BEGIN' 'INTEGER' 'ARRAY' A[I:10]
'END';
'CODEOFF';
'END'

==== ercc07/emas-2900/wichtests_wt8.txt ====
'BEGIN'
    'REAL' X, Y;
        X := Y := 0.0;
    'REAL' Z;
'END'

==== ercc07/emas-2900/wichtests_pete7.txt ====
'BEGIN' 'INTEGER' I;
'INTEGER' 'ARRAY' A,B(/1:10/);
'ARRAY' C,D(/1:10/);
'PROCEDURE' TEST(P,Q,R,S); 'VALUE' P,Q,R,S; 'ARRAY' R,S;
'INTEGER' 'ARRAY' P,Q; 'BEGIN' 'INTEGER' I;
'FOR' I:=1'STEP'1'UNTIL' 10 'DO' 'BEGIN'
   'IF' I#P(/I/)'OR' I#Q(/I/)'OR' I#R(/I/)'OR' I#S(/I/) 'THEN' 'BEGIN'
      PRINT(I,2,0); PRINT(P(/I/),2,0); PRINT(Q(/I/),2,0);
      PRINT(R(/I/),2,1); PRINT(S(/I/),2,1); NEWLINE
      'END';
   P(/I/):=Q(/I/):=0; R(/I/):=S(/I/):=0
'END' FOR;
PRINTSTRING(<ARRAY _ PASSED>)
'END' TEST;
'FOR' I:=1 'STEP' 1 'UNTIL' 10 'DO' 'BEGIN'
   A(/I/):=B(/I/):=I; C(/I/):=D(/I/):=I
'END';
TEST(A,C,D,B);
'FOR' I:=1 'STEP' 1 'UNTIL' 10 'DO' 'BEGIN'
   'IF' A(/I/)#I 'OR' B(/I/)#I 'OR' C(/I/)#I 'OR' D(/I/)#I  'THEN' 'BEGIN'
      PRINTSTRING(<ERROR>); PRINT(I,2,0)

==== ercc07/emas-2900/timp00s.txt ====
%CONSTSTRING(9) LADATE="28 NOV 83";       ! LAST ALTERED
%CONSTINTEGER NO OF SNS=65
%CONSTINTEGER LRLPT=X'62'
%UNLESS HOST=PERQ %OR HOST=ACCENT %THEN %START
      %CONSTINTEGER PTSHIFT=16,FLAGSHIFT=0
%FINISH %ELSE %START
      %CONSTINTEGER PTSHIFT=0,FLAGSHIFT=16
%FINISH
!
%CONSTINTEGER MAXLEVELS=31,CONCOP=13
!
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.TRIMP_TFORM1S"
%CONSTINTEGER SNPT=X'1006';         ! SPECIALNAME PTYPE
%CONSTINTEGER UNASSPAT=X'80808080'
%CONSTINTEGER LABUSEDBIT=X'01000000'
%CONSTINTEGER LABSETBIT=X'02000000'
%CONSTINTEGER MAXDICT=X'100';         ! PARM MAXDICT BIT
!
%INTEGER I, K, DUMMYFORMAT, P1SIZE, STARSIZE, ASL, ARSIZE, OLDLINE,
         NEXTP, SNUM, RLEVEL, NMAX, PLABEL, LEVEL, PROFAAD, LAST INST,

==== ercc07/emas-2900/drslink2.txt ====
LINK
ERCC07.P1Y
ERCC07.DP22Y
ERCC07.DOPT2Y
ERCC07.DGEN2Y
ERCC07.CSERV01Y
ERCS02.DRS_EPUTY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
PGENERATEDRSOBJECT,ICL9CEZDRSIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/emas-2900/wichtests_wt9.txt ====
'BEGIN'
    'COMMENT' A SYNTAX PASS IS REQUIRED TO REMOVE COMMENTS;
    'PROCEDURE' P( ST );'COMMENT' ST IS A STRING;'COMMENT';
        'STRING' ST; ;'COMMENT' DUMMY BODY;
    P( <;'COMMENT'<;>> );
    'BEGIN'
        'PROCEDURE' Q( A ) PARAMETER COMMENT :( B );
            'REAL' A, B; ;'COMMENT' DUMMY AGAIN;
        Q( 1.0, 2.5 ); 'COMMENT' IS THE SAME AS;
        Q( 1.0) WITH PARAMETER COMMENT:( 2.5 );
    'END' COMMENT CAN INCLUDE MOST BASIC SYMBOLS 'FOR'
        'WHILE' 'THEN''IF' 'DO' := 'BEGIN'( WHICH ARE NOT MATCHED;
'END'

==== ercc07/emas-2900/wichtests_pete8.txt ====

'BEGIN'
'INTEGER' 'PROCEDURE' F;
      F:=1;
'INTEGER' I,J;
      I:=F;
      F:=27;
'END'

==== ercc07/emas-2900/wichtests_pete9.txt ====
'BEGIN' 'INTEGER' I,J;
      J:=10;
      'IF' J>1 'THEN' 'BEGIN'
LABEL:;
         I:=J; J:=J+1; 'GOTO' OUT;
      'END';
      I:=I+1;
OUT:
      PRINT(I,3,3);
'END';

==== ercc07/emas-2900/timp01s.txt ====
%MAINEP ICL9CEZPERQIMP
%TRUSTEDPROGRAM
%BEGIN
%CONSTINTEGER RELEASE=4
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTSTRING(9) LADATE="9 Sep 82";       ! LAST ALTERED
%INTEGER I, J, K
%CONSTINTEGER NO OF SNS=63
%CONSTINTEGER LRLPT=X'62'
!
%CONSTBYTEINTEGERARRAY BYTES(0:7)=0(3),1,2,4,8,16;
%CONSTBYTEINTEGERARRAY WORDS(0:7)=0(3),1,1,2,4,8;
%CONSTINTEGER MAXLEVELS=31,CONCOP=13
!
%INCLUDE "ERCC07.PERQ_OPCODES"
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.PERQ_FORMAT3S"
%CONSTINTEGER SNPT=X'1006';         ! SPECIALNAME PTYPE
%CONSTINTEGER UNASSPAT=X'80808080'
%CONSTINTEGER LABUSEDBIT=X'01000000'

==== ercc07/emas-2900/imptests_testcomp.txt ====

PARM
IMP IMPTESTS_CT0,.NULL,.OUT
IMP IMPTESTS_CT1,.NULL,.OUT
IMP IMPTESTS_CT2,.NULL,.OUT
IMP IMPTESTS_CT3,.NULL,.OUT
IMP IMPTESTS_CT4,.NULL,.OUT
IMP IMPTESTS_CT5,.NULL,.OUT
IMP IMPTESTS_RT0,IY,.OUT
RUN IY
IMP IMPTESTS_RT1,IY,.OUT
RUN IY
IMP IMPTESTS_RT2,IY,.OUT
RUN IY

IMP IMPTESTS_RT3,IY,.OUT
RUN IY
IMP IMPTESTS_RT4,IY,.OUT
RUN IY
IMP IMPTESTS_RT5,IY,.OUT
RUN IY

==== ercc07/emas-2900/sup26isrce_oper33s.txt ====
! %CONSTSTRING(15)VSN = "OPER33 3/4/81"; ! ****************************************
%IF (MONLEVEL >> 1) & 1 = YES %START
      %EXTRINSICLONGINTEGER KMON
      %OWNINTEGER OPMON; ! COPY OF KMON BIT
      %CONSTINTEGER KMONNING = YES
%FINISH %ELSE %START
      %CONSTINTEGER KMONNING = NO
%FINISH
!
%IF MONLEVEL & 1 = YES %START
      %CONSTINTEGER VIDEO UPDATING = YES
      %OWNINTEGER OPER FACILITIES
%FINISH %ELSE %START
      %CONSTINTEGER VIDEO UPDATING = NO
%FINISH
!
!
!
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER X,A,S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TXT,%RECORDNAME P)

==== ercc07/emas-2900/sup26csrce_sup26cs.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) CHANGE SSERIES=NO TO SSERIES=YES IN CTOPTIONS FILE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=2048+255+LSTLEN; ! SIZE OF SMAE
                                        ! MADE UP OF 2049 FOR CBT
                                        ! LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT
%CONSTINTEGER LSTACKLEN=3;              ! LOCAL CONT. STACK ELEN

==== ercc07/emas-2900/sup26csrce_com29s.txt ====
!
!
!          VERSION OF 18/01/80
!
!
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)

==== ercc07/emas-2900/sup26fsrce_print05s.txt ====

%EXTRINSICLONGINTEGER KMON
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORDNAME P)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%SYSTEMROUTINESPEC ITOE(%INTEGER A, L)
%IF MULTIOCP=YES %THEN %START
%EXTERNALROUTINESPEC SEMALOOP(%INTEGERNAME SEMA)
      %ROUTINESPEC RESERVE LOG
      %ROUTINESPEC RELEASE LOG
      %ROUTINESPEC AWAIT LOG ROUTE
%FINISH
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
!------------------------------------------------------------------------
%RECORDFORMAT ENTFORM(%INTEGER SER, PTSM, PROPADDR,  %C
         TICKS SINCE, CAA, GRCB AD, LBA, ALA, STATE, RESP0,  %C
         RESP1, SENSE1, SENSE2, SENSE3, SENSE4, REPSNO, BASE,  %C
         ID, DLVN, MNEMONIC, ENTSIZE, PAW, USAW0, URCB AD,  %C
         SENSDAT AD, LOGMASK, TRTAB AD, UA SIZE, UA AD,  %C

==== ercc07/emas-2900/timp02s.txt ====

!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands 
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.

==== ercc07/emas-2900/ibm_link.txt ====
PARM MAP
LINK
IBMY
CSUPY
.END
IBM01Y
MODIFY IBM01Y,,.LP
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIBMIMP
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/emas-2900/perqtrimp_perqlink.txt ====
LINK
P1Y
P2Y
POPTY
PGENY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
RENAME
ICL9CEZPERQIMP,S#PERQIMP
.END
SUPPRESS
.ALL
RETAIN
S#PERQIMP
SUPPRESS DATA
.ALL

==== ercc07/emas-2900/sup26gsrce_documentn.txt ====



This partitioned file contains all the source required to make up a
version 26G Supervisor, plus the version of the IMP compiler and FIX
utility used at Edinburgh to do so.  This compiler is necessary as some
advanced language features are required which are not available in the
service compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Two "OBEY" subfiles are available: MAKECHKD and MAKEOPT.  They each
construct a test Supervisor which is left in file SUP26xT,  where x is
'C' or 'O' respectively.


Making a Supervisor thus consists of the following:

a) INSERT the IMP compiler and FIX utility into the current directory
   (and then log off and log on again if IMP was previously used in

==== ercc07/emas-2900/sup26esrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%END
%ENDOFFILE

==== ercc07/emas-2900/sup26fsrce_enter06s.txt ====

%EXTRINSICINTEGER INPTR
%EXTRINSICINTEGER OUTPTR
%CONSTINTEGER MASK=X'80FC3FFF'
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC HOOT(%INTEGER NUM)
%EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1)
%EXTERNALROUTINESPEC SUP29
%EXTERNALROUTINESPEC GPC(%RECORDNAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORDNAME P)
%SYSTEMROUTINESPEC MOVE(%INTEGER L, FROMAD, TOAD)
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C

==== ercc07/emas-2900/imptests_rt0.txt ====
%BEGIN
%OWNBYTEINTEGER CHAR=NL
%OWNBYTEINTEGERARRAY XCHAR(1:10)=NL(10)
      WRITE(CHAR,5)
      WRITE(XCHAR(5),5)
      NEWLINE
%ENDOFPROGRAM

==== ercc07/emas-2900/sup26fsrce_gpc33s.txt ====
%CONSTSTRING(25) VSN = "GPC33 3RD NOV 80"; ! ************************************************GPC GPC GPC
!
!   EMAS 2900 SUPERVISOR NOTE
!                                           No: 5
!                                         Date: 21/05/80
!                                       Author: A.Gibbons
!
!
! %EXTERNAL ROUTINE GPC(%RECORDNAME P)
!
! 1. CONVENTIONS
! The record spec for the parameter is
!   %RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
! where
!   DEST is considered as two half words DSNO and DACT. DSNO
!        must be GPC's DSNO 
!        DACT is set according to the function required.
!
!   SRCE is considered as two halfwords SSNO and SACT.
!        SSNO is SNO of ORIGINATOR and SACT is DACT for
!        the reply.

==== ercc07/emas-2900/imptests_rt1.txt ====
%BEGIN
%RECORDFORMAT F(%INTEGER I,J,K,%INTEGERARRAY A(1:5))
%RECORD R(F)
%INTEGERARRAYNAME B
%INTEGER I
      %CYCLE I=1,1,5
      R_A(I)=I
      %REPEAT
      R_K=255
      B==R_A
      %CYCLE I=1,1,5
         WRITE(B(I),5)
      %REPEAT
%ENDOFPROGRAM

==== ercc07/emas-2900/imptests_rt2.txt ====
%BEGIN
%INTEGER I
      I=0
      %CYCLE
         WRITE(I,2)
         I=I+1
      %REPEAT %UNTIL  I=4
%ENDOFPROGRAM

==== ercc07/emas-2900/nrsrce_sfast02s.txt ====
%EXTERNALSTRING (15) %FNSPEC STRINT(%INTEGER N)
%EXTERNALSTRING (8) %FNSPEC STRHEX(%INTEGER N)
%EXTERNALSTRING(8) %FNSPEC HTOS(%INTEGER VALUE,PLACES)
%EXTERNALROUTINESPEC PTREC(%RECORDNAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (63) S)
%EXTERNALROUTINESPEC MONITOR(%STRING (63) S)
%EXTERNALROUTINESPEC DUMP TABLE(%INTEGER T, A, L)
%ROUTINESPEC ELAPSED INT(%RECORDNAME P)
%SYSTEMROUTINESPEC ETOI(%INTEGER A, L)
%ROUTINESPEC PDISC(%RECORDNAME P)
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC DCU(%RECORDNAME P)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
! Alterations from above-mentioned record format, for the S-series, are
! as follows:
!     GPCTABSIZE  ->   DCUTABSIZE
!     GPCA        ->   DCUA
!     SMACS       ->   SCUS
!     GPCCONFA    ->   DCUCONFA
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,DCUTABSIZE,DCUA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C

==== ercc07/emas-2900/imptests_rt3.txt ====
%BEGIN
%INTEGER SYM
%STRING(255)S
S="ABCDE"
      %WHILE S#"" %CYCLE
         SYM=CHARNO(S,1)
         S->(TOSTRING(SYM)).S
         PRINTSYMBOL(SYM)
      %REPEAT
      NEWLINE
%ENDOFPROGRAM


==== ercc07/emas-2900/sup27fsrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=YES;             ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=NO;             ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=NO;              ! CARD PUNCH FITTED
%CONSTINTEGER CSU FITTED=NO;            ! SWITCH UNIT
%CONSTINTEGER SNOOZING=YES;             ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER PRODUCTION=NO;            ! YES FOR CONTINUING AFTER
                                        ! SOFTWARE ERRORS(MOST OF WHICH
                                        ! ARE DUE TO HARDWARE!)
%CONSTINTEGER MONLEVEL=7;               ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING

==== ercc07/emas-2900/sup27bsrce_tape72s.txt ====
! THIS IS IMP80 VERSION OF VERSION 72
!

!**************************************************
!*                                                *
!*  TAPE HANDLER FOR 2900                         *
!*                                                *
!**************************************************
!!
!***********************************************************************
!* VERSION 72
!* 05-MAY-81:
!*    HAIRY PON TO RESET 'RETRY PREAMBLE' WHICH ALLOWS/INHIBITS
!*    READ RETRY WHEN NO PREAMBLE DETECTED.
!*    MAINLY INTENDED FOR READING DUMP TAPES WITH SUCH.
!* 04-MAY-81:
!*    FIX IN LOAD AND LOAD MESSAGE FOR FAULTY DSN.
!*    REWINDS AND COMES UP AS LOADED NO LABEL.
!* 01-MAY-81:
!*    FIX IN TERMINATE TO CONTINUE RETRIES IF NO PREAMBLE ON LABEL READ
!*

==== ercc07/emas-2900/sup26isrce_makechkd.txt ====
PARM FREE,STACK,NOCHECK,NOLIST
IMP CTOPT+SUP26ISRCE_SUP26IS,SUPZZ,,.OUT
IMP CTOPT+SUP26ISRCE_COM32S,COMZZ,,.OUT
IMP CTOPT+SUP26ISRCE_PRINT05S,PRINTZZ,,.OUT
IMP CTOPT+SUP26ISRCE_OPER33S,OPERZZ,,.OUT
IMP CTOPT+SUP26ISRCE_ENTER09S,ENTERZZ,,.OUT
IMP CTOPT+SUP26ISRCE_GPC36S,GPCZZ,,.OUT
PARM FREE,OPT,STACK,NOLIST
IMP SUP26ISRCE_NDIAG07S,NDIAGZZ,,.OUT
IMP CTOPT+SUP26ISRCE_COMMS48S,COMMSZZ,,.OUT
IMP CTOPT+SUP26ISRCE_FAST33S,FASTZZ,,.OUT
IMP CTOPT+SUP26ISRCE_TAPE70S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
NDIAGZZ

==== ercc07/emas-2900/imptests_rt4.txt ====
%BEGIN
%ROUTINE FRED(%INTEGER FIRST,STEP,LAST)
%INTEGER I
      %CYCLE I=FIRST,STEP,LAST
      %REPEAT
%END
      FRED(X'9000',16,X'A000')
%ENDOFPROGRAM

==== ercc07/emas-2900/sup26esrce_comms46s.txt ====

!                 VERSION OF 13/06/80
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ercc07/emas-2900/imptests_rt5.txt ====
%BEGIN
%LONGINTEGER L
%SWITCH SW(0:5)
      L=3
      ->SW(L)
SW(0):SW(1):SW(2):SW(4):SW(5):
      PRINTSTRING("WRONG PLACE"); %STOP
SW(3):
      PRINTSTRING("GOT HERE OK
")
%ENDOFPROGRAM

==== ercc07/emas-2900/read1900s.txt ====
%SYSTEMLONGREALFN READ1900
!***********************************************************************
!*       THIS ROUTINE IS THE 1900 IMPLICITLY SPECIFIED ROUTINE         *
!*                                                                     *
!*       THE METHOD USED IS SIMPLE REPEATED MULTIPLICATION USING LONG  *
!*       REAL VARIABLES. SOME ROUNDING ERRORS ARE INTRODUCED WHICH     *
!*       COULD BE AVOIDED BY USING PACKED DECIMAL INSTNS WITH NECESSARY*
!*       SCALING.                                                      *
!***********************************************************************
%INTEGERFNSPEC NEXT
%INTEGERFNSPEC CHECK EXP
%LONGREALFNSPEC GET(%INTEGER LEVEL)
%INTEGER CURSYM
      %RESULT=GET(1)
%LONGREALFN GET(%INTEGER LEVEL)
%INTEGER TYPE, IVALUE, FLAG
                                       ! FLAG= 0FOR'-',1 FOR '+'
%LONGREAL RWORK, SCALE
      FLAG=1;  TYPE=0
START:CURSYM=NEXT;                      ! CARE NOT TO READ TERMINATOR
                                        ! NOW IGNORE LEADING SPACES

==== ercc07/emas-2900/imptests_rt6.txt ====

%BEGIN
%CONST%STRING(15)%ARRAY S(1:3)="ONE ","TWO ","THREE "
%INTEGER I
      PRINTSTRING(S(3))
      %CYCLE I=1,1,3
         PRINTSTRING(S(I))
      %REPEAT
%ENDOFPROGRAM

==== ercc07/emas-2900/imptests_rt7.txt ====

%BEGIN
%RECORDFORMAT F(%INTEGER I,J,K,L)
%OWNRECORDARRAY A(-1:1)(F)
%RECORDARRAY B(-1:1)(F)
%RECORD R(F)
%INTEGER I
      R=0
      %CYCLE I=-1,1,1
         A(I)=R
         B(I)=R
      %REPEAT
      PRINTSTRING("WORKED OK")
%ENDOFPROGRAM

==== ercc07/emas-2900/imptests_rt8.txt ====

%BEGIN 
%CONSTSTRING(3)%ARRAY CHECK(1:3)="ABC","DEF","GHI";
%INTEGER I
%STRING(3)%ARRAYFORMAT SF(1:3)
%STRINGARRAYNAME SAN
%RECORDFORMAT F(%INTEGER I,J,%STRING(3)%ARRAY S(1:3), %C
         %STRINGARRAYNAME SN)
%RECORDNAME R(F)
%OWNINTEGERARRAY A(0:8)=1,2,X'03414243',X'03444546',X'03474849',0(4)
%ROUTINE CHECK VALUE(%INTEGER I,%STRING(31)S)
      %IF S#CHECK(I) %THEN PRINTSTRING("
BUG IN STRING VALUE") %AND %MONITOR
%END
%ROUTINE CHECKNAME(%INTEGER I,%STRINGNAME S)
      %IF S#CHECK(I) %THEN PRINTSTRING("
BUG IN STRING NAMES") %AND %MONITOR
%END
      R==RECORD(ADDR(A(0)))
      SAN==ARRAY(ADDR(A(2)),SF)
      R_SN==R_S

==== ercc07/emas-2900/imptests_rt9.txt ====
%BEGIN
%INTEGER I,J
%CONSTSTRING(15)FAILED="***BUG FOUND"
%ROUTINESPEC INTERCHANGE(%RECORDARRAYNAME A,%INTEGER I,J)
%RECORDFORMAT F(%INTEGER I,J)
%RECORDARRAY A(0:3)(F)
%RECORDARRAY B(1:4)(F)
      %CYCLE I=0,1,3
         A(I)_I=I
         B(I+1)_I=I+1
      %REPEAT
      INTERCHANGE(A,1,3)
      PRINTSTRING(FAILED) %UNLESS A(1)_I=3 %AND A(3)_I=1
      INTERCHANGE(B,1,3)
      PRINTSTRING(FAILED) %UNLESS B(1)_I=3 %AND B(3)_I=1
%ROUTINE INTERCHANGE(%RECORDARRAYNAME R,%INTEGER P,Q)
%RECORDSPEC R(F)
      %RECORD TEMP(F)
      TEMP=R(P)
      R(P)=R(Q)
      R(Q)=TEMP

==== ercc07/emas-2900/pimp01s.txt ====
%MAINEP ICL9CEZPERQIMP
%TRUSTEDPROGRAM
%BEGIN
%CONSTINTEGER RELEASE=1
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTSTRING(9) LADATE="01 Apr 82";       ! LAST ALTERED
%INTEGER I, J, K
%CONSTINTEGER NO OF SNS=63
%CONSTINTEGER LRLPT=X'52'
!
! FIXED GLA CURRENTLY USED AS FOLLOWS
!     0-7   FREE(WAS 2900 ENTRY DESCRIPTOR)
!     8-11  ADDRESS OF UNSHARED SYMBOL TABLES
!     12-15 ADDRESS OF SHARED SYMBOL TABLES
!     16-19 LANGUAGE & COMPILER DATA
!     20-23 RESERVED (BUT IN MAIN PROGS IS FILLED WITH STACKPTR@ENTRY)
!     24-27 ADDRESS OF CONSTANT TABL
!     28-31 ADDRESS OF A WORD CONTAINING STACKTOP  0FOR NO CHECKS
!     32-39 FREE
!     40-55 DEFINES THE ENTRY POINT OF MDIAGS

==== ercc07/emas-2900/wichtests_pre75.txt ====
    'BEGIN'
    'INTEGER'I;
      'FOR' I:= 2 'STEP' 1 'UNTIL' 100 'DO'
      OUTREAL(15,1/(I*I-1));
    'END';

==== ercc07/emas-2900/alqtests.txt ====

//JOB (ERCC07.ALTESTS,P.STEPHENS_ALGOL,T=240,L=5000)
//ALGOL
'BEGIN'
    'REAL'
        X,
        Y,
        Z;
    X := 6.0;
    5.0;
    Y := - 2.931;
    Z := 4^.2;
'END'
//RUN
//ALGOL
'BEGIN'
    'INTEGER'
        I.J;
    I := 2;
    J := 3;
    'IF' I * J > I + J 'THEN'

==== ercc07/emas-2900/kentclokset_make.txt ====
MAPLELIST CLOK1L
MAPLE CLOK_CLOK1S,OMF=Z.CLOKOMF
COMF CLOKOMF,CLOK1Y
DESTROY CLOKOMF

==== ercc07/emas-2900/itrimp_ibmlink.txt ====
ILINK
IP1X
IP2X
IOPTX
IGEN2X
CSERV01X
PUTX
.END
P0Y
IMODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIBMIMP,PGENERATEOBJECT
SUPPRESS DATA
.ALL
CLOSE

==== ercc07/emas-2900/sup28asrce_enter14s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%RECORDFORMAT SERVAF(%INTEGER P, C)
%EXTERNALINTEGERSPEC INPTR
%EXTERNALINTEGERSPEC OUTPTR
%CONSTINTEGER MASK=X'80FC3FFF'
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC HOOT(%INTEGER NUM)
%IF SSERIES=YES %START
   %EXTERNALROUTINESPEC DCU(%RECORD(PARMF)%NAME P)
%FINISH %ELSE %START
   %EXTERNALROUTINESPEC GPC(%RECORD(PARMF)%NAME P)
   %EXTERNALINTEGERFNSPEC GPC INIT(%INTEGER CA,PT,MODE)
%FINISH
%EXTERNALINTEGERFNSPEC SAFE IS READ(%INTEGER ISAD,%INTEGERNAME VAL)
%EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1)
%EXTERNALROUTINESPEC SUP29
%EXTERNALROUTINESPEC SUPPOFF(%RECORD(SERVAF)%NAME SERV, %C
      %RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC DISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PDISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)

==== ercc07/emas-2900/nproc19s.txt ====
!**FILE LAST CHANGED ON 05/12/77 AT 16.49.27
!**DELSTART
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER I)
%EXTRINSICINTEGER SSDEBUG
%SYSTEMROUTINESPEC CONSOLE(%INTEGER EP,R1,R2,%INTEGERNAME R3)
%EXTERNALROUTINESPEC PROMPT(%STRING(15)S)
%SYSTEMROUTINESPEC MDIAG(%INTEGER PCOUNT,FAULT,INF)
%SYSTEMROUTINESPEC CONNECT(%STRING (15) S,  %C
   %INTEGER ACCESS, MAXBYTES, PROTECTION, %RECORDNAME R,  %C
   %INTEGERNAME FLAG)
%SYSTEMROUTINESPEC PSYSMES(%INTEGER ROOT, FLAG)
%SYSTEMROUTINESPEC SET OUTPUT(%STRING (15) FILE,  %C
   %INTEGERNAME ADDR, FLAG)
%SYSTEMROUTINESPEC FINDFD(%STRING (8) DD, %INTEGERNAME I)
%SYSTEMROUTINESPEC DIRCALL(%INTEGER EP, %STRING (17) S,  %C
   %INTEGER P1, P2, %INTEGERNAME FLAG)
%SYSTEMROUTINESPEC SETLIB(%INTEGER EP, %STRING (15) S,  %C
   %INTEGER AD, %INTEGERNAME FLAG)
%SYSTEMINTEGERFNSPEC SPAR(%INTEGER N, %STRINGNAME S)
%SYSTEMROUTINESPEC SETPAR(%STRING (63) S)
%SYSTEMROUTINESPEC SVC(%RECORDNAME P)

==== ercc07/emas-2900/sup28dsrce_ndiag07s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ercc07/emas-2900/sup27bsrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP27BSRCE_SUP27BS,SUPZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_COM33S,COMZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_PRINT06S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_OPER34S,OPERZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_ENTER10S,ENTERZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_GPC37S,GPCZZ,,.OUT
IMP80 SUP27BSRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_COMMS49S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_FAST35S,FASTZZ,,.OUT
IMP80 CTOPT+SUP27BSRCE_TAPE72S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/sup27isrce_releasen.txt ====

         Supervisor 27I Release Notice

      This Supervisor has the following changes

      1) Introduction of in process page monitoring
         via OUT_20 and suitable director features

      2)  Direct calls on COMMS CONTROL for Request output

      3) Minor corrections elsewhere.


                                        P. Stephens    21/12/81

==== ercc07/emas-2900/inctime.txt ====
%CONSTINTEGER SECSIN24HRS=86400;        ! SECS IN DAY
%CONSTINTEGER DAYS70=25567;             ! DAYS FROM JAN1 1900 TO JAN1 1970
%CONSTLONGINTEGER SECS70=X'0000000083AA7E80';! SECS DITTOM
%ROUTINE KDATE(%INTEGERNAME D,M,Y,%INTEGER K)
!***********************************************************************
!*    K IS DAYS SINCE 1ST JAN 1900                                     *
!*    RETURNS D, M, Y   2 DIGIT Y ONLY                                 *
!***********************************************************************
!      %INTEGER W
!      K=K+693902;                       ! DAYS SINCE CEASARS BDAY
!      W=4*K-1
!      Y=W//146097
!      K=W-146097*Y
!      D=K//4
!      K=(4*D+3)//1461;
!      D=4*D+3-1461*K
!      D=(D+4)//4
!      M=(5*D-3)//153
!      D=5*D-3-153*M
!      D=(D+5)//5
!      Y=K

==== ercc07/emas-2900/impalgs_oldps.txt ====

%EXTERNALROUTINE OLDPS(%STRING(63) S)
%EXTERNALSTRINGFNSPEC DATE
%INTEGER I, J, K, SS, NBIP
%STRING(31) ST49,ST50,ST51
%EXTERNALROUTINESPEC DEFINE(%STRING(63)S)
%INTEGERARRAY CLETT(0:1000), SYMBOL(1300:3000), CC(0:300)
%INTEGER CNEXT, DNEXT, CNUM, DNUM, ALT, DEF, ASL, NIDFLAG
%INTEGERARRAY KK, PUSE, DWORD(1001:1200), DLETT(0:1000), CWORD(1:200)
%ROUTINESPEC READ STRING(%INTEGER TERMINATOR)
%ROUTINESPEC RECORD(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGERNAME NUM, NEXT)
%ROUTINESPEC LOOK UP(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGER FIRST, LAST, INSERT)
%ROUTINESPEC PDDICT
%ROUTINESPEC PRINT STR(%INTEGERARRAYNAME CC, %INTEGER PTR)
%ROUTINESPEC PCDICT
         %UNLESS S->ST49.(",").ST50.(",").ST51 %THEN %C
            PRINTSTRING("PARAMS?????") %AND NEWLINE %AND %RETURN
         DEFINE("ST49,".ST49)
         DEFINE("ST50,".ST50)

==== ercc07/emas-2900/impalgs_psprog2s.txt ====

%EXTERNALROUTINE PSPROG2(%STRING(63) S)
%EXTERNALSTRINGFNSPEC DATE
%INTEGER I, J, K, SS, NBIP
%STRING(15) ST49,ST50,ST51
%EXTERNALROUTINESPEC DEFINE(%STRING(63)S)
%INTEGERARRAY SYMBOL(1300:3000), CC(0:300)
%INTEGER CNEXT, DNEXT, CNUM, DNUM, ALT, DEF, ASL, NIDFLAG
%INTEGERARRAY KK, DWORD(1001:1200), DLETT(0:1000)
%ROUTINESPEC READ STRING(%INTEGER TERMINATOR)
%ROUTINESPEC RECORD(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGERNAME NUM, NEXT)
%ROUTINESPEC LOOK UP(%INTEGERARRAYNAME WORD, LETT,  %C
            %INTEGER FIRST, LAST, INSERT)
%ROUTINESPEC PDDICT
%ROUTINESPEC PRINT STR(%INTEGERARRAYNAME CC, %INTEGER PTR)
         %UNLESS S->ST49.(",").ST50.(",").ST51 %THEN %C
            PRINTSTRING("PARAMS?????") %AND NEWLINE %AND %RETURN
         DEFINE('ST49,'.ST49)
         DEFINE('ST50,'.ST50)
         DEFINE('ST51,'.ST51)

==== ercc07/emas-2900/pimp02s.txt ====
%MAINEP ICL9CEZPERQIMP
%TRUSTEDPROGRAM
%BEGIN
%CONSTINTEGER RELEASE=1
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTSTRING(9) LADATE="8 Mar 82";       ! LAST ALTERED
%INTEGER I, J, K
%CONSTINTEGER NO OF SNS=63
%CONSTINTEGER LRLPT=X'52'
!
! FIXED GLA CURRENTLY USED AS FOLLOWS
!     0-7   FREE(WAS 2900 ENTRY DESCRIPTOR)
!     8-11  ADDRESS OF UNSHARED SYMBOL TABLES
!     12-15 ADDRESS OF SHARED SYMBOL TABLES
!     16-19 LANGUAGE & COMPILER DATA
!     20-23 RESERVED (BUT IN MAIN PROGS IS FILLED WITH STACKPTR@ENTRY)
!     24-27 ADDRESS OF CONSTANT TABL
!     28-31 ADDRESS OF A WORD CONTAINING STACKTOP  0FOR NO CHECKS
!     32-39 FREE
!     40-55 DEFINES THE ENTRY POINT OF MDIAGS

==== ercc07/emas-2900/irout30s.txt ====
!17/11/80 - IROUT29S - CAPACITY EXCEEDED CHECKING ADDED TO READSTRING
!COPIED FROM ERCS08.B44SCE_IROUT27A ON 26.10.78
!LRANDOM ADDED 24.1.80
!UNUSED SPECS AND UNUSED ROUTINE FILL REMOVED 10/8/79
!SOME MATHS ROUTINE FAULT NOS ALTERED 19/12/78
!IEXPTEN RENAMED AS EXPTEN
!ILOGTEN RENAMED AS LOGTEN
!ICOT RENAMED AS COT
!IHYPSIN RENAMED AS HYPSIN
!IHYPCOS RENAMED AS HYPCOS
!IHYPTAN RENAMED AS HYPTAN
!THE FOLLOWING ROUTINES HAVE BEEN REMOVED:
!DA AND SQ ROUTINES,FROMSTRING,CLOSESTREAM,IFDBINARY
!RFDBINARY,CPUTIME,TIME,DATE,SETMARGINS
!SPECS ADDED FOR CPUTIME, TIME , AND DATE
!* MODIFIED 10/08/78 AGK   (ADDED MLIBERR ROUTINE)
!* MODIFIED 20/02/78 ERROR MESSAGE VALUES
!* MODIFIED 29/09/78 LCG TO REMOVE MLIBERR
!* MODIFIED 17/2/77  LAB   (APPENDED SQ & DA FILE ROUTINES AND
!                           DATE AND TIME ROUTINES FOR IMP AND FORTE)
!* MODIFIED  16/12/76  GEM (RANDOM)

==== ercc07/emas-2900/sup27csrce_makechkd.txt ====
PARM FREE,NOCHECK,NOLIST,STACK
IMP80 CTOPT+SUP27CSRCE_SUP27CS,SUPZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_COM33S,COMZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_PRINT07S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_OPER34S,OPERZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_ENTER11S,ENTERZZ,,.OUT
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP27CSRCE_GPC37S,GPCZZ,,.OUT
IMP80 SUP27CSRCE_NDIAG07S,NDIAGZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_COMMS49S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_FAST36S,FASTZZ,,.OUT
IMP80 CTOPT+SUP27CSRCE_TAPE72S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
NDIAGZZ

==== ercc07/emas-2900/sup27bsrce_fast35s.txt ====
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20J ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DLVNADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,RATION,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)
!-----------------------------------------------------------------------
! PON & POFF ETC. DECLARATIONS
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
%CONSTLONGINTEGER NONSLAVED=X'2000000000000000'

==== ercc07/emas-2900/sup26gsrce_com31s.txt ====
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20J ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,RATION,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)
! MISC. ROUTINE SPECS
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORDNAME P)
%EXTERNALSTRING(8)%FNSPEC STRHEX(%INTEGER N)
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%EXTERNALROUTINESPEC OPMESS2(%INTEGER OP,%STRING(63)TXT)

==== ercc07/emas-2900/ibm_ps01.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(CHXTYPE)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/emas-2900/ibm_ps02.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(CHXTYPE)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/emas-2900/dxrtest.txt ====
%BEGIN
%LONGLONGREAL A,B,R1,R2
%INTEGERFNSPEC DXR(%LONGLONGREALNAME TOP,%LONGLONGREAL BTM)
%INTEGER I
      A=7; A=A/3
      B=15
      B=B/7
      R1=A/B
R2=A
      I=DXR(R2,B)
      WRITE(I,1)
      PRINTFL(R1,15)
      PRINTFL(R2,15)
      PRINTFL(R1-R2,5)
%INTEGERFN DXR(%LONGLONGREALNAME TOP,%LONGLONGREAL BOTTOM)
%LONGREAL X
%LONGLONGREAL APPROX,CORRN
      X=BOTTOM
      APPROX=1.0/X
      CORRN=2.0-APPROX*BOTTOM
      PRINTFL(CORRN-1,5)

==== ercc07/emas-2900/perqtrimp_perqps01.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(DUMMYSTART)
D(N)
D(S)
D(TEXT)
D(BIGHOLE)
D(N255)
D(HOLE)
D(MARK)
D(READLINE?)
D(TEXTTEXT)
D(DUMMYAPP)
D(DOWN)
D(UP)
D(LISTON)
D(LISTOFF)
D(COLON)
D(NOTECONST)

==== ercc07/emas-2900/irout31s.txt ====
! 03/06/82 IROUT31S HAS ERFN & ERFC REIMPLEMENTED USING ICL METHOD
!02/06/82 CONVERTED TO IMP90 BY PDS
!17/11/80 - IROUT29S - CAPACITY EXCEEDED CHECKING ADDED TO READSTRING
!COPIED FROM ERCS08.B44SCE_IROUT27A ON 26.10.78
!LRANDOM ADDED 24.1.80
!UNUSED SPECS AND UNUSED ROUTINE FILL REMOVED 10/8/79
!SOME MATHS ROUTINE FAULT NOS ALTERED 19/12/78
!IEXPTEN RENAMED AS EXPTEN
!ILOGTEN RENAMED AS LOGTEN
!ICOT RENAMED AS COT
!IHYPSIN RENAMED AS HYPSIN
!IHYPCOS RENAMED AS HYPCOS
!IHYPTAN RENAMED AS HYPTAN
!THE FOLLOWING ROUTINES HAVE BEEN REMOVED:
!DA AND SQ ROUTINES,FROMSTRING,CLOSESTREAM,IFDBINARY
!RFDBINARY,CPUTIME,TIME,DATE,SETMARGINS
!SPECS ADDED FOR CPUTIME, TIME , AND DATE
!* MODIFIED 10/08/78 AGK   (ADDED MLIBERR ROUTINE)
!* MODIFIED 20/02/78 ERROR MESSAGE VALUES
!* MODIFIED 29/09/78 LCG TO REMOVE MLIBERR
!* MODIFIED 17/2/77  LAB   (APPENDED SQ & DA FILE ROUTINES AND

==== ercc07/emas-2900/sup25jsrce_ndiag06s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ercc07/emas-2900/sup26fsrce_oper33s.txt ====
! %CONSTSTRING(15)VSN = "OPER33 08/09/80"; ! ****************************************
%IF (MONLEVEL >> 1) & 1 = YES %START
      %EXTRINSICLONGINTEGER KMON
      %OWNINTEGER OPMON; ! COPY OF KMON BIT
      %CONSTINTEGER KMONNING = YES
%FINISH %ELSE %START
      %CONSTINTEGER KMONNING = NO
%FINISH
!
%IF MONLEVEL & 1 = YES %START
      %CONSTINTEGER VIDEO UPDATING = YES
      %OWNINTEGER OPER FACILITIES
%FINISH %ELSE %START
      %CONSTINTEGER VIDEO UPDATING = NO
%FINISH
!
!
!
!%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER X,A,S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TXT,%RECORDNAME P)

==== ercc07/emas-2900/sup28dsrce_makeopt.txt ====
PARM OPT,STACK,NOLIST
IMP80 CTOPT+SUP28DSRCE_SUP28DS,SUPZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_COM36S,COMZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_PRINT09S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_OPER37S,OPERZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_ENTER15S,ENTERZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_GPC40S,GDCZZ,,.OUT
IMP80 SUP28DSRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_COMMS54S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_FAST42S,FASTZZ,,.OUT
IMP80 CTOPT+SUP28DSRCE_TAPE75S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GDCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/sup27bsrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=YES;             ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=NO;             ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=NO;              ! CARD PUNCH FITTED
%CONSTINTEGER SNOOZING=YES;             ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER MONLEVEL=31;              ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING
                                        ! 2**2 SET=SUP TIMING MEASUREMENTS
                                        ! 2**3 SET=CAT TABLE TRANSITIONS
                                        ! 2**4 SET= STROBING
                                        ! 2**8 SET=EVENT HARVESTING

==== ercc07/emas-2900/sup26esrce_documentn.txt ====



This partitioned file contains all the source required to make up a
version 26E Supervisor, plus the version of the IMP compiler and FIX
utility used at Edinburgh to do so.  This compiler is necessary as some
advanced language features are required which are not available in the
service compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Two "OBEY" subfiles are available: MAKECHKD and MAKEOPT.  They each
construct a test Supervisor which is left in file SUP26xT,  where x is
'C' or 'O' respectively.


Making a Supervisor thus consists of the following:

a) INSERT the IMP compiler and FIX utility into the current directory
   (and then log off and log on again if IMP was previously used in

==== ercc07/emas-2900/impalgs_algolps6.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(UPSTCNT)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/impalgs_algolps7.txt ====
45
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(UPSTCNT)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/sup27isrce_documentn.txt ====



This partitioned file contains all the source required to make up
an EMAS2900 Supervisor, plus the version of the IMP80 compiler and FIX
utility used at Edinburgh to do so.  This compiler is necessary as some
advanced language features are required which are not available in the
service compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Two "OBEY" subfiles are available: MAKECHKD and MAKEOPT.  They each
construct a test Supervisor which is left in file SUP27xT,  where x is
'C' or 'O' respectively.


Making a Supervisor thus consists of the following:

a) INSERT the IMP80 compiler and FIX utility into the current directory
   (and then log off and log on again if IMP80 was previously used in

==== ercc07/emas-2900/impalgs_algolps8.txt ====
45
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(NOTELINE)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/soap80s.txt ====
!***********************************************************************
!*                                                                     *
!*             SOAP80 - IMP indenter.                                  *
!*              Created by E.N.Gregory.                                *
!*                All syntax directed sections rewritten by P.D.S      *
!*               Using IMP80 syntax version 02.                        *
!*                                                                     *
!***********************************************************************

%EXTERNALROUTINESPEC PROMPT(%STRING(31) S)

!***********************************************************************
!*                                                                     *
!*                           Record formats.                           *
!*                                                                     *
!***********************************************************************

%RECORDFORMAT FHDR(%INTEGER DATAEND,DATASTART,FILESIZE,FILETYPE)
%RECORDFORMAT CHDR(%INTEGER CONAD,FILETYPE,DATASTART,DATAEND)
%CONSTINTEGER MAXOPT = 13,NUMOPT = 3
%RECORDFORMAT PFORMAT((%BYTEINTEGER LINE,ICONTIN,POSCOM,MOVECOM,UCKEY,SEPKEY,

==== ercc07/emas-2900/impalgs_algolps9.txt ====
45
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(NOTELINE)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/pimp04s.txt ====
%TRUSTEDPROGRAM
%EXTERNALROUTINE ICL9CEZPERQIMP
%CONSTINTEGER RELEASE=4
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTINTEGER BYTEADDRSHFT=1*ON PERQ
%CONSTSTRING(9) LADATE="15 Nov 82";       ! LAST ALTERED
%INTEGER I, J, K
%CONSTINTEGER NO OF SNS=63
%CONSTINTEGER LRLPT=X'62'
!
%CONSTBYTEINTEGERARRAY BYTES(0:7)=0(3),1,2,4,8,16;
%CONSTBYTEINTEGERARRAY WORDS(0:7)=0(3),1,1,2,4,8;
%CONSTINTEGER MAXLEVELS=31,CONCOP=13
!
%INCLUDE "ERCC07.PERQ_OPCODES"
%INCLUDE "ERCC07.PERQ_FORMAT3S"
%CONSTINTEGER SNPT=X'1006';         ! SPECIALNAME PTYPE
%CONSTINTEGER UNASSPAT=X'80808080'
%OWNSTRING(8)MDEP="S#NDIAG"
!

==== ercc07/emas-2900/irout32s.txt ====
! 03/06/82 IROUT31S HAS ERFN & ERFC REIMPLEMENTED USING ICL METHOD
!02/06/82 CONVERTED TO IMP90 BY PDS
!17/11/80 - IROUT29S - CAPACITY EXCEEDED CHECKING ADDED TO READSTRING
!COPIED FROM ERCS08.B44SCE_IROUT27A ON 26.10.78
!LRANDOM ADDED 24.1.80
!UNUSED SPECS AND UNUSED ROUTINE FILL REMOVED 10/8/79
!SOME MATHS ROUTINE FAULT NOS ALTERED 19/12/78
!IEXPTEN RENAMED AS EXPTEN
!ILOGTEN RENAMED AS LOGTEN
!ICOT RENAMED AS COT
!IHYPSIN RENAMED AS HYPSIN
!IHYPCOS RENAMED AS HYPCOS
!IHYPTAN RENAMED AS HYPTAN
!THE FOLLOWING ROUTINES HAVE BEEN REMOVED:
!DA AND SQ ROUTINES,FROMSTRING,CLOSESTREAM,IFDBINARY
!RFDBINARY,CPUTIME,TIME,DATE,SETMARGINS
!SPECS ADDED FOR CPUTIME, TIME , AND DATE
!* MODIFIED 10/08/78 AGK   (ADDED MLIBERR ROUTINE)
!* MODIFIED 20/02/78 ERROR MESSAGE VALUES
!* MODIFIED 29/09/78 LCG TO REMOVE MLIBERR
!* MODIFIED 17/2/77  LAB   (APPENDED SQ & DA FILE ROUTINES AND

==== ercc07/emas-2900/sup28dsrce_tape75s.txt ====
!***********************************************************************
!
!                          2900 TAPE HANDLER
!
!***********************************************************************
!
%IF SSERIES=NO %START
  !..........PSERIES..........PSERIES..........PSERIES..........PSERIES
  !
  %CONSTINTEGER TOP LBE=36
  !                                                                    { CH FN
  %CONSTINTEGERARRAY LBES(0:TOP LBE)= %C
  X'00000200',                                                         {  1 RF
  X'40001200',                                                         {  2 RR
  X'00000200',                                                         {  3 RF
  X'44C01200',X'86800D10',X'00006200',                                 {  4 RR,AS,RFEC
  X'40001200',                                                         {  5 RR
  X'04C00200',X'86800D10',X'40007200',                                 {  6 RF,AS,RREC
  X'04C00200',X'04805200',X'86800D10',X'00006200',                     {  7 RF,SR,AS,RFEC
  X'44C01200',X'04804200',X'86800D10',X'40007200',                     {  8 RR,SF,AS,RREC
  X'00000200',                                                         {  9 RF

==== ercc07/emas-2900/link29h.txt ====
PARM MAP
LINK
ercc07.sup29my
ercc08.COMZZ
ercc08.PRINTZZ
ercc08.OPERZZ
ercc08.ENTERZZ
ercc08.GDCZZ
ercc08.NDIAGZZ
ercc08.COMMSZZ
ercc08.FASTZZ
ercc08.TAPEZZ
.END
SUP29Z
SUPFIX SUP29Z,SUP29CT
PERMIT SUP29CT

==== ercc07/emas-2900/ibmconvert_sibmload.txt ====
%RECORDFORMAT NAMEF(%C
 %STRING(8)    NAME,
 %INTEGER      ID,
               ADDR,                    {-1=NOT KNOWN,OTHERWISE ABSOLUTE ADRS}
                                        {OF NAME}
               CHAIN,                   {0 NO OUTSTANDING RELOCATIONS OTHERWISE}
                                        {PTR TO HEAD OF CHAIN OF RELOCATIONS}
               LNTH,                    {OF AREA FOR SD, HOME SD NO FOR AN LD}
               OFFSET,                  { OFFSET OF LD WITHIN HOME SD}
 %BYTE         TYPE,                    {STANDARD TYPES SD,LD ETC}
               COMMON)
!
!
!
%RECORDFORMAT RR(%INTEGER CONAD,FTYPE,DSTART,DEND)
%SYSTEMINTEGERFNSPEC PSTOI(%STRING(63)S)
%EXTERNALSTRING(8)%FNSPEC IBM NAME(%STRING(1) PREFIX,%STRINGNAME NAME)
%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
%EXTERNALROUTINESPEC DEFINE(%STRING(255)PARM)
%SYSTEMROUTINESPEC OUTFILE(%STRING(31)FILE,%INTEGER SIZE,HOLE,PROT,
         %INTEGERNAME CONAD,FLAG)

==== ercc07/emas-2900/link29i.txt ====
PARM MAP
LINK
ercc07.sup29my
ercc08.COMZZ
ercc08.PRINTZZ
ercc08.OPERZZ
ercc08.ENTERZZ
ercc08.GDCZZ
ercc08.NDIAGZZ
ercc08.COMMSZZ
ercc08.FASTZZ
ercc08.TAPEZZ
.END
SUP29Z
SUPFIX SUP29Z,SUP29CT
PERMIT SUP29CT

==== ercc07/emas-2900/opt01s.txt ====
%INCLUDE "ERCC07.TRIMP_TFORM1S"
%INCLUDE "ERCC07.TRIPCNSTS"
%EXTRINSICRECORD (WORKAF) WORKA
%EXTRINSICRECORD (PARMF) PARM
%EXTERNALROUTINESPEC IMPABORT
%IF HOST#TARGET %START
      %EXTERNALROUTINESPEC REFORMATC(%RECORD(RD)%NAME OPND)
%FINISH
%EXTERNALROUTINESPEC MOVE BYTES(%INTEGER L,FB,FO,TB,TO)
%EXTERNALROUTINESPEC FAULT(%INTEGER N,DATA,IDENT)
%EXTERNALROUTINESPEC PRINT TRIPS(%RECORD (TRIPF) %ARRAYNAME TRIPLES)
%CONSTBYTEINTEGERARRAY WORDS(0:7)=0(3),1,1,1,2,4;
%EXTERNALROUTINE CTOP(%INTEGERNAME FLAG,MASK, %INTEGER XTRA,
    %RECORD (RD) %NAME OPND1,OPND2)
!***********************************************************************
!*    AN OPERATION HAS BEEN FOUND WHERE BOTH OPERANDS ARE              *
!*    CONSTANTS OR KNOWN AT COMPILE TIME. THIS ROUTINE INTERPRETS      *
!*    THE OPERATION                                                    *
!*    ON EXIT FLAG=0 IF INTERPRETED. REFRAINS FROM INTERPRETING        *
!*    X=1/0 FOR EXAMPLE. CODE IS PLANTED FOR THESE FUNNIES             *
!***********************************************************************

==== ercc07/emas-2900/sup27isrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%IF FAULT>0 %THEN %STOP
%END

==== ercc07/emas-2900/itrimp_hostcodes.txt ====

%CONSTINTEGER YES=1,NO=0
            
!
! THESE CODE ARE ARBITARY BUT THE TOP DECIMAL DIGIT GIVES THE NO OF BYTES
! IN THE UNIT OF ADDRESSABILITY. BYTE ADDRESSES HOSTS BEING 1N AND
! 16 BIT WORD ADDRESSED HOSTS BEING 2N ETC
%CONSTINTEGER EMAS=10
%CONSTINTEGER IBM=11
%CONSTINTEGER IBMXA=12
%CONSTINTEGER DRS=13
%CONSTINTEGER AMDAHL=14
%CONSTINTEGER PERQ=20
%CONSTINTEGER PNX=21
%CONSTINTEGER ACCENT=22
                                        ! ACCENT DIFFERS FROM PERQ ONLY IN
                                        ! ASSEMBLES SEQUENCES&SYNTAX
                                        ! AND GENERATOR
%CONSTINTEGER LINTAVAIL=1<<IBM!1<<IBMXA!1<<EMAS
%CONSTINTEGER LLREALAVAIL=1<<IBM!1<<IBMXA!1<<EMAS

==== ercc07/emas-2900/tlink1.txt ====
LINK
TIMP01Y
TSUP01Y
P1Y
TOPT01Y
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
RENAME
ICL9CEZPERQIMP,S#PERQIMP
.END
SUPPRESS
.ALL
RETAIN
S#PERQIMP
SUPPRESS DATA
.ALL

==== ercc07/emas-2900/sup25jsrce_print01s.txt ====

?%EXTRINSICLONGINTEGER KMON
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC WAIT(%INTEGER MSECS)
%EXTERNALROUTINESPEC SUP29
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORDNAME P)
%EXTERNALROUTINESPEC GPC(%RECORDNAME P)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,KLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SPDRQ,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C

==== ercc07/emas-2900/vzkgrt0s.txt ====
!
! SPECIAL SERVICE ROUTINES FOR ALGOL(J)    PDS 14.07.77
!
%SYSTEMINTEGERFN JREADOINT(%LONGREAL C0)
!***********************************************************************
!*    CHOP C0 DOWN TO 32 BITS (SHORT REAL)  AND RETURN AS INTEGER      *
!***********************************************************************
      *LSS_C0; *EXIT_-64
%END
%SYSTEMLONGREALFN JINTDOREA(%INTEGER C0)
!***********************************************************************
!*    C0 IS REALLY A SHORT REAL: EXPAND TO 64 BITS AND RETURN          *
!***********************************************************************
      *LSS_0; *LUH_C0; *EXIT_-64
%END
%SYSTEMINTEGERFN JSPOJILIP(%INTEGER IL,IP)
!***********************************************************************
!*    PACK IL & IP INTO LEFT & RIGHT 16 BITS OF A 32 BIT INTEGER       *
!***********************************************************************
      *LSS_IP; *AND_X'FFFF'
      *SLSS_IL; *USH_16

==== ercc07/emas-2900/perqcode1s.txt ====

!
! OPCODES AND CONSTINTEGER FOR PERQ IMP
! P REFS ARE TO PERQ Q-CODE MANAUAL
!
%CONSTINTEGER LDC0=0;                   ! P21 LOAD WORD CONSTANTS 0-15
%CONSTINTEGER LDCN=22;                  ! P21 LOAD CONSTANT NIL
%CONSTINTEGER LDCMO=16;                 ! P21 LOAD CONSTANT -1
%CONSTINTEGER LDCB=17;                  ! P21 LOAD CONSTANT (SIGNED)BYTE
%CONSTINTEGER LDCW=18;                  ! P21 LOAD CONSTANT (SIGNED)WORD
%CONSTINTEGER LDLDB=80;                 ! ADDITION LOAD LOCAL DOUBLE -BYTE OFFSET
%CONSTINTEGER LDLDW=81;                 ! ADDITION LOAD LOCAL DOUBLE -WORD OFFSET
%CONSTINTEGER LDODB=82;                 ! ADDITION LOAD LOCAL DOUBLE -BYTE OFFSET
%CONSTINTEGER LDODW=83;                 ! ADDITION LOAD LOCAL DOUBLE -WORD OFFSET
%CONSTINTEGER STLDB=84;                 ! ADDITION STORE LOCAL DOUBLE -BYTE OFFSET
%CONSTINTEGER STLDW=85;                 ! ADDITION STORE LOCAL DOUBLE -WORD OFFSET
%CONSTINTEGER STODB=86;                 ! ADDITION STORE LOCAL DOUBLE -BYTE OFFSET
%CONSTINTEGER STODW=87;                 ! ADDITION STORE LOCAL DOUBLE -WORD OFFSET
%CONSTINTEGER LDL0=109;                 ! P22 LOAD LOCAL WORD(0-15)
%CONSTINTEGER LDLB=107;                 ! P22 LOAD LOCAL UNSIGNED BYTE OFFSET
%CONSTINTEGER LDLW=108;                 ! P22 LOAD LOCAL WORD OFFSET

==== ercc07/emas-2900/sup26gsrce_tape69s.txt ====
!

!**************************************************
!*                                                *
!*  TAPE HANDLER FOR 2900                         *
!*                                                *
!**************************************************
!!
!!           EXTERNAL ROUTINE REFERENCES
!!
%EXTERNALSTRINGFNSPEC HTOS(%INTEGER VALUE, PLACES)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%SYSTEMROUTINESPEC ETOI(%INTEGER A, L)
%SYSTEMROUTINESPEC MOVE(%INTEGER L, FROMAD, TOAD)
%EXTERNALROUTINESPEC PRHEX(%INTEGER N)
%EXTERNALROUTINESPEC DUMP TABLE(%INTEGER TABNO, START, L)
%EXTRINSICLONGINTEGER PARMDES
%EXTERNALINTEGERFNSPEC NEWPPCELL
%EXTERNALROUTINESPEC RETURNPPCELL(%INTEGER CELL)
%IF MULTIOCP=YES %START

==== ercc07/emas-2900/sup26csrce_oper31s.txt ====
%CONSTSTRING(15)VSN = "OPER31 22/04/80"
!
!
%CONSTINTEGER YES = 1
%CONSTINTEGER NO = 0
%CONSTINTEGER MONLEVEL = 1
!
%IF MONLEVEL & 1 > 0 %START
      %EXTRINSICLONGINTEGER KMON
      %OWNINTEGER OPER FACILITIES
      %OWNINTEGER OPMON; ! COPY OF KMON BIT
%FINISH
!
!
!
!
%EXTERNALROUTINESPEC DUMPTABLE(%INTEGER X,A,S)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC PTREC(%RECORDNAME P)
%EXTERNALROUTINESPEC PARSE COM(%INTEGER SRCE,%STRINGNAME S)
%EXTERNALROUTINESPEC RETURN PP CELL(%INTEGER CELL)

==== ercc07/emas-2900/opt02s.txt ====

!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands 
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.

==== ercc07/emas-2900/sup27csrce_gpc37s.txt ====

%CONSTSTRING (25) VSN="GPC37 29TH JUNE 81"
!************************************************GPC GPC GPC
!*
!*   EMAS 2900 SUPERVISOR NOTE
!*                                           No: 5
!*                                         Date: 21/05/80
!*                                       Author: A.Gibbons
!*
!*
!* %EXTERNAL ROUTINE GPC(%RECORD(PARMF)%NAME P)
!*
!* 1. CONVENTIONS
!* The record spec for the parameter is
!*   %RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
!* where
!*   DEST is considered as two half words DSNO and DACT. DSNO
!*        must be GPC's DSNO 
!*        DACT is set according to the function required.
!*
!*   SRCE is considered as two halfwords SSNO and SACT.

==== ercc07/emas-2900/sup26isrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=YES;             ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=NO;             ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=NO;              ! CARD PUNCH FITTED
%CONSTINTEGER SNOOZING=YES;             ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER MONLEVEL=31;              ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING
                                        ! 2**2 SET=SUP TIMING MEASUREMENTS
                                        ! 2**3 SET=CAT TABLE TRANSITIONS
                                        ! 2**4 SET= STROBING
                                        ! 2**8 SET=EVENT HARVESTING

==== ercc07/emas-2900/opt03s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/emas-2900/impalgs_writes.txt ====
%SYSTEMROUTINE WRITE(%INTEGER VALUE,PLACES)
%SYSTEMROUTINESPEC IOCP(%INTEGER A,B)
%STRING(16)S
%INTEGER D0,D1,D2,D3,L
      PLACES=PLACES&15
      *LSS_VALUE; *CDEC_0
      *LD_S; *INCA_1; *STD_%TOS
      *CPB_%B;                          ! SET CC=0
      *SUPK_%L=15,0,32;                 ! UNPACK & SPACE FILL
      *STD_D2; *JCC_8,<WASZERO>
      *LD_%TOS; *STD_D0;                 ! FOR SIGN INSERTION
      *LD_%TOS
      *MVL_%L=15,63,0;                 ! FORCE ISO ZONE CODES
      %IF VALUE<0 %THEN BYTEINTEGER(D1)='-'
      L=D3-D1
OUT:  %IF PLACES>=L %THEN L=PLACES+1
      D3=D3-L-1
      BYTEINTEGER(D3)=L
      IOCP(15,D3)
      %RETURN
WASZERO:

==== ercc07/emas-2900/impalgs_pprof01s.txt ====

%SYSTEMROUTINE PPROFILE(%INTEGER A,B)
%INTEGER LINES,V,I,J,MAX,MAXMAX
      LINES=A&X'FFFF'-1
      MAX=0
      %CYCLE I=1,1,LINES
         %IF INTEGER(B+4*I)>MAX %THEN MAX=INTEGER(B+4*I)
      %REPEAT
      MAXMAX=MAX
      MAX=1+MAX//40;                 ! TWO&AHALF PER CENT
      %CYCLE I=1,1,LINES
         V=INTEGER(B+4*I)
         %IF V>=MAX %THEN %START
            WRITE(I,4)
            J=I
            %WHILE INTEGER(B+4*J+4)=V %THEN J=J+1
            %IF J#I %THEN PRINTSTRING("->") %AND WRITE(J,4) %C
                  %ELSE SPACES(7)
            I=J
            WRITE(V,6)
            %IF V=MAXMAX %THEN PRINTSTRING("   ***")

==== ercc07/emas-2900/sup28asrce_tape73s.txt ====

!**************************************************
!*                                                *
!*  TAPE HANDLER FOR 2900                         *
!*                                                *
!**************************************************
!!
!***********************************************************************
!* VERSION 73:
!* PRIVATE CHAINS REDONE - P_P3=VADD RCB, P5,P6=STB FOR RCB AREA.
!* ALSO ALL ATTENTIONS FOR PRIVATE CHAINS GO STRAIGHT TO USER
!* WITHOUT ANY ACTION HERE.
!* VERSION 72
!* 05-MAY-81:
!*    HAIRY PON TO RESET 'RETRY PREAMBLE' WHICH ALLOWS/INHIBITS
!*    READ RETRY WHEN NO PREAMBLE DETECTED.
!*    MAINLY INTENDED FOR READING DUMP TAPES WITH SUCH.
!* 04-MAY-81:
!*    FIX IN LOAD AND LOAD MESSAGE FOR FAULTY DSN.
!*    REWINDS AND COMES UP AS LOADED NO LABEL.
!* 01-MAY-81:

==== ercc07/emas-2900/sup26gsrce_fast30s.txt ====

%EXTERNALSTRING (15) %FNSPEC STRINT(%INTEGER N)
%EXTERNALSTRING (8) %FNSPEC STRHEX(%INTEGER N)
%EXTERNALSTRING(8) %FNSPEC HTOS(%INTEGER VALUE,PLACES)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORDNAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (63) S)
%ROUTINESPEC MONITOR(%STRING (63) S)
%EXTERNALROUTINESPEC DUMP TABLE(%INTEGER T, A, L)
%ROUTINESPEC ELAPSED INT(%RECORDNAME P)
%SYSTEMROUTINESPEC MOVE(%INTEGER L,F,T)
%SYSTEMROUTINESPEC ETOI(%INTEGER A, L)
%ROUTINESPEC PDISC(%RECORDNAME P)
%EXTERNALROUTINESPEC HOOT(%INTEGER NHOOTS)
%EXTERNALROUTINESPEC WAIT(%INTEGER MSECS)
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALINTEGERFNSPEC REALISE(%INTEGER PUBVIRTADDR)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER ONOFF)
%IF MULTIOCP=YES %THEN %START
      %EXTERNALROUTINESPEC RESERVE LOG
      %EXTERNALROUTINESPEC RELEASE LOG
%FINISH

==== ercc07/emas-2900/lcs.txt ====
      %list
%routine LOCAL CONTROL
                                        ! CLAIMED BLOCK TABLES
%record (CBTF) %name CBT
                                        ! CONSOLE IO & ACCOUNTS RECORDS
%integername SEMAHELD;                  ! DIRECTOR HOLDING SEMA WORD
                                        ! ACTIVE SEGMENT TABLES
%constinteger MAXAS=31
%integerarray AS(0:7,0:MAXAS)
%byteintegerarray ASEG(0:MAXAS)
%integerarray ASPTVAD(0:MAXAS)
%integerarray OLDASWIPS(0:MAXRESIDENCES)
%constinteger TOPBIT=X'80000000'
!-----------------------------------------------------------------------
                                        ! LOCAL SEGMENT INFORMATION
%byteintegerarray TST(0:LSTLEN-1);      ! TERTIARY SEGMENT TABLE POINT TO AS
%constinteger SMALL SEQUENTIAL=8;       !USED TO DECIDE TO RECAP OR NOT
%integerfnspec DXR(%longlongrealname T, %longlongreal B)
%integerfnspec CHECK RES(%integer WRITE,LEN,AD)
%integerfnspec CHECKDA(%integer DA)
%routinespec PAGEOUT(%integer VSSEG,VSEPAGE, %record (CBTF) %name CBT)

==== ercc07/emas-2900/sup26csrce_documentn.txt ====



This partitioned file contains all the source required to make up a
version 26C Supervisor, plus the version of the IMP compiler and FIX
utility used at Edinburgh to do so.  This compiler is necessary as some
advanced language features are required which are not available in the
service compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Two "OBEY" subfiles are available: MAKECHKD and MAKEOPT.  They each
construct a test Supervisor which is left in file SUP26xT,  where x is
'C' or 'O' respectively.


Making a Supervisor thus consists of the following:

a) INSERT the IMP compiler and FIX utility into the current directory
   (and then log off and log on again if IMP was previously used in

==== ercc07/emas-2900/docs_mar83.txt ====
                              EMAS System
                              ===========

     The main changes to the software have concerned DAP scheduling;  however, a
new  Director  which  supports  multiple file indexes per user has been put into
service.   This is currently inaccessible until a subsystem which accesses these
features is available.   A distressing amount of skilled time has disappeared in
investigating curious faults in the service.  Many symptoms have been tracked to
OCP3 executing conditional branches incorrectly about 1 time in 10**9.  However,
with the reduced level of engineering cover and fewer OCP specialists around too
much effort here has fallen on software people.

     The discussions at Bush83 were encouraging,  particularly the near  support
for  an  advanced  user interface;   a collection of bad features in the present
system has been compiled together with a large  number  of  possible  ideas  and
improvements.    Contacts  with UKC have proved helpful but producing a coherent
design from the very large kit of parts  is  difficult.    Enough  material  for
several  subsystems  is  available  and many good ideas will perforce have to be
rejected.

     Further rounds of discussions have taken place with ICL about their  future

==== ercc07/emas-2900/sup26isrce_ndiag07s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ercc07/emas-2900/sup26gsrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=YES;             ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=NO;             ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=NO;              ! CARD PUNCH FITTED
%CONSTINTEGER SNOOZING=YES;             ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER MONLEVEL=31;              ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING
                                        ! 2**2 SET=SUP TIMING MEASUREMENTS
                                        ! 2**3 SET=CAT TABLE TRANSITIONS
                                        ! 2**4 SET= STROBING
                                        ! 2**8 SET=EVENT HARVESTING

==== ercc07/emas-2900/sup28asrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP28ASRCE_SUP28AS,SUPZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_COM35S,COMZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_PRINT08S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_OPER36S,OPERZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_ENTER14S,ENTERZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_GPC39S,GPCZZ,,.OUT
IMP80 SUP28ASRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_COMMS53S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_FAST41S,FASTZZ,,.OUT
IMP80 CTOPT+SUP28ASRCE_TAPE73S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/sup26csrce_releasen.txt ====





          SUPERVISOR RELEASE NOTICE VSN 26C
          _________________________________


      This Supervisor incorporates the following changes:-

         1) Allows "Snoozing" if incorporated at compile time.
            This feature allows processes to be suspended in store
            for short periods. It is designed for very large stores.

         2) Improved FAST(27) with transfer aborting.   This eases
            pressure on the Disc channels by not starting writeouts
            on pages which have been recaptured by the time the disc
            is on cylinder.

         3) Incorporates the new OPER(31). See separte documentation.

==== ercc07/emas-2900/docs_emasprot.txt ====
@h(Protection in EMAS 2900)


[This document is in the form of an addendum to Reference 1.]

   2900 Architecture provides a variety of methods to enable an operating system
to maintain its own integrity.

   a) @b(Privilege).   A bit in the PSW is required to execute
      privileged instructions.

   b) @b(Activate).    A privileged instruction to start executing
      a less trusted program at a lower ACR level and on a new
      stack.

   c) @b(Out).   An instruction exactly comparable to the IBM @b(SVC).
      Enables an untrusted program to return to Supervisor in a
      controlled and secure way.

   d) @b(ACR levels).   Four bits in the @b(PSW) define the @b("Access)
      @b(Control") status of the running program.   All store accesses

==== ercc07/emas-2900/impalgs_impmess2.txt ====
1 "%REPEAT is not required"
2 "Label & has already been set in this block"
4 "& is not a Switch name at current textual level"
5 "Switch name & in expression or assignment"
6 "Switch label &(#) set a second time"
7 "Name & has already been declared"

8 "Routine or fn & has more parameters than specified"
9 "Parameter # of & differs in type from specification"
10 "Routine or fn & has fewer parameters than specified"
11 "Label & referenced at line # has not been set"
12 "%CYCLE at line # has two control clauses"
13 "%REPEAT for %CYCLE at line # is missing"
14 "%END is not required"
15 "# %ENDs are missing"
16 "Name & has not been declared"
17 "Name & does not require parameters or subscripts"
18 "# too few parameters provided for &"
19 "# too many parameters provided for &"
20 "# too few subscripts provided for array &"
21 "# too many subscripts provided for array &"

==== ercc07/emas-2900/docs_may85.txt ====

                       Central Systems Group

     Although the impression seems to be around that the sole raison  d'etre  of
CSG  is  to  write  ever more sophisticated operating systems,   it is the other
activities that absorbed most effort this term.

     1) The Filestore is receiving substantial software  effort  in  preparation
     for direct attachment to the CPSE.  This involves a change of communication
     protocols from NSI to X25.

     2) The 2976 has had a spate of crashes due primarily to faults in the  DAPs
     when acting as store.   DAP store appears to go incommunicado after certain
     hardware faults unlike normal store.   To  live  through  such  faults  the
     Supervisor  has  been altered to ensure all vital pages are kept out of DAP
     store and EMAS now runs through DAP multibit failures.

     3) The 2988 is about to move to Kings Buildings and share peripherals  with
     the 2976.  The changes needed to device driving and archiving strategies to
     accommodate shared peripherals are being evaluated.


==== ercc07/emas-2900/sup26csrce_comms42s.txt ====

!                 VERSION OF 04/12/79
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ercc07/emas-2900/sup26esrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=NO;              ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=YES;            ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=YES;             ! CARD PUNCH FITTED
%CONSTINTEGER SNOOZING=NO;              ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER MONLEVEL=7;               ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING
                                        ! 2**2 SET=SUP TIMING MEASUREMENTS
                                        ! 2**3 SET=CAT TABLE TRANSITIONS
                                        ! 2**4 SET= STROBING
                                        ! 2**8 SET=EVENT HARVESTING

==== ercc07/emas-2900/ifast2s.txt ====
%include "ercc08.comf370"
%include "ercc08.page0f"
%recordformat PARMF(%integer DEST,SRCE,(%integer P1,P2,P3,P4,P5,
   P6 %orstring (23) TEXT))
%constinteger PCELLSIZE=36,MARGIN=48
%recordformat PDOPEF(%integer CURRMAX,MAXMAX,FIRST UNALLOC,LAST UNALLOC,
   NEXTPAGE,S1,S2,S3,S4)
%recordformat PARMXF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,LINK)
%constrecord (PARMXF) %arrayname PARM=PARM0AD
%constrecord (PDOPEF) %name PARMDOPE=PARM0AD
%recordformat STOREF(%shortinteger FLAGS,USERS,LINK,BLINK,FLINK)
%constrecord (STOREF) %arrayname STORE=STORE0AD
!
%externallonginteger SEMATIME=0
%owninteger PARMASL=0
%externalinteger MAINQSEMA=-1
%externalintegerspec STORESEMA
%ownintegerarray GET NEW PAGE(0:14);    ! parms for call of new epage
!
%constinteger LOCSN1=LOCSN0+MAXPROCS
%recordformat SERVF(%integer P,L)

==== ercc07/emas-2900/sup27csrce_ndiag07s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ercc07/emas-2900/cs4_intro.txt ====
@make[report]
@device[x2700]
@majorheading[compiler construction]
@heading[Peter Stephens]
@section[Description]
The aim of this course is to confront the problems encountered in producing a
production quality compiler; it also introduces students to the quite different
problems of programming in a team.  Students, working in groups of 3 or 4, are
expected to produce an ALGOL 60 compiler on the EMAS Amdahl Service.  Groups
will be provided with a syntax, run time support package, an object file 
generation suite and 120 test programs.  They will also receive a brief guided
tour of the compiler debugging aids on EMAS.  They will have to grapple with 
the "excruciating problems" of stack control and parameter passing in ALGOL.
@section[Organisation]
The course will consist of 12 lecturers interspersed with 6 tutorials all given
by Peter Stephens.  There will also be weekly brainstorming sessions at 8.30 a.m.
for the benefit of groups with problems.

Subjects covered will include -
@begin[itemize]
The EMAS compiler environment and standards.

==== ercc07/emas-2900/macros.txt ====
         %LISTCOMMENTS
         %MACROLISTON
%PHRASE(CLAB):'%IF' (SC)(RESTOFCOND)'%THEN' (NAME) '%ELSE' %C
            (CLAB),(NAME);
%PHRASE(LPL): (NAME)(APP) '=' (LPL),%NULL;
%PHRASE(OPTC):(CONST),%NULL;
%PHRASE(TEXTSEP):(OPTC)'C'(OPTC)'S',(OPTC)'C',(OPTC)'S';
%PHRASE(RTEXT): (TEXTSEP)(CONST)(RTEXT),%NULL;
%%FRONTMACRO: 'WRITETEXT('A(CONST) B(RTEXT) ')' S(S)
         %LOCAL X(TEXTSEP)
         %LOCAL Y(OPTC)
         %LOCAL Z(OPTC)
         %LOCAL COUNT(CONST)
L0)      :PRINT STRING($A$)
         ->END %IF B->%NULL
         B->X.A.B
         ->L1 %IF X->Y.'C'
         ->L2 %IF X->Z.'S'
         X->Y.'C'.Z.'S'
         ->Z1 %IF Y->%NULL
         Y->COUNT

==== ercc07/emas-2900/sup28dsrce_print09s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%EXTRINSICLONGINTEGER KMON
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PON(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC GDC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%SYSTEMROUTINESPEC ITOE(%INTEGER A, L)
%IF MULTIOCP=YES %THEN %START
   %EXTERNALROUTINESPEC SEMALOOP(%INTEGERNAME SEMA)
   %ROUTINESPEC RESERVE LOG
   %ROUTINESPEC RELEASE LOG
   %ROUTINESPEC AWAIT LOG ROUTE
%FINISH
!------------------------------------------------------------------------
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C

==== ercc07/emas-2900/sup26hsrce_releasen.txt ====
          SUPERVISOR RELEASE NOTICE VSN 26H
          _________________________________


      This Supervisor incorporates the following changes:-

         1) Has a better FAST(32) that permits disc switching
            between controllers and also dumps slaves on sytem
            error for p4 processors.

         2) Has code for advisory sequential connects.
            to share the logfile.

         3) Improved GPC(36) with proper semaphoring for duals.

         4) Incorporates TAPE(69) with minor corrections.

         5) Prevents SPOOLR&VOLUMS from abusing their privileged
            access to time on the fly category changes



==== ercc07/emas-2900/wichtests_wt10.txt ====
'BEGIN'
    'PROCEDURE' P( ST, A ); 'STRING' ST, A;
        ;
    P( <;'COMMENT'> )VALID:( <;> );
    'COMMENT' COULD FAIL TOO FEW PARAMETERS;
'END'

==== ercc07/emas-2900/wichtests_wt11.txt ====
'BEGIN'
    'REAL' X )INVALID PARAMETER LIKE COMMENTS:(Y;
        X := Y := 0.0
'END'

==== ercc07/emas-2900/wichtests_wt12.txt ====
'BEGIN'
    'PROCEDURE' Q( ST ) INVALID PARAMETER LIKE COMMENTS ( A );
        'STRING' ST; 'REAL' A; ;
        Q( <AZ> ) ALSO IN THE CALL( 1.0 )
'END'

==== ercc07/emas-2900/arout33s.txt ====
!***********************************************************************
!*    NOTE WELL                                                        *
!*    AFTER COMPILING THIS FILE THE FOLLOWING ALIASES MUST BE ADDED    *
!*    S#PRINT1900=ICL9CEPRINT1900 & S#READ1900=ICL9CEREAD1900          *
!***********************************************************************
!* MODIFIED 28.4.80 TO ALLOW FOR EBCDIC STRINGS
!* MODIFIED 10.3.80 TO REMOVE SQ AND DA  
!* MODIFIED 6.3.80 BY LCG WITH PDS'S  READ1900 AND WRITETEXT ROUTINES
!* MODIFIED 03/05/79 MLIBERR INSERTED
!* MODIFIED 16/04/79 LENGTH CHANGED
!* MODIFIED 17/01/79 NEW VERSION OF WRITETEXT
!* MODIFIED 20/02/78  ERROR MESSAGE VALUES
!* MODIFIED  8/11/77 READ1900 IGNORES MULTIPLE SP & NL AFTER EXP CHAR
!* MODIFIED 13/01/77 SET MARGINS
!* MODIFIED 03/12/76  NEW VERSIONS OF READ1900,WRITETEXT
!******** MODIFIED 02:07:76 15.15  LCG    (ALGLRTS,MATHFNS CONCATONATED
!                                         ,COMPLEX ROUTINES
!                                         & DUPLICATES FOR FORTRAN)
%SYSTEMROUTINESPEC SSERR(%INTEGER I)
%SYSTEMINTEGERFNSPEC IOCP(%INTEGER A,B)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)

==== ercc07/emas-2900/wichtests_wt13.txt ====
'BEGIN'
    LABELSCANNOTPRECEEDCOMMENTS: 'COMMENT' SHOULD FAIL;
        'GOTO' LABELSCANNOTPRECEEDCOMMENTS
'END'

==== ercc07/emas-2900/wichtests_wt14.txt ====
       'BEGIN'
                'PROCEDURE' Q( ST )INVALID PARAMETER 'COMMENT' :( A );
                        'STRING' ST; 'REAL' A; ;
                Q( <STR> ) AZ09:( 1.0 )
        'END'

==== ercc07/emas-2900/wichtests_wt15.txt ====
'BEGIN'
    'PROCEDURE' Q( ST1 )P:( ST2 ); 'COMMENT' ;
        'STRING' ST1, ST2; ;
    Q( <;'COMMENT' ) AZ: (>;> )INVALID:( <ST2> )
'END'

==== ercc07/emas-2900/sup26gsrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP CTOPT+SUP26GSRCE_SUP26GS,SUPZZ,,.OUT
IMP CTOPT+SUP26GSRCE_COM31S,COMZZ,,.OUT
IMP CTOPT+SUP26GSRCE_PRINT05S,PRINTZZ,,.OUT
IMP CTOPT+SUP26GSRCE_OPER33S,OPERZZ,,.OUT
IMP SUP26GSRCE_ENTER07S,ENTERZZ,,.OUT
IMP CTOPT+SUP26GSRCE_GPC34S,GPCZZ,,.OUT
IMP SUP26GSRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP CTOPT+SUP26GSRCE_COMMS46S,COMMSZZ,,.OUT
IMP CTOPT+SUP26GSRCE_FAST30S,FASTZZ,,.OUT
IMP CTOPT+SUP26GSRCE_TAPE69S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/wichtests_wt16.txt ====
'BEGIN'
    'COMMENT'   STRING TESTS;
    'PROCEDURE' P(ST);
        'STRING'
            ST;
        ;
    P( <*STRING 'STRING' <NESTED<<>>> 'BEGIN' 'END';> );
    P( < ,
        > )
'END'

==== ercc07/emas-2900/sup26csrce_samplectopt.txt ====

!
! THIS FILE CONTAINS THE CONST INTEGERS TO CONTROL COMPILE TIME OPTIONS
! IN EMAS2900
! IT IS INTENDED TO BE CONCATENATED ONTO THE FRONT OF SOURCEFILES
! BEFORE COMPILATION
%CONSTINTEGER YES=1
%CONSTINTEGER NO=0
%CONSTINTEGER SSERIES=NO;               ! NO=PSERIES, YES=SSERIES
%CONSTINTEGER MULTIOCP=NO;              ! YES TO INCLUDE SEMAPHORING
%CONSTINTEGER SFCFITTED=YES;            ! NO FOR DISC ONLY SITES
%CONSTINTEGER CPFITTED=YES;             ! CARD PUNCH FITTED
%CONSTINTEGER SNOOZING=NO;              ! YES ALLOWS SUSPEND IN STORE
                                        ! ADVANTAGEOUS WITH LARGE STORES
%CONSTINTEGER MONLEVEL=7;               ! 0=NO MONITORING
                                        ! 2**0 SET=VIDEO UPDATING
                                        ! 2**1 SET=KMONNING
                                        ! 2**2 SET=SUP TIMING MEASUREMENTS
                                        ! 2**3 SET=CAT TABLE TRANSITIONS
                                        ! 2**4 SET= STROBING
                                        ! 2**8 SET=EVENT HARVESTING

==== ercc07/emas-2900/wichtests_wt17.txt ====
'BEGIN'
    'REAL'
        REAL,
        INTEGER,
        BEGIN,
        END;
    REAL := 0.0
'END'

==== ercc07/emas-2900/sup28dsrce_fast42s.txt ====
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ercc07/emas-2900/wichtests_wt18.txt ====
'BEGIN'
    'REAL'
        A,
        AB,
        ABC,
        ABCD,
        ABCDE,
        ABCDEF,
        ABCDEFG,
        ABCDEFGH,
        ABCDEFGHI,
        ABCDEFGHIJ,
        ABCDEFGHIJK,
        ABCDEFGHIJKL,
        ABCDEFGHIJKLM,
        ABCDEFGHIJKLMN,
        ABCDEFGHIJKLNMO,
        ABCDEFGHIJKLNMOP,
        ABCDEFGHIJKLMNOPQ,
        ABCDEFGHIJKLNMOPQR,
        ABCDEFGHIJKLMNOPQRS,

==== ercc07/emas-2900/wichtests_wt19.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
    'REAL' 'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                A(/1/)+ A(/2/)+ A(/3/)
            'ELSE'
                SUM2(A);
    'REAL' 'PROCEDURE' SUM2(A);
        'ARRAY'
            A;
        SUM2 := A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)+
            A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/);

==== ercc07/emas-2900/algolps5.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(UPSTCNT)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/wichtests_wt20.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
    'REAL' 'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                A(/1/)+ A(/2/)+ A(/3/)
            'ELSE'
                SUM2(A);
    'REAL' 'PROCEDURE' SUM2(A);
        'ARRAY'
            A;
        SUM2 := A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)+
            A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/);

==== ercc07/emas-2900/wichtests_wt21.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 3/),
        B(/1 : 3, 1 : 3/);
    'REAL' 'PROCEDURE' SUM(DIM, A);
        'VALUE'
            DIM;
        'INTEGER'
            DIM;
        'ARRAY'
            A;
        SUM :=
            'IF' DIM = 1 'THEN'
                (A(/1/)+ A(/2/)+ A(/3/))
            'ELSE'
                (A(/1, 1/)+ A(/1, 2/)+ A(/1, 3/)+ A(/2, 1/)+ A(/2, 2/)
                    + A(/2, 3/)+ A(/3, 1/)+ A(/3, 2/)+ A(/3, 3/));
    'INTEGER'
        I,
        J;
    'FOR' I := 1,

==== ercc07/emas-2900/ibmconvert_sibmdriver.txt ====
%RECORDFORMAT RR(%INTEGER CONAD,FTYPE,DSTART,DEND)
%SYSTEMROUTINESPEC DISCONNECT(%STRING(31)FILE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC DESTROY(%STRING(31)FILE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC SETWORK(%INTEGERNAME AD,LEN)
%SYSTEMROUTINESPEC CHANGEFILESIZE(%STRING(31)FILE,%INTEGER SIZE,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC NEWGEN(%STRING(31) FILE1,FILE2,%INTEGERNAME FLAG)
%EXTERNALROUTINESPEC DEFINE(%STRING(255)PARM)
%SYSTEMROUTINESPEC PSYSMES(%INTEGER ROOT,FLAG)
%SYSTEMROUTINESPEC SETPAR(%STRING(255)PARM)
%SYSTEMSTRINGFNSPEC SPAR(%INTEGER N)
%SYSTEMROUTINESPEC CONNECT(%STRING(31)FILE,%INTEGER MODE,HOLE,PROT,
         %RECORD(RR)%NAME FINFO,%INTEGERNAME FLAG)
%SYSTEMROUTINESPEC OUTFILE(%STRING(31)FILE,%INTEGER SIZE,HOLE,PROT,
         %INTEGERNAME CONAD,FLAG)
%SYSTEMROUTINESPEC MOVE(%INTEGER LNTH,FROMAD,TOAD)
%EXTERNALROUTINESPEC CONVTOIBM(%INTEGER ICONAD,OCONAD, %INTEGERNAME FLAG)
!
!
%EXTERNALROUTINE TOIBMOBJ(%STRING(255) PARM)
 %STRING(31) INFILE,OUTF,LIST,WOUTF
 %RECORD(RR) FINFO

==== ercc07/emas-2900/wichtests_wt22.txt ====
'BEGIN'
    'PROCEDURE' RECURSIVE(LEVEL, L);
        'VALUE'
            LEVEL;
        'INTEGER'
            LEVEL;
        'LABEL'
            L;
        'BEGIN'
        'IF' LEVEL # 0 'THEN'
            RECURSIVE(LEVEL - 1, EXIT)
        'ELSE'
            'GOTO' L;
       EXIT :;
        OUTREAL(99,LEVEL)
        'END';
    RECURSIVE(10, EXIT);
   EXIT :;
'END'

==== ercc07/emas-2900/algolps9.txt ====
45
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(NOTELINE)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/arout34s.txt ====
!***********************************************************************
!*    NOTE WELL                                                        *
!*    AFTER COMPILING THIS FILE THE FOLLOWING ALIASES MUST BE ADDED    *
!*    S#PRINT1900=ICL9CEPRINT1900 & S#READ1900=ICL9CEREAD1900          *
!***********************************************************************
!* MODIFIED 28.4.80 TO ALLOW FOR EBCDIC STRINGS
!* MODIFIED 10.3.80 TO REMOVE SQ AND DA  
!* MODIFIED 6.3.80 BY LCG WITH PDS'S  READ1900 AND WRITETEXT ROUTINES
!* MODIFIED 03/05/79 MLIBERR INSERTED
!* MODIFIED 16/04/79 LENGTH CHANGED
!* MODIFIED 17/01/79 NEW VERSION OF WRITETEXT
!* MODIFIED 20/02/78  ERROR MESSAGE VALUES
!* MODIFIED  8/11/77 READ1900 IGNORES MULTIPLE SP & NL AFTER EXP CHAR
!* MODIFIED 13/01/77 SET MARGINS
!* MODIFIED 03/12/76  NEW VERSIONS OF READ1900,WRITETEXT
!******** MODIFIED 02:07:76 15.15  LCG    (ALGLRTS,MATHFNS CONCATONATED
!                                         ,COMPLEX ROUTINES
!                                         & DUPLICATES FOR FORTRAN)
%SYSTEMROUTINESPEC SSERR(%INTEGER I)
%SYSTEMINTEGERFNSPEC IOCP(%INTEGER A,B)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)

==== ercc07/emas-2900/wichtests_wt23.txt ====
'BEGIN'
    'INTEGER'
        I;
    'BOOLEAN'
        B;
    'PROCEDURE' LABELBYVALUE(L);
        'VALUE'
            L;
        'LABEL'
            L;
        ;
    'PROCEDURE' LABELBYNAME(L);
        'LABEL'
            L;
        'BEGIN'
        I := 1;
        'IF' B 'THEN'
            'GOTO' L
        'END';
    'SWITCH' S :=
        L1,

==== ercc07/emas-2900/disc17s.txt ====

%OWNLONGINTEGER VSN=X'4449534320563137';     ! M'DISC V17'
! DRIVING FPC2S WRITTEN BY PDS OCT 76
!
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%RECORDFORMAT DDTFORM(%INTEGER SER,PTS,PROPADDR,STICK, %C
      CCA,RQA,LBA,ALA,STATE,IW1,IW2,SENSE1,SENSE2,SENSE3,SENSE4,%C
      REPSNO,BASE,ID,DLVN,MNEMONIC,%STRING(6)LAB,%BYTEINTEGER MECH)
!
%RECORDFORMAT PROPFORM(%INTEGER TRACKS,CYLS,PPERTRK,BLKSIZE,TOTPAGES,%C
      RQBLKSIZE,LBLKSIZE,ALISTSIZE,KEYLEN,SECTINDX)
!
%RECORDFORMAT CCAFORM(%INTEGER MARK,PAW,PIW1,PIW2,CSAW1,CSAW2,%C
      CRESP1,CRESP2,%LONGLONGREALARRAY STRMS(0:15))
!
%RECORDFORMAT RQBFORM(%INTEGER LSEGPROP,LSEGADDR,LBPROP,LBADDR,ALPROP,%C
      ALADDR,W6,W7,W8)
!
%RECORDFORMAT LABFORM(%BYTEINTEGERARRAY VOL(0:5),%BYTEINTEGER S1,%C
      S2,S3,S4,ACCESS,%BYTEINTEGERARRAY RES(1:20),%BYTEINTEGER C1,C2,%C
      AC1,AC2,TPC1,TPC2,BF1,BF2,%BYTEINTEGERARRAY POINTER(0:3), %C

==== ercc07/emas-2900/tsup01s.txt ====
%INCLUDE "ERCC07.PERQ_OPCODES"
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.PERQ_FORMAT3S"
%OWNINTEGER CABUF,GLACABUF
%OWNINTEGERNAME CA,GLACA,PPCURR,GLACURR
%OWNBYTEINTEGERARRAYNAME CODE,GLABUF
%EXTRINSICRECORD(CODEPF) CODEP
%EXTRINSICRECORD(WORKAF)WORKA
%EXTRINSICRECORD(PARMF) PARM
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)
%DYNAMICROUTINESPEC QCODE(%INTEGER A,B,C,MODE)
%DYNAMICROUTINESPEC QPUT(%INTEGER A,B,C,D)
%ROUTINESPEC FAULT(%INTEGER I,J,K)
%ROUTINESPEC CNOP(%INTEGER I,J)
%ROUTINESPEC POP(%INTEGERNAME A,B,C,D)
%ROUTINESPEC PRHEX(%INTEGER VALUE,PLACES)
%CONSTINTEGER CODEBNDRY=X'1FF';         ! INSTRUCTIONS MUST NOT
                                        ! CROSS THIS IN ACCENT MODE
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTBYTEINTEGERARRAY BYTES(0:7)=0(3),1,2,4,8,16;

==== ercc07/emas-2900/wichtests_wt24.txt ====
'BEGIN'
    'INTEGER' 'ARRAY'
        A(/1 : 9/);
    'INTEGER'
        I,
        S;
    'PROCEDURE' DUMMY(A);
        'VALUE'
            A;
        'ARRAY'
            A;
        SUM(A);
    'PROCEDURE' SUM(A);
        'ARRAY'
            A;
        'FOR' I := 1 'STEP' 1 'UNTIL' 9 'DO'
            'BEGIN'
            S := S + A(/I/);
            A(/I/):= 0
            'END';
    S := 0;

==== ercc07/emas-2900/sup26csrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%END
%ENDOFFILE

==== ercc07/emas-2900/sup28asrce_com35s.txt ====
!
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ercc07/emas-2900/wichtests_wt25.txt ====
'BEGIN'
    'REAL'
        X,
        Y;
    'INTEGER'
        I;
    'FOR' X := &6,
        &+6,
        &-6,
        .6,
        6,
        6.6,
        .6&6,
        .6&+6,
        .6&-6,
        6&6,
        6&+6,
        6&-6,
        6.6&6,
        6.6&+6,
        6.6&-6 'DO'

==== ercc07/emas-2900/wichtests_pete10.txt ====

'COMMENT' CHECK LINE NUMBER OF SYNTAX FAULT;
'BEGIN' 'REAL' X,Y;
      X:=0;
      'BEGIN'
      L1:;
      X:=X+1;
      'IF' Y<20.0 'GOTO' L1;
      'END';
'END';

==== ercc07/emas-2900/wichtests_wt26.txt ====
'BEGIN'
    'PROCEDURE' P(L);
        'INTEGER'
            L;
       L : 'BEGIN'
        'REAL'
            A;
        'GOTO' L;
       L :;
        'GOTO' LL
        'END';
    P(1);
   LL :;
'END'

==== ercc07/emas-2900/wichtests_wt27.txt ====
'BEGIN'
    'INTEGER'
        S;
    'PROCEDURE' P(F, G);
        'PROCEDURE'
            F,
            G;
        'BEGIN'
        'INTEGER'
            X;
        'PROCEDURE' R;
            'BEGIN'
            OUTREAL(99, S);
            OUTREAL(99, X)
            'END';
        S := S + 1;
        X := S;
        'IF' S = 1 'THEN'
            P(F, R)
        'ELSE'
            F(G, R)

==== ercc07/emas-2900/wichtests_wt28.txt ====
'BEGIN'
    'INTEGER'
        N1,
        N2;
    'PROCEDURE' DUMMY;
        ;
    'PROCEDURE' P(X, L);
        'VALUE'
            X;
        'INTEGER'
            X;
        'PROCEDURE'
            L;
        'BEGIN'
        'PROCEDURE' GOTOL1;
            'GOTO' L1;
        'IF' X = N1 'THEN'
            P(X - 1, GOTOL1)
        'ELSE'
'IF' X = N2 'THEN'
            L

==== ercc07/emas-2900/nrsrce_sdprint02s.txt ====

%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC WAIT(%INTEGER MSECS)
%EXTERNALROUTINESPEC SUP29
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORDNAME P)
%EXTERNALROUTINESPEC DCU(%RECORDNAME P)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
! Alterations from above-mentioned record format, for the S-series, are
! as follows:
!     GPCTABSIZE  ->   DCUTABSIZE
!     GPCA        ->   DCUA
!     SMACS       ->   SCUS
!     GPCCONFA    ->   DCUCONFA
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C

==== ercc07/emas-2900/wichtests_wt29.txt ====
'BEGIN'
    'INTEGER'
        S;
    'PROCEDURE' P(F, G);
        'PROCEDURE'
            F,
            G;'COMMENT'(X,Y):'PROCEDURE' X,Y;
        'BEGIN'
        'INTEGER'
            X;
        'PROCEDURE' R(F, G);
        'PROCEDURE' F, G;'COMMENT'(X,Y):'PROCEDURE' X,Y;
            'BEGIN'
            OUTREAL(99, S);
            OUTREAL(99, X)
            'END';
        S := S + 1;
        X := S;
        'IF' S = 1 'THEN'
            P(F, R)
        'ELSE'

==== ercc07/emas-2900/sup27isrce_tape73s.txt ====

!**************************************************
!*                                                *
!*  TAPE HANDLER FOR 2900                         *
!*                                                *
!**************************************************
!!
!***********************************************************************
!* VERSION 73:
!* PRIVATE CHAINS REDONE - P_P3=VADD RCB, P5,P6=STB FOR RCB AREA.
!* ALSO ALL ATTENTIONS FOR PRIVATE CHAINS GO STRAIGHT TO USER
!* WITHOUT ANY ACTION HERE.
!* VERSION 72
!* 05-MAY-81:
!*    HAIRY PON TO RESET 'RETRY PREAMBLE' WHICH ALLOWS/INHIBITS
!*    READ RETRY WHEN NO PREAMBLE DETECTED.
!*    MAINLY INTENDED FOR READING DUMP TAPES WITH SUCH.
!* 04-MAY-81:
!*    FIX IN LOAD AND LOAD MESSAGE FOR FAULTY DSN.
!*    REWINDS AND COMES UP AS LOADED NO LABEL.
!* 01-MAY-81:

==== ercc07/emas-2900/sup27bsrce_releasen.txt ====

         Supervisor 27B Relase Notice

      This Supervisor has the following changes

         1)  Uses store list constructed by CHOPSUPE(and thus requires a 
               version  of 21 Series CHOPSUPES to load it)

         2)  Changes to SCHEDULE to use individual timeouts
               on snoozing processes. This involves changes to
               process list formay also.

         3)  Additions to allow dynamic reconfiguration
               of dual processor systems. This involves changes
               to Supervisor FAST & GPC. These changes are omitted
               if the Options file has MULTIOCP=NO.


                                        P. Stephens    03/06/81

==== ercc07/emas-2900/wichtests_wt30.txt ====
'BEGIN'
    'INTEGER'
        N1,
        N2;
    'PROCEDURE' P(X, L);
        'VALUE'
            X;
        'INTEGER'
            X;
        'LABEL'
            L;
        'BEGIN'
        'IF' X = N1 'THEN'
            P(X - 1, L1)
        'ELSE' 'IF' X = N2 'THEN'
            'GOTO' L
        'ELSE'
            P(X - 1, L);
        L1 :;
                OUTREAL(99, X)
        'END' P;

==== ercc07/emas-2900/wichtests_wt31.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    I := J := 0;
    I :=
        'IF' I = 0 'THEN'
                'IF' J = 0 'THEN'
                    1
                'ELSE'
                    2
        'ELSE'
            3;
    'IF' I = 1 'THEN'
        'IF' J = 0 'THEN'
            J := 2
        'ELSE'
            J := 3
        'ELSE'
            J := 4;
    OUTREAL(99, I);

==== ercc07/emas-2900/wichtests_wt32.txt ====
'BEGIN'
    'INTEGER'
        I;
    'REAL'
        X;
    'PROCEDURE' ASS(X, I);
        'REAL'
            X;
        'INTEGER'
            I;
        'IF' I < 0 'THEN'
            X := I + 3
        'ELSE'
            I := 2.0 * X;
    ASS(X, - 1);
    I := 2;
    ASS(X, I);
    ASS(I, I);
    ASS(I, X);
    OUTREAL(99, I);
    OUTREAL(99, X)

==== ercc07/emas-2900/sup27isrce_comms52s.txt ====

!  R.D.EAGER        CONTAINS CODE FOR OUTPUT ACCOUNTS IN COMM CONTROL,
!                   LP ADAPTOR AND CP ADAPTOR
!                 VERSION OF 13/06/80
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C

==== ercc07/emas-2900/wichtests_wt33.txt ====
'BEGIN'
    'PROCEDURE' A0;
        'BEGIN'
        'PROCEDURE' A1;
            'BEGIN'
            'PROCEDURE' A2;
                'BEGIN'
                'PROCEDURE' A3;
                    'BEGIN'
                    'PROCEDURE' A4;
                        'BEGIN'
                        'PROCEDURE' A5;
                            'BEGIN'
                            'END';
                        ;
                        'END';
                    ;'END';
                ;'END';
            ;'END';
        ;'END';
    ;'END'

==== ercc07/emas-2900/wichtests_wt34.txt ====
'BEGIN' 'REAL' A;
 'BEGIN' 'REAL' A;
  'BEGIN' 'REAL' A;
   'BEGIN' 'REAL' A;
    'BEGIN' 'REAL' A;
     'BEGIN' 'REAL' A;
      'BEGIN' 'REAL' A;
       'BEGIN' 'REAL' A;
        'BEGIN' 'REAL' A;
         'BEGIN' 'REAL' A;
          'BEGIN' 'REAL' A;
           'BEGIN' 'REAL' A;
            'BEGIN' 'REAL' A;
             'BEGIN' 'REAL' A;
              'BEGIN' 'REAL' A;
              'END'
             'END'
            'END'
           'END'
          'END'
         'END'

==== ercc07/emas-2900/sup27isrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP27ISRCE_SUP27IS,SUPZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_COM34S,COMZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_PRINT07S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_OPER35S,OPERZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_ENTER13S,ENTERZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_GPC39S,GPCZZ,,.OUT
IMP80 SUP27ISRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_COMMS52S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_FAST40S,FASTZZ,,.OUT
IMP80 CTOPT+SUP27ISRCE_TAPE73S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/sup26gsrce_makechkd.txt ====
PARM FREE,STACK,NOCHECK,NOLIST
IMP CTOPT+SUP26GSRCE_SUP26GS,SUPZZ,,.OUT
IMP CTOPT+SUP26GSRCE_COM31S,COMZZ,,.OUT
IMP CTOPT+SUP26GSRCE_PRINT05S,PRINTZZ,,.OUT
IMP CTOPT+SUP26GSRCE_OPER33S,OPERZZ,,.OUT
IMP SUP26GSRCE_ENTER07S,ENTERZZ,,.OUT
IMP CTOPT+SUP26GSRCE_GPC34S,GPCZZ,,.OUT
PARM FREE,OPT,STACK,NOLIST
IMP SUP26GSRCE_NDIAG07S,NDIAGZZ,,.OUT
IMP CTOPT+SUP26GSRCE_COMMS46S,COMMSZZ,,.OUT
IMP CTOPT+SUP26GSRCE_FAST30S,FASTZZ,,.OUT
IMP CTOPT+SUP26GSRCE_TAPE69S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
NDIAGZZ

==== ercc07/emas-2900/wichtests_wt35.txt ====
'BEGIN'
    'REAL'
        A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12,
        A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24,
        A25, A26, A27, A28, A29, A30, A31, A32, A33, A34, A35, A36,
        A37, A38, A39, A40, A41, A42, A43, A44, A45, A46, A47,
        A48, A49, A50, A51, A52, A53, A54, A55, A56, A57, A58,
        A59, A60, A61, A62, A63, A64, A65, A66, A67, A68, A69,
        A70, A71, A72, A73, A74, A75, A76, A77, A78, A79, A80,
        A81, A82, A83, A84, A85, A86, A87, A88, A89, A90, A91,
        A92, A93, A94, A95, A96, A97, A98, A99, A100, A101,
        A102, A103, A104, A105, A106, A107, A108, A109, A110,
        A111, A112, A113, A114, A115, A116, A117, A118, A119,
        A120, A121, A122, A123, A124, A125, A126, A127, A128,
        A129, A130, A131, A132, A133, A134, A135, A136, A137,
        A138, A139, A140, A141, A142, A143, A144, A145, A146,
        A147, A148, A149, A150, A151, A152, A153, A154, A155,
        A156, A157, A158, A159, A160, A161, A162, A163, A164,
        A165, A166, A167, A168, A169, A170, A171, A172, A173,
        A174, A175, A176, A177, A178, A179, A180, A181, A182,
        A183, A184, A185, A186, A187, A188, A189, A190, A191,

==== ercc07/emas-2900/wichtests_wt36.txt ====
'BEGIN'
    'ARRAY'
        A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
        A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
        A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
        A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
        A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
        A50, A51, A52, A53, A54, A55, A56, A57, A58, A59(/1 : 10/);
    A0(/1/):= 1.0; A1(/1/):= 1.0; A2(/1/):= 1.0; A3(/1/):= 1.0;
    A4(/1/):= 1.0; A5(/1/):= 1.0; A6(/1/):= 1.0; A7(/1/):= 1.0;
    A8(/1/):= 1.0; A9(/1/):= 1.0; A10(/1/):= 1.0; A11(/1/):= 1.0;
    A12(/1/):= 1.0; A13(/1/):= 1.0; A14(/1/):= 1.0; A15(/1/):= 1.0;
    A16(/1/):= 1.0; A17(/1/):= 1.0; A18(/1/):= 1.0; A19(/1/):= 1.0;
    A20(/1/):= 1.0; A21(/1/):= 1.0; A22(/1/):= 1.0; A23(/1/):= 1.0;
    A24(/1/):= 1.0; A25(/1/):= 1.0; A26(/1/):= 1.0; A27(/1/):= 1.0;
    A28(/1/):= 1.0; A29(/1/):= 1.0; A30(/1/):= 1.0; A31(/1/):= 1.0;
    A32(/1/):= 1.0; A33(/1/):= 1.0; A34(/1/):= 1.0; A35(/1/):= 1.0;
    A36(/1/):= 1.0; A37(/1/):= 1.0; A38(/1/):= 1.0; A39(/1/):= 1.0;
    A40(/1/):= 1.0; A41(/1/):= 1.0; A42(/1/):= 1.0; A43(/1/):= 1.0;
    A44(/1/):= 1.0; A45(/1/):= 1.0; A46(/1/):= 1.0; A47(/1/):= 1.0;
    A48(/1/):= 1.0; A49(/1/):= 1.0; A50(/1/):= 1.0; A51(/1/):= 1.0;

==== ercc07/emas-2900/impalgs_rphexs.txt ====
%CONSTBYTEINTEGERARRAY CHEX(0:15)=%C
      '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F';
%EXTERNALROUTINE RPHEX(%LONGREAL X)
%INTEGER I,J
%ROUTINESPEC HEX(%INTEGER VAL)
      I=INTEGER(ADDR(X))
      J=INTEGER(ADDR(X)+4)
      HEX(I); HEX(J)
%ROUTINE HEX(%INTEGER VAL)
%INTEGER I
      SPACE
      %CYCLE I=28,-4,0
         PRINT SYMBOL(CHEX(VAL>>I&15))
      %REPEAT
%END
%END
%ENDOFFILE

==== ercc07/emas-2900/wichtests_wt37.txt ====
'BEGIN'
 'INTEGER'
  A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11;
 'INTEGER'
  SUM;
 SUM := 0;
 'FOR' A0 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
  'FOR' A1 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
   'FOR' A2 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
    'FOR' A3 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
     'FOR' A4 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
      'FOR' A5 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
       'FOR' A6 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
        'FOR' A7 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
         'FOR' A8 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
          'FOR' A9 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
           'FOR' A10 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
            'FOR' A11 := 1,2 'DO' 'BEGIN' SUM := SUM + 1;
             'END'
            'END'
           'END'

==== ercc07/emas-2900/wichtests_wt38.txt ====
'BEGIN'
 'INTEGER'
  I,
  J,
  SUM;
 I := 1;
 J := 2;
 SUM := 0;
 'IF' I > J 'THEN''BEGIN'
  'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
  'IF' I > J 'THEN''BEGIN'
   'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
   'IF' I > J 'THEN''BEGIN'
    'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
    'IF' I > J 'THEN''BEGIN'
     'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
     'IF' I > J 'THEN''BEGIN'
      'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
      'IF' I > J 'THEN''BEGIN'
       'END' 'ELSE' 'BEGIN' SUM := SUM + 1;
       'IF' I > J 'THEN''BEGIN'

==== ercc07/emas-2900/wichtests_wt39.txt ====
'BEGIN'
    'INTEGER'
        I,
        J,
    SUM;
    I := 1;
    J := 2;
    SUM := 1 + ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE'
        ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I
        > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J
        'THEN'0 'ELSE' ('IF' I > J 'THEN'0 'ELSE' ('IF' I > J 'THEN'
        0 'ELSE' 1)))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/emas-2900/sup26isrce_print05s.txt ====

%EXTRINSICLONGINTEGER KMON
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORDNAME P)
%EXTERNALROUTINESPEC PON(%RECORDNAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%SYSTEMROUTINESPEC ITOE(%INTEGER A, L)
%IF MULTIOCP=YES %THEN %START
%EXTERNALROUTINESPEC SEMALOOP(%INTEGERNAME SEMA)
      %ROUTINESPEC RESERVE LOG
      %ROUTINESPEC RELEASE LOG
      %ROUTINESPEC AWAIT LOG ROUTE
%FINISH
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
!------------------------------------------------------------------------
%RECORDFORMAT ENTFORM(%INTEGER SER, PTSM, PROPADDR,  %C
         TICKS SINCE, CAA, GRCB AD, LBA, ALA, STATE, RESP0,  %C
         RESP1, SENSE1, SENSE2, SENSE3, SENSE4, REPSNO, BASE,  %C
         ID, DLVN, MNEMONIC, ENTSIZE, PAW, USAW0, URCB AD,  %C
         SENSDAT AD, LOGMASK, TRTAB AD, UA SIZE, UA AD,  %C

==== ercc07/emas-2900/ibmsup_activems.txt ====
%routine ACTIVE MEM(%record (PARMF) %name P)
!***********************************************************************
!*    CONTROLS THE ALLOCATION OF ACTIVE MEMORY                         *
!*    ACTIVITY 0  INITIALISE                                           *
!*    ACTIVITY 1  GET AMT FOR SPECIFIED DISC ADDRESSS                  *
!*    ACTIVITY 2  RETURN AMT FOR DITTO                                 *
!*    ACTIVITY 3  COMPLETE RETURN OF AMT AFTER TRANSFER COMPLETED      *
!*    ACTIVITY 4  ORGANISE TIMEOUT OF ACTIVE MEM                       *
!*    ACTIVITY 5 CHECK IF DISC ADDRESS IS STILL ACTIVE                 *
!***********************************************************************
%routinespec COLLECT DD GARBAGE
%routinespec APPENDAMTA(%integer NEWSPACE,REALAD)
%routinespec APPENDAMTDD(%integer NEWSPACE,REALAD)
%routinespec DDASLALLOC(%integer FROM,TO)
%routinespec DEALLOCAMT
%routinespec DEALLOCDD(%integer DDX,LEN)
%integer HASH,DDX,GARB,AMTX,SRCE,ID,DA,LEN,MASK,REALAD,FREEMAX,I,J,K,CN
%integer DACT,LIM
      %if MONLEVEL&12=12 %thenstart
      %integer IT,IC
      %finish

==== ercc07/emas-2900/wichtests_wt40.txt ====
'BEGIN'
    'SWITCH' SS :=
        A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
        A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
        A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
        A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
        A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
        A50, A51, A52, A53, A54, A55, A56, A57, A58, A59,
        A60, A61, A62, A63, A64, A65, A66, A67, A68, A69,
        A70, A71, A72, A73, A74, A75, A76, A77, A78, A79,
        A80, A81, A82, A83, A84, A85, A86, A87, A88, A89,
        A90, A91, A92, A93, A94, A95, A96, A97, A98, A99,
        A100, A101, A102, A103, A104, A105, A106, A107, A108, A109,
        A110, A111, A112, A113, A114, A115, A116, A117, A118, A119,
        A120, A121, A122, A123, A124, A125, A126, A127, A128, A129,
        A130, A131, A132, A133, A134, A135, A136, A137, A138, A139,
        A140, A141, A142, A143, A144, A145, A146, A147, A148, A149,
        A150, A151, A152, A153, A154, A155, A156, A157, A158, A159,
        A160, A161, A162, A163, A164, A165, A166, A167, A168, A169,
        A170, A171, A172, A173, A174, A175, A176, A177, A178, A179,
        A180, A181, A182, A183, A184, A185, A186, A187, A188, A189,

==== ercc07/emas-2900/wichtests_wt41.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' P(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
        A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20,
        A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31,
        A32, A33, A34, A35, A36, A37, A38, A39, A40, A41, A42,
        A43, A44, A45, A46, A47, A48, A49, A50, A51, A52, A53,
        A54, A55, A56, A57, A58, A59);
        'VALUE'
            A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
            A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
            A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
            A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
            A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
            A50, A51, A52, A53, A54, A55, A56, A57, A58, A59;
        'INTEGER'
            A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
            A10, A11, A12, A13, A14, A15, A16, A17, A18, A19,
            A20, A21, A22, A23, A24, A25, A26, A27, A28, A29,
            A30, A31, A32, A33, A34, A35, A36, A37, A38, A39,
            A40, A41, A42, A43, A44, A45, A46, A47, A48, A49,
            A50, A51, A52, A53, A54, A55, A56, A57, A58, A59;

==== ercc07/emas-2900/wichtests_wt42.txt ====
'BEGIN'
    'ARRAY'
        A(/1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 : 2, 1 :
            2, 1 : 2, 1 : 2, 1 : 2, 1 : 2/);
    A(/1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1/):= 1.0;
    OUTREAL(99, A(/1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1/));
'END'

==== ercc07/emas-2900/wichtests_wt43.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    'REAL'
        SUM;
    A0 := 1.0;  A1 := 1.0;  A2 := 1.0;
    A3 := 1.0;  A4 := 1.0;  A5 := 1.0;
    A6 := 1.0;  A7 := 1.0;  A8 := 1.0;
    A9 := 1.0;  A10 := 1.0;  A11 := 1.0;
    A12 := 1.0;  A13 := 1.0;  A14 := 1.0;
    SUM := A0 + (A1 + (A2 + (A3 + (A4 + (A5 + (A6 + (A7 + (A8 + (A9
        + (A10 + (A11 + (A12 + (A13 + (A14))))))))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/emas-2900/wichtests_wt44.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    'REAL'
        SUM;
    A0 := 1.0;  A1 := 1.0;  A2 := 1.0;
    A3 := 1.0;  A4 := 1.0;  A5 := 1.0;
    A6 := 1.0;  A7 := 1.0;  A8 := 1.0;
    A9 := 1.0;  A10 := 1.0;  A11 := 1.0;
    A12 := 1.0;  A13 := 1.0;  A14 := 1.0;
    SUM := 2.0 * A0 + .5 * (2.0 * A1 + .5 * (2.0 * A2 + .5 * (2.0
        * A3 + .5 * (2.0 * A4 + .5 * (2.0 * A5 + .5 * (2.0 * A6
        + .5 * (2.0 * A7 + .5 * (2.0 * A8 + .5 * (2.0 * A9 + .5
        * (2.0 * A10 + .5 * (2.0 * A11 + .5 * (2.0 * A12 + .5 *
        (2.0 * A13 + .5 * (A14))))))))))))));
    OUTREAL(99, SUM);
'END'

==== ercc07/emas-2900/wichtests_wt45.txt ====
'BEGIN'
    'REAL'
        X;
    X := 8.4;
    OUTREAL(99,
        SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(SQRT(X^9)))))))))
        );
'END'

==== ercc07/emas-2900/sup27bsrce_sup27bs.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) CHANGE SSERIES=NO TO SSERIES=YES IN CTOPTIONS FILE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTINTEGER CBTLEN=299;               ! LENGTH OF CBT TABLE
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=8*CBTLEN+255+2*LSTLEN; ! SIZE OF SAME
                                        ! MADE UP OF 2049 FOR CBT
                                        ! 2*LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT

==== ercc07/emas-2900/wichtests_wt46.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    I := 1;
    J := 2;
    L1 :;
    'GOTO'
        'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'L1
        'ELSE' 'IF' I > J 'THEN'
            L1
        'ELSE'
            L2;
    L2 :;
'END'

==== ercc07/emas-2900/wichtests_wt47.txt ====
'BEGIN'
    A0 :; A1 :; A2 :; A3 :; A4 :; A5 :;
'END'

==== ercc07/emas-2900/sup26hsrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%END
%ENDOFFILE

==== ercc07/emas-2900/wichtests_wt48.txt ====
'BEGIN'
  'INTEGER'
    SUM;
  SUM := 0;
  'BEGIN' SUM := SUM + 1;
    'BEGIN' SUM := SUM + 1;
      'BEGIN' SUM := SUM + 1;
        'BEGIN' SUM := SUM + 1;
          'BEGIN' SUM := SUM + 1;
            'BEGIN' SUM := SUM + 1;
              'BEGIN' SUM := SUM + 1;
                'BEGIN' SUM := SUM + 1;
                  'BEGIN' SUM := SUM + 1;
                    'BEGIN' SUM := SUM + 1;
                      'BEGIN' SUM := SUM + 1;
                        'BEGIN' SUM := SUM + 1;
                          'BEGIN' SUM := SUM + 1;
                            'BEGIN' SUM := SUM + 1;
                              'BEGIN' SUM := SUM + 1;
                                'BEGIN' SUM := SUM + 1;
                                  'BEGIN' SUM := SUM + 1;

==== ercc07/emas-2900/wichtests_wt49.txt ====
'BEGIN'
    'REAL'
        A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14;
    A0 := A1 := A2 := A3 := A4 := A5 := A6 := A7 := A8 :=
        A9 := A10 := A11 := A12 := A13 := A14 := 1.0;
    OUTREAL(99, A0 + A1 + A2 + A3 + A4 + A5 + A6 + A7 + A8 + A9 + A10
        + A11 + A12 + A13 + A14);
'END'

==== ercc07/emas-2900/ibm_newimpl.txt ====
PARM NOCHECK
IMP80 IBM_IMP01S,IBMY,.LP,.OUT
OBEY IBM_LINK
PARM CODE
IBMIMP IT0,.NULL,.LP

==== ercc07/emas-2900/wichtests_wt50.txt ====
'BEGIN'
    'INTEGER'
        I,
        SUM;
    SUM := 0;
    'FOR' I := 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1,
        I + 1,  I + 1,  I + 1,  I + 1,  I + 1,  I + 1 'DO'
        SUM := SUM + I;
    OUTREAL(99, SUM);
'END'

==== ercc07/emas-2900/wichtests_wt51.txt ====
'BEGIN'
    'ARRAY'
        A0(/1 : 10/), A1(/1 : 10/), A2(/1 : 10/), A3(/1 : 10/),
        A4(/1 : 10/), A5(/1 : 10/), A6(/1 : 10/), A7(/1 : 10/),
        A8(/1 : 10/), A9(/1 : 10/), A10(/1 : 10/), A11(/1 : 10/),
        A12(/1 : 10/), A13(/1 : 10/), A14(/1 : 10/), A15(/1 : 10/),
        A16(/1 : 10/), A17(/1 : 10/), A18(/1 : 10/), A19(/1 : 10/),
        A20(/1 : 10/), A21(/1 : 10/), A22(/1 : 10/), A23(/1 : 10/),
        A24(/1 : 10/), A25(/1 : 10/), A26(/1 : 10/), A27(/1 : 10/),
        A28(/1 : 10/), A29(/1 : 10/), A30(/1 : 10/), A31(/1 : 10/),
        A32(/1 : 10/), A33(/1 : 10/), A34(/1 : 10/), A35(/1 : 10/),
        A36(/1 : 10/), A37(/1 : 10/), A38(/1 : 10/), A39(/1 : 10/),
        A40(/1 : 10/), A41(/1 : 10/), A42(/1 : 10/), A43(/1 : 10/),
        A44(/1 : 10/), A45(/1 : 10/), A46(/1 : 10/), A47(/1 : 10/),
        A48(/1 : 10/), A49(/1 : 10/), A50(/1 : 10/), A51(/1 : 10/),
        A52(/1 : 10/), A53(/1 : 10/), A54(/1 : 10/), A55(/1 : 10/),
        A56(/1 : 10/), A57(/1 : 10/), A58(/1 : 10/), A59(/1 : 10/);
    A0(/1/):= 1.0;    A1(/1/):= 1.0;    A2(/1/):= 1.0;    A3(/1/):= 1.0;
    A4(/1/):= 1.0;    A5(/1/):= 1.0;    A6(/1/):= 1.0;    A7(/1/):= 1.0;
    A8(/1/):= 1.0;    A9(/1/):= 1.0;    A10(/1/):= 1.0;    A11(/1/):= 1.0;
    A12(/1/):= 1.0;    A13(/1/):= 1.0;    A14(/1/):= 1.0;    A15(/1/):= 1.0;

==== ercc07/emas-2900/sup28dsrce_gpc40s.txt ====

%CONSTSTRING (25) VSN="GPC40 15th Mar 1982"
!************************************************GPC GPC GPC
!*
!*   EMAS 2900 SUPERVISOR NOTE
!*                                           No: 5
!*                                         Date: 21/05/80
!*                                       Author: A.Gibbons
!*
!*
!* %EXTERNAL ROUTINE GPC(%RECORD(PARMF)%NAME P)
!*
!* 1. CONVENTIONS
!* The record spec for the parameter is
!*   %RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
!* where
!*   DEST is considered as two half words DSNO and DACT. DSNO
!*        must be GPC's DSNO 
!*        DACT is set according to the function required.
!*
!*   SRCE is considered as two halfwords SSNO and SACT.

==== ercc07/emas-2900/wichtests_wt52.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' IABS(I);
        'VALUE'
            I;
        'INTEGER'
            I;
        IABS :=
            'IF' I < 0 'THEN'
                - I
            'ELSE'
                I;
    'INTEGER'
        I,
        J,
        K;
    I := J := K := 1;
    'BEGIN'
        'ARRAY'
            A(/('IF' IABS(J * K 'DIV' I) > 3 * I - K 'THEN'- 60 'ELSE' 1) :
                ('IF' IABS(J * K 'DIV' I) > 3 * I - K 'THEN'- 60 'ELSE' 1)
                * 3.0 - 1.6 + 10.2/),

==== ercc07/emas-2900/wichtests_wt53.txt ====
'BEGIN'
    'INTEGER'
        I,
        J;
    'FOR' I := - 2,
         - 1,
        1,
        2 'DO'
        'FOR' J := - 2 'STEP' 1 'UNTIL' 2 'DO'
            'IF' J 'DIV' I # SIGN(J / I) * ENTIER(ABS(J / I))
                'THEN'
                'BEGIN'
                OUTREAL(99, J);
                OUTREAL(99, I);
                OUTREAL(99, J 'DIV' I)
                'END';
'END'

==== ercc07/emas-2900/ibm_newimp.txt ====
PARM NOCHECK,NOLIST
IMP80 IBM_IMP01S,IBMY,,.OUT
OBEY IBM_LINK
INSERT IBM01Y

==== ercc07/emas-2900/wichtests_wt54.txt ====
'BEGIN'
    'INTEGER' 'PROCEDURE' TSIGN(X);
        'VALUE'
            X;
        'REAL'
            X;
        TSIGN :=
            'IF' X > 0 'THEN'
                1
            'ELSE' 'IF' X < 0 'THEN'
                 - 1
            'ELSE'
                0;
    'INTEGER' 'PROCEDURE' TENTIER(X);
        'VALUE'
            X;
        'REAL'
            X;
        TENTIER := X - .5;
    'REAL' 'PROCEDURE' TABS(X);
        'VALUE'

==== ercc07/emas-2900/wichtests_wt55.txt ====
'BEGIN'
    'INTEGER' 'ARRAY'
        EQ(/1 : 9/);
    'INTEGER'
        I;
    'REAL'
        X,
        Y;
    'PROCEDURE' PRINT EQ;
        'FOR' I := 1 'STEP' 1 'UNTIL' 9 'DO'
            OUTREAL(99, EQ(/I/));
    'PROCEDURE' TEST(A, B, C);
        'VALUE'
            A,
            B,
            C;
        'REAL'
            A,
            B,
            C;
        'BEGIN'

==== ercc07/emas-2900/wichtests_wt56.txt ====
'BEGIN'
    'INTEGER'
        I,
        J,
        CASE;
    'REAL'
        X,
        Y;
    'PROCEDURE' REQUAL(A, B);
        'VALUE'
            A,
            B;
        'REAL'
            A,
            B;
        'IF' A # B 'THEN'
            'BEGIN'
            OUTREAL(99, A);
            OUTREAL(99, B);
            OUTREAL(99, CASE)
            'END'

==== ercc07/emas-2900/perq_newimp.txt ====
PARM NOCHECK,NOLIST
IMP80 PERQ_IMP01S,PERQY,,.OUT
IMP80 PERQ_PASSONE,PASSONEY,,.OUT
OBEY PERQ_LINK

==== ercc07/emas-2900/wichtests_wt57.txt ====
'BEGIN'
    'INTEGER'
        I;
    'REAL'
        X;
    I := 0;
    X := 0.0;
    OUTREAL(99, X^I)
'END'

==== ercc07/emas-2900/drsgen01s.txt ====
%INCLUDE "ERCC07.TRIMP_HOSTCODES"
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PNX
%INCLUDE  "ERCS02.DRS_ECODES"
%INCLUDE "ERCC07.TRIPCNSTS"
%INCLUDE "ERCC07.TRIMP_TFORM1S"
%CONSTINTEGER ESTK=0,FR0=1,FR1=2,FR2=3,FR3=4,FRN=FR0<<16!FR3
%RECORDFORMAT REGF(%INTEGER CL,(%INTEGER USE %OR %HALF SECUSE,PRIMUSE),
      %INTEGER INF1,INF2,AT,LINK)
%OWNINTEGER CABUF,GLACABUF,GLABEL,FPPTR,FPHEAD
%OWNINTEGERNAME CA,GLACA,PPCURR
%OWNINTEGERARRAYNAME CTABLE,TAGS
!%OWNBYTEINTEGERARRAYNAME CODE
%OWNRECORD(LISTF)%ARRAYNAME ASLIST
%EXTRINSICINTEGERARRAY CAS(0:12)
%EXTRINSICRECORD(WORKAF)WORKA
%EXTRINSICRECORD(PARMF) PARM
%CONSTINTEGER MAXREG=4
%OWNRECORD(REGF)%ARRAY REGS(0:MAXREG)
%EXTERNALROUTINESPEC FLAGAND FOLD(%RECORD(TRIPF)%ARRAYNAME T)
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)

==== ercc07/emas-2900/wichtests_wt58.txt ====
'BEGIN'
    'INTEGER'
        I;
    I := 0;
    OUTREAL(99, I^I)
'END'

==== ercc07/emas-2900/wichtests_wt59.txt ====
'BEGIN'
    'REAL'
        X;
    X := - 1.0;
    OUTREAL(99, 0.0^X)
'END'

==== ercc07/emas-2900/imp80tests_testcomp.txt ====
LIST IMP80TESTS_BLURB
PARM
IMP80 IMP80TESTS_CT0,.NULL,.OUT
IMP80 IMP80TESTS_CT1,.NULL,.OUT
IMP80 IMP80TESTS_CT2,.NULL,.OUT
IMP80 IMP80TESTS_CT3,.NULL,.OUT
IMP80 IMP80TESTS_CT4,.NULL,.OUT
IMP80 IMP80TESTS_CT5,.NULL,.OUT
IMP80 IMP80TESTS_CT6,.NULL,.OUT
IMP80 IMP80TESTS_CT7,.NULL,.OUT
IMP80 IMP80TESTS_CT8,.NULL,.OUT
IMP80 IMP80TESTS_CT9,.NULL,.OUT
IMP80 IMP80TESTS_CT10,.NULL,.OUT
IMP80 IMP80TESTS_CT11,.NULL,.OUT
IMP80TESTS_CT12,.NULL,.OUT
IMP80 IMP80TESTS_CT13,.NULL,.OUT
IMP80 IMP80TESTS_RT0,IY,.OUT
RUN IY
IMP80 IMP80TESTS_RT1,IY,.OUT
RUN IY
IMP80 IMP80TESTS_RT2,IY,.OUT

==== ercc07/emas-2900/wichtests_wt60.txt ====
'BEGIN'
    'REAL'
        X;
    X := - 1.0;
    OUTREAL(99, 0^X)
'END'

==== ercc07/emas-2900/sup28asrce_fast41s.txt ====
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ercc07/emas-2900/wichtests_wt61.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    X := 3.2;
    I := - 2;
    OUTREAL(99, I^X)
'END'

==== ercc07/emas-2900/wichtests_wt62.txt ====
'BEGIN'
    'COMMENT' LIBRARY 99;
    'INTEGER'
        I,
        J;
    I := 0;
    J := - 2;
    OUTREAL(99, I^J)
'END'

==== ercc07/emas-2900/sup27bsrce_oper34s.txt ====
! %CONSTSTRING(15)VSN = "OPER34 29/5/81"; ! ****************************************
%IF (MONLEVEL >> 1) & 1 = YES %START
      %EXTRINSICLONGINTEGER KMON
      %OWNINTEGER OPMON; ! COPY OF KMON BIT
      %CONSTINTEGER KMONNING = YES
%FINISH %ELSE %START
      %CONSTINTEGER KMONNING = NO
%FINISH
!
%IF MONLEVEL & 1 = YES %START
      %CONSTINTEGER VIDEO UPDATING = YES
      %OWNINTEGER OPER FACILITIES
%FINISH %ELSE %START
      %CONSTINTEGER VIDEO UPDATING = NO
%FINISH
!
!
!
%RECORDFORMAT PF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%RECORDFORMAT MP F(%INTEGER DEST,SRCE,%STRING(23)TXT)
!*

==== ercc07/emas-2900/wichtests_wt63.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    X := 0.0;
    I := - 2;
    OUTREAL(99, X^I)
'END'

==== ercc07/emas-2900/isup2s.txt ====
!
%include "ercc07.ibmsup_page0"
!
! These const integers define sizes and layout of important tables
! they have to be here to be global to all routines including I/O ones
!
%constlonginteger DISAWAIT=PSW0!X'2000000000000'
%constlonginteger ALLOW INTS=x'0306000000000000'
%constlonginteger ONE SECOND=x'00000000F4240000'
!
%ownlonginteger PSW,WPSW,L
!
%include "ercc07.ibmsup_lcform1s"
!
%externalintegerfnspec REQUEST INPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec REQUEST OUTPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec CHANGE CONTEXT
%externalroutine SUP01
!-----------------------------------------------------------------------
%ownstring (3) SUPID="01A"
!---------------------

==== ercc07/emas-2900/wichtests_wt64.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER''PROCEDURE' P(B);
        'VALUE'
            B;
        'BOOLEAN'
            B;
        P := ('IF' B 'THEN' 1 'ELSE' 3.3) 'DIV' 6;
    OUTREAL(99, P('TRUE'));
    OUTREAL(99, P('FALSE'))
'END'

==== ercc07/emas-2900/wichtests_wt65.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J;
    I := 2;
    J := 3;
    OUTREAL(99, I^J 'DIV' J)
'END'

==== ercc07/emas-2900/wichtests_wt66.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J,
        K,
        CASE;
    'PROCEDURE' EQUAL(I, J);
        'VALUE'
            I,
            J;
        'INTEGER'
            I,
            J;
        'IF' I # J 'THEN'
            'BEGIN'
            OUTREAL(99, CASE);
            OUTREAL(99, I);
            OUTREAL(99, J)
            'END'
        'ELSE'

==== ercc07/emas-2900/wichtests_wt67.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J;
    I := 3;
    J := - 2;
    OUTREAL(99, (81 * I^J) 'DIV' 2);
'END'

==== ercc07/emas-2900/drsgen02s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/emas-2900/wichtests_wt68.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3,
        S4;
    'FOR' I := 1 'STEP' 1 'UNTIL' 4 'DO'
        'BEGIN'
        'GOTO' S[I];
        S1 :;
        'IF' I # 1 'THEN'
            OUTREAL(99, I)
        'ELSE'
            'GOTO' EXIT;
        S2 :;
        'IF' I # 2 'THEN'
            OUTREAL(99, I)
        'ELSE'

==== ercc07/emas-2900/wichtests_wt69.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3,
        S4;
    'FOR' I := 1,
        2,
        3 'DO'
        'BEGIN'
        'GOTO' S[I];
        S1 :;
        'IF' I # 1 'THEN'
            OUTREAL(99, I)
        'ELSE'
            S2 : 'IF' I # 2 'THEN'
                OUTREAL(99, I)
        'END';

==== ercc07/emas-2900/wichtests_wt70.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'SWITCH' S :=
        S1,
        S2,
        S3;
    I := 1;
    'GOTO' S[I];
    'FOR' I := 1,
        2,
        3 'DO'
        'BEGIN'
        S1 :;
        OUTREAL(99, 10);
        S2 :;
        OUTREAL(99, 20);
        OUTREAL(99, I)
        'END';
    S3 :;

==== ercc07/emas-2900/sup27bsrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%END
%ENDOFFILE

==== ercc07/emas-2900/wichtests_wt71.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        CASE;
    'BOOLEAN'
        B;
    'REAL'
        X;
    'INTEGER''PROCEDURE' P(K, Q);
        'VALUE'
            K;
        'INTEGER'
            K;
        'INTEGER''PROCEDURE'
            Q;
        'COMMENT' (X1) : 'VALUE' X1 : 'REAL' X1 ;
        P :=
            'IF' K = 1 'THEN'
                Q(I)
            'ELSE' 'IF' K = 2 'THEN'

==== ercc07/emas-2900/impalgs_cputimes.txt ====
%EXTERNALINTEGERFNSPEC DCPUTIME
%EXTERNALLONGREALFN REALCPUTIME
      %RESULT=DCPUTIME/1000
%END
%ENDOFFILE

==== ercc07/emas-2900/wichtests_wt72.txt ====
'BEGIN'
    'COMMENT' LIBRARY 3;
    'INTEGER'
        I,
        CASE;
    'BOOLEAN'
        B;
    'REAL'
        X;
    'INTEGER''PROCEDURE' P(K, Q);
        'VALUE'
            K;
        'INTEGER'
            K;
        'INTEGER''PROCEDURE'
            Q;
        'COMMENT' (X1) : 'VALUE' X1 : 'INTEGER'X1 ;
        P :=
            'IF' K = 1 'THEN'
                Q(I)
            'ELSE' 'IF' K = 2 'THEN'

==== ercc07/emas-2900/wichtests_wt73.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I,
        J,
        K,
        K1;
    'REAL'
        T1,
        T2;
    'INTEGER''PROCEDURE' ACKERMANN(M, N);
        'VALUE'
            M,
            N;
        'INTEGER'
            M,
            N;
        ACKERMANN :=
            'IF' M = 0 'THEN'
                N + 1
            'ELSE' 'IF' N = 0 'THEN'

==== ercc07/emas-2900/ibm_imp01s.txt ====
%MAINEP ICL9CEZIBMIMP
%TRUSTEDPROGRAM
%BEGIN
%CONSTINTEGER RELEASE=1
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER USE IMP=NO
%CONSTINTEGER VMEB=NO
%CONSTSTRING(9) LADATE="30 Nov 81";       ! LAST ALTERED
%INTEGER I, J, K
! PRODUCED BY OLDPS FROM IBM_PS02 ON 06/01/82
%CONSTBYTEINTEGERARRAY CLETT(0: 454)=   1,
  40,   1,  41,   1,  42,   1,  44,   2, 201, 198,   6, 213, 206, 204,
 197, 211, 211,   5, 215, 200, 201, 204, 197,   5, 213, 206, 212, 201,
 204,   3, 198, 207, 210,   1,  61,   5, 193, 204, 201, 193, 211,   7,
 201, 206, 212, 197, 199, 197, 210,   4, 210, 197, 193, 204,   4, 204,
 207, 206, 199,   4, 194, 217, 212, 197,   6, 211, 212, 210, 201, 206,
 199,   5, 211, 200, 207, 210, 212,   6, 210, 197, 195, 207, 210, 196,
   7, 210, 207, 213, 212, 201, 206, 197,   2, 198, 206,   3, 205, 193,
 208,   8, 198, 213, 206, 195, 212, 201, 207, 206,   4, 206, 193, 205,
 197,   9, 193, 210, 210, 193, 217, 206, 193, 205, 197,   9, 207, 198,
 208, 210, 207, 199, 210, 193, 205,   6, 207, 198, 198, 201, 204, 197,

==== ercc07/emas-2900/isup3s.txt ====
!
%include "ercc07:ibmsup_page0"
!
! These const integers define sizes and layout of important tables
! they have to be here to be global to all routines including I/O ones
!
%constlonginteger DISAWAIT=PSW0!X'2000000000000'
%constlonginteger ALLOW INTS=x'0306000000000000'
%constlonginteger ONE SECOND=x'00000000F4240000'
!
%ownlonginteger PSW,WPSW,L
!
%include "ercc07:ibmsup_lcform2s"
!
%externalintegerfnspec REQUEST INPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec REQUEST OUTPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec CHANGE CONTEXT
%externalroutine SUP01
!-----------------------------------------------------------------------
%ownstring (3) SUPID="01A"
!---------------------

==== ercc07/emas-2900/wichtests_wt74.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        N;
    N := 3;
    'BEGIN'
        'ARRAY'
            A[1 : 'IF' N = 3 'THEN' 3 'ELSE' - 100];
        'INTEGER'
            N;
        N := 2;
        OUTREAL(99, N);
    'END';
    OUTREAL(99, N)
'END'

==== ercc07/emas-2900/newpackdts.txt ====
!***********************************************************************
!*                                                                     *
!* THESE FUNCTIONS ALL USE A PACKED FORMAT OF DATE AND TIME OF ONE OF  *
!* THE FOLLOWING FORMS.BITS ARE NUMBERED FROM 31 (MOST SIGNIFICANT) TO *
!* 0 (LEAST SIGNIFICANT)                                               *
!* OLD FORMAT                                                          *
!* BITS    USE                                                         *
!* 31      ZERO FOR OLD FORMAT                                         *
!* 30-26  YEAR-70  (VALID FOR 1970-2033)                               *
!* 25-22  MONTH                                                        *
!* 21-17  DAY                                                          *
!* 16-12  HOUR                                                         *
!* 11- 6  MINUTE                                                       *
!*  5- 0  SECOND                                                       *
!*                                                                     *
!*  NEW FORMAT                                                         *
!*  BIT31 1 FOR NEW FORMAT                                             *
!*    ALL OTHER BITS HOLD DT AS SECS SINCE 0000HRS ON 1/1/70           *
!*    CALCULATED AS PER CACM COLLECTER ALGORITHMS NO 199Z              *
!*    NB TO KEEP LEAP YEARS CORRECT ONE MUST USE THIS ALGORITH FROM    *
!*    1ST JAN 1900 AND THEN CORRECT. THIS INVOLVES 64BIT ARITHMETIC    *

==== ercc07/emas-2900/wichtests_wt75.txt ====
'BEGIN'
    'COMMENT' LIBRARY 9;
    'INTEGER''ARRAY'
        EQ[1 : 3];
    'INTEGER'
        I;
    'REAL'
        X,
        Y;
    'PROCEDURE' INC(A, B);
        'VALUE'
            A,
            B;
        'REAL'
            A,
            B;
        'IF' A < B 'THEN'
            EQ[1] := EQ[1] + 1
        'ELSE' 'IF' A = B 'THEN'
            EQ[2] := EQ[2] + 1
        'ELSE'

==== ercc07/emas-2900/sup26esrce_gpc33s.txt ====
%CONSTSTRING(25) VSN = "GPC33 10TH SEP 80"; ! ************************************************GPC GPC GPC
!
!   EMAS 2900 SUPERVISOR NOTE
!                                           No: 5
!                                         Date: 21/05/80
!                                       Author: A.Gibbons
!
!
! %EXTERNAL ROUTINE GPC(%RECORDNAME P)
!
! 1. CONVENTIONS
! The record spec for the parameter is
!   %RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
! where
!   DEST is considered as two half words DSNO and DACT. DSNO
!        must be GPC's DSNO 
!        DACT is set according to the function required.
!
!   SRCE is considered as two halfwords SSNO and SACT.
!        SSNO is SNO of ORIGINATOR and SACT is DACT for
!        the reply.

==== ercc07/emas-2900/sup28asrce_releasen.txt ====

         Supervisor 28A Release Notice

      This Supervisor has the following changes

==== ercc07/emas-2900/wichtests_wt76.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL'
        X,
        Y;
    'INTEGER'
        I,
        J;
    'ARRAY'
        A[1 : 10];
    X := Y := 1.0;
    I := J := 0;
    'BEGIN'
        'SWITCH' A := A1,A2,A3;
        'PROCEDURE' P;
            'BEGIN'
            X := 20;
            I := X + Y;
            Q(A[3], I + J)
            'END';
        'PROCEDURE' Q(L, K);

==== ercc07/emas-2900/perq_imp01s.txt ====
%MAINEP ICL9CEZPERQIMP
%TRUSTEDPROGRAM
%BEGIN
%CONSTINTEGER RELEASE=1
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER ON PERQ=NO
%CONSTSTRING(9) LADATE="3 Dec 81";       ! LAST ALTERED
%INTEGER I, J, K
%CONSTINTEGER NO OF SNS=63
%CONSTINTEGER LRLPT=X'52'
!
! FIXED GLA CURRENTLY USED AS FOLLOWS
!     0-7   FREE(WAS 2900 ENTRY DESCRIPTOR)
!     8-11  ADDRESS OF UNSHARED SYMBOL TABLES
!     12-15 ADDRESS OF SHARED SYMBOL TABLES
!     16-19 LANGUAGE & COMPILER DATA
!     20-23 RESERVED (BUT IN MAIN PROGS IS FILLED WITH STACKPTR@ENTRY)
!     24-27 ADDRESS OF CONSTANT TABL
!     28-31 ADDRESS OF A WORD CONTAINING STACKTOP  0FOR NO CHECKS
!     32-39 FREE
!     40-55 DEFINES THE ENTRY POINT OF MDIAGS

==== ercc07/emas-2900/wichtests_wt77.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        SUM;
    'PROCEDURE' P1(S, R, I, B, RA, IA);
        'STRING'
            S;
        'REAL'
            R;
        'INTEGER'
            I;
        'BOOLEAN'
            B;
        'REAL' 'ARRAY'
            RA;
        'INTEGER''ARRAY'
            IA;
        SUM := SUM + R + I + ('IF' B 'THEN' 1 'ELSE' 0) + RA[1] +
            IA[1];
    'PROCEDURE' P2(BA, L, SW, PR, RPR, IPR, BPR);
        'BOOLEAN' 'ARRAY'

==== ercc07/emas-2900/drsgen03s.txt ====
!
! Warning this module has the revised triples spec.
!
! In first attempt at Triple Imp considerable use was made of constant operands
! to pass information from Pass2 to GEN. Although for specialised operations like
! passing Labels this still applies, this adhocery has caused problems with arrays
! and pointers particularly in mapped records. The operands for four triples
! have thus been redefined in a more standard way.
!
! GETPTR    X1 is now (ptype of passed)<<16! DIMENSION
!           Opnd2 is either a 32 bit const with the size (ACC) as value or
!           the ptr or arrayhead as normal operand.
!
! VMY       X1 is now dim<<28!maxdim<<24!array name(where known)
!           Opnd2 is either a 32 bit const with DV offset into const area or
!           the arrayhead as a standard operand
!
! AINDX     X1 is ELSIZE<<20 !spare
!           Opnd2 is arrayhead as standard operand
!           NOTE:- The Operands have been swopped for consistency with norm.
!

==== ercc07/emas-2900/wichtests_wt78.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        SUM;
    'PROCEDURE' P1(S, R, I, B, RA, IA);
        'STRING'
            S;
        'REAL'
            R;
        'INTEGER'
            I;
        'BOOLEAN'
            B;
        'REAL' 'ARRAY'
            RA;
        'INTEGER''ARRAY'
            IA;
        SUM := SUM + R + I + ('IF' B 'THEN' 1 'ELSE' 0) + RA[1] +
            IA[1];
    'PROCEDURE' P2(BA, L, SW, PR, RPR, IPR, BPR);
        'BOOLEAN' 'ARRAY'

==== ercc07/emas-2900/pnxponeas.txt ====
%CONSTINTEGER YES=1,NO=0
%CONSTINTEGER EMAS=10
%CONSTINTEGER PERQ=11
%CONSTINTEGER PUNIX=12
%CONSTINTEGER HOST=EMAS
%CONSTINTEGER TARGET=PERQ
%CONSTINTEGER LINTAVAIL=1<<EMAS
%CONSTINTEGER LLREALAVAIL=1<<EMAS
! PRODUCED BY OLDPS FROM TRIMP_PNXPS01 ON 06/09/83
%CONSTBYTEINTEGERARRAY CLETT(0: 436)=   1,
  40,   1,  41,   1,  42,   1,  44,   2, 201, 198,   6, 213, 206, 204,
 197, 211, 211,   5, 215, 200, 201, 204, 197,   5, 213, 206, 212, 201,
 204,   3, 198, 207, 210,   1,  61,   5, 193, 204, 201, 193, 211,   7,
 201, 206, 212, 197, 199, 197, 210,   4, 210, 197, 193, 204,   4, 204,
 207, 206, 199,   4, 194, 217, 212, 197,   6, 211, 212, 210, 201, 206,
 199,   4, 200, 193, 204, 198,   5, 211, 200, 207, 210, 212,   6, 210,
 197, 195, 207, 210, 196,   7, 210, 207, 213, 212, 201, 206, 197,   2,
 198, 206,   3, 205, 193, 208,   8, 198, 213, 206, 195, 212, 201, 207,
 206,   4, 206, 193, 205, 197,   9, 193, 210, 210, 193, 217, 206, 193,
 205, 197,   9, 207, 198, 208, 210, 207, 199, 210, 193, 205,   6, 207,
 198, 198, 201, 204, 197,   6, 207, 198, 204, 201, 211, 212,   6, 198,

==== ercc07/emas-2900/wichtests_wt79.txt ====
'BEGIN'
    'INTEGER'
        I;
    'REAL'
        R;
    'BOOLEAN'
        B;
    'ARRAY'
        A1[1 : I + B],
        A2[2 : 4, 5 : 7];
    'SWITCH' S :=
        'IF' R * P0 < 0 'THEN' L 'ELSE' L2;
    'PROCEDURE' P0;
        R := I 'DIV' R;
    'PROCEDURE' P1(F);
        'REAL'
            F;
        B := I + R;
    L :;
    B := I > S;
    B := B 'OR' P0;

==== ercc07/emas-2900/sup26hsrce_comms48s.txt ====

!                 VERSION OF 13/06/80
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ercc07/emas-2900/perq_newimpl.txt ====
PARM NOCHECK
IMP80 PERQ_PASSONES,PASSONEY,.LP,.OUT
IMP80 PERQ_IMP01S,PERQY,.LP,.OUT
IMP80 PERQ_CSUPS,PERQCSUPY,.LP,.OUT
OBEY PERQ_LINK

==== ercc07/emas-2900/sup25jsrce_documentn.txt ====



This partitioned file contains all the source required to make up a
version 25I Supervisor, plus the version of the IMP compiler used at
Edinburgh to do so.  This compiler is necessary as some advanced
compiler features are required which are not available in the service
compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Three "OBEY" subfiles are available: MAKECHKD, MAKEOPT and MAKERACER.
They each construct a test Supervisor which is left in file SUP25xT,
where x is 'C', 'O' or 'R' respectively.

The fixing utility is in CONLIB.GENERAL, which must be in the user's
"SEARCHDIR" list. A COPY IS INCLUDED IN THIS FILE IN CASE OF PROBLEMS.


Making a Supervisor thus consists of the following:

==== ercc07/emas-2900/impmess2.txt ====
1 "%REPEAT is not required"
2 "Label & has already been set in this block"
4 "& is not a Switch name at current textual level"
5 "Switch name & in expression or assignment"
6 "Switch label &(#) set a second time"
7 "Name & has already been declared"

8 "Routine or fn & has more parameters than specified"
9 "Parameter # of & differs in type from specification"
10 "Routine or fn & has fewer parameters than specified"
11 "Label & referenced at line # has not been set"
12 "%CYCLE at line # has two control clauses"
13 "%REPEAT for %CYCLE at line # is missing"
14 "%END is not required"
15 "# %ENDs are missing"
16 "Name & has not been declared"
17 "Name & does not require parameters or subscripts"
18 "# too few parameters provided for &"
19 "# too many parameters provided for &"
20 "# too few subscripts provided for array &"
21 "# too many subscripts provided for array &"

==== ercc07/emas-2900/sup28dsrce_enter15s.txt ====
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%RECORDFORMAT SERVAF(%INTEGER P, C)
%EXTERNALINTEGERSPEC INPTR
%EXTERNALINTEGERSPEC OUTPTR
%CONSTINTEGER MASK=X'80FC3FFF'
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC HOOT(%INTEGER NUM)
%EXTERNALROUTINESPEC GDC(%RECORD(PARMF)%NAME P)
%IF SSERIES=NO %START
   %EXTERNALINTEGERFNSPEC GPC INIT(%INTEGER CA,PT,MODE)
%FINISH
%EXTERNALINTEGERFNSPEC SAFE IS READ(%INTEGER ISAD,%INTEGERNAME VAL)
%EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1)
%EXTERNALROUTINESPEC SUP29
%EXTERNALROUTINESPEC SUPPOFF(%RECORD(SERVAF)%NAME SERV, %C
      %RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC DISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PDISC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORD(PARMF)%NAME P)
!*

==== ercc07/emas-2900/wichtests_wt80.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'INTEGER''ARRAY'
        A[1 : 10];
    I := 1;
    'FOR' A[I] := 1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10 'DO'
        I := I + 1;
    'FOR' I := 1 'STEP' 1 'UNTIL' 10 'DO'
        'IF' A[I] # I 'THEN'
            OUTREAL(99, I);

==== ercc07/emas-2900/sup27fsrce_makechkd.txt ====
PARM FREE,NOCHECK,NOLIST,STACK
IMP80 CTOPT+SUP27FSRCE_SUP27FS,SUPZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_COM33S,COMZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_PRINT07S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_OPER35S,OPERZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_ENTER12S,ENTERZZ,,.OUT
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP27FSRCE_GPC38S,GPCZZ,,.OUT
IMP80 SUP27FSRCE_NDIAG07S,NDIAGZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_COMMS49S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_FAST38S,FASTZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_TAPE73S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
NDIAGZZ

==== ercc07/emas-2900/wichtests_wt81.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'ARRAY'
        V,
        A,
        C[1 : 1];
    'INTEGER'
        K;
    'INTEGER''PROCEDURE' I;
        'BEGIN'
        I := 1;
        K := K + 1
        'END';
    K := 0;
    A[I] := 1;
    C[I] := 3;
    'FOR' V[I] := A[I] 'STEP' A[I] 'UNTIL' C[I] 'DO'
        ;
    OUTREAL(99, K)
'END'

==== ercc07/emas-2900/sup27csrce_documentn.txt ====



This partitioned file contains all the source required to make up
an EMAS2900 Supervisor, plus the version of the IMP80 compiler and FIX
utility used at Edinburgh to do so.  This compiler is necessary as some
advanced language features are required which are not available in the
service compiler.

Note that the OPTION NOBRACKETS must be in force in the process being
used for the method described to work.

Two "OBEY" subfiles are available: MAKECHKD and MAKEOPT.  They each
construct a test Supervisor which is left in file SUP27xT,  where x is
'C' or 'O' respectively.


Making a Supervisor thus consists of the following:

a) INSERT the IMP80 compiler and FIX utility into the current directory
   (and then log off and log on again if IMP80 was previously used in

==== ercc07/emas-2900/sup27csrce_print07s.txt ====

%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, P6)
%EXTRINSICLONGINTEGER KMON
%ROUTINESPEC PRHEX(%INTEGER H)
%ROUTINESPEC PRINTER(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC PON(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC GPC(%RECORD(PARMF)%NAME P)
%EXTERNALROUTINESPEC OPMESS(%STRING (23) MESS)
%SYSTEMROUTINESPEC ITOE(%INTEGER A, L)
%IF MULTIOCP=YES %THEN %START
%EXTERNALROUTINESPEC SEMALOOP(%INTEGERNAME SEMA)
      %ROUTINESPEC RESERVE LOG
      %ROUTINESPEC RELEASE LOG
      %ROUTINESPEC AWAIT LOG ROUTE
%FINISH
!------------------------------------------------------------------------
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20L ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DLVNADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C

==== ercc07/emas-2900/wichtests_wt82.txt ====
'BEGIN'
    'COMMENT' LIBRARY5;
    'INTEGER''PROCEDURE' NONE;
        NONE := 1;
    NONE;
    SIN(1.0);
    ABS(3);
    LN(.2);
    EXP(4);
    ENTIER(NONE);
    SIGN(SQRT(8));
    OUTREAL(99, NONE)
'END'

==== ercc07/emas-2900/sup27fsrce_tape73s.txt ====

!**************************************************
!*                                                *
!*  TAPE HANDLER FOR 2900                         *
!*                                                *
!**************************************************
!!
!***********************************************************************
!* VERSION 73:
!* PRIVATE CHAINS REDONE - P_P3=VADD RCB, P5,P6=STB FOR RCB AREA.
!* ALSO ALL ATTENTIONS FOR PRIVATE CHAINS GO STRAIGHT TO USER
!* WITHOUT ANY ACTION HERE.
!* VERSION 72
!* 05-MAY-81:
!*    HAIRY PON TO RESET 'RETRY PREAMBLE' WHICH ALLOWS/INHIBITS
!*    READ RETRY WHEN NO PREAMBLE DETECTED.
!*    MAINLY INTENDED FOR READING DUMP TAPES WITH SUCH.
!* 04-MAY-81:
!*    FIX IN LOAD AND LOAD MESSAGE FOR FAULTY DSN.
!*    REWINDS AND COMES UP AS LOADED NO LABEL.
!* 01-MAY-81:

==== ercc07/emas-2900/wichtests_wt83.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        NN;
    'SWITCH' A :=
        B[1],
        B[2];
    'SWITCH' B :=
        A[G],
        A[2];
    'INTEGER''PROCEDURE' F(N, S);
        'VALUE'
            N;
        'INTEGER'
            N;
        'SWITCH'
            S;
        'BEGIN'
        NN := N;
        'GOTO' S[1];
        F := NN

==== ercc07/emas-2900/sup26isrce_enter09s.txt ====

%EXTRINSICINTEGER INPTR
%EXTRINSICINTEGER OUTPTR
%CONSTINTEGER MASK=X'80FC3FFF'
%EXTERNALINTEGERFNSPEC HANDKEYS
%EXTERNALROUTINESPEC HOOT(%INTEGER NUM)
%EXTERNALINTEGERFNSPEC GPC INIT(%INTEGER CA,PT,MODE)
%EXTERNALINTEGERFNSPEC SAFE IS READ(%INTEGER ISAD,%INTEGERNAME VAL)
%EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1)
%EXTERNALROUTINESPEC SUP29
%EXTERNALROUTINESPEC SUPPOFF(%RECORDNAME SERV,P)
%EXTERNALROUTINESPEC DISC(%RECORDNAME P)
%EXTERNALROUTINESPEC PDISC(%RECORDNAME P)
%EXTERNALROUTINESPEC GPC(%RECORDNAME P)
%EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J)
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORDNAME P)
%SYSTEMROUTINESPEC MOVE(%INTEGER L, FROMAD, TOAD)
%RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5,  %C
         P6)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20L ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C

==== ercc07/emas-2900/ndiag07s.txt ====

!*_ DATED 11 NOV 76   1
! ALTERATIONS BY K.YARWOOD ...
!        PRINT FL AND NEXT SYMBOL LINES COMMENTED OUT
!        PRINTTEXT'S TURNED TO PRINTSTRING'S
!        ADDITION FOR LONGINTEGER IN RT PRINT VAR
!         HEX EQUIVALENTS FOR INTS,LONGINTS ETC PRINTED
!        INF PRINTED IN HEX IN RT ERRMESS

%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%EXTERNALSTRING(8)%FNSPEC STRINT(%INTEGER I)
%CONSTINTEGER STACKBASE=X'80100000';  ! START OF RESIDENT STACK
! %SYSTEMROUTINESPEC SIGNAL(%INTEGER I, J, K, %INTEGERNAME F)
%ROUTINESPEC PRINTMESS(%INTEGER N)
! %SYSTEMROUTINESPEC TIDY EXIT
!*
%ROUTINESPEC INDIAG(%INTEGER OLDLNB, L, PC, %INTEGERNAME NEWLNB)
! %ROUTINESPEC FDIAG(%INTEGER OLDLNB,PC,%INTEGERNAME NEWLNB)
%ROUTINESPEC ERMESS(%INTEGER N, INF)
! %ROUTINESPEC ICL9CELABELS


==== ercc07/emas-2900/isup4s.txt ====
%include "ercc08:ctoptv7"
!
%include "ercc07:ibmsup_page0"
!
! These const integers define sizes and layout of important tables
! they have to be here to be global to all routines including I/O ones
!
%constlonginteger DISAWAIT=PSW0!X'2000000000000'
%constlonginteger ALLOW INTS=x'0306000000000000'
%constlonginteger ONE SECOND=x'00000000F4240000'
!
%ownlonginteger PSW,WPSW,L
!
%include "ercc07:ibmsup_lcform3s"
!
%externalintegerfnspec REQUEST INPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec REQUEST OUTPUT(%integer OUTPUT POSN,TRIGGER POSN)
%externalintegerfnspec CHANGE CONTEXT
%externalroutine SUP01
!-----------------------------------------------------------------------
%ownstring (3) SUPID="01A"

==== ercc07/emas-2900/wichtests_wt84.txt ====
'BEGIN'
'COMMENT' LIBRARY 3;
'INTEGER'I,CL,N,REP;
'ARRAY' R,A,B[1:30],C[1:10];
'REAL' J,ROOT,X;
'INTEGER''PROCEDURE' EVEN(X);
    'VALUE' X;
    'INTEGER'X;
    EVEN:='IF' X'DIV'2*2 = X 'THEN' 1 'ELSE' -1;
'PROCEDURE' GAMM(R,A,B,C);
    'ARRAY' R,A,B,C;
    'BEGIN'    'INTEGER'REP,I,CL;
        'REAL' J,ROOT,X;
        REP:=100*N;
        OUTREAL(99,CPUTIME);
        'FOR' CL:= 1 'STEP' 1 'UNTIL' REP 'DO'
            ;
        OUTREAL(99,CPUTIME);
        REP:=N;
        OUTREAL(99,CPUTIME);
        'FOR' CL:=1 'STEP' 1 'UNTIL' REP 'DO'

==== ercc07/emas-2900/wichtests_wt85.txt ====
'BEGIN'
'COMMENT' LIBRARY 1;
    'REAL'
        X,
        Y;
    'PROCEDURE' DUM;
        ;
    'REAL' 'PROCEDURE' A;
        A := X + ('IF' B 'THEN' 1 'ELSE' 0);
    'BOOLEAN'
        B;
    S2 :;
    B := (('TRUE'));
    G :;
    'BEGIN'
        'INTEGER'
            I;
        X := - 3;
        'IF' 'NOT' B 'THEN'
            'GOTO' S2;
        I := 1;

==== ercc07/emas-2900/wichtests_wt86.txt ====
'BEGIN'
PROG :
'BEGIN'
'COMMENT' LIBRARY 1;
    'INTEGER'N,I;
    'PROCEDURE' Q;
        'BEGIN'
        'ARRAY'
            A,
            D[1 : 1, 1 : N],
            E[0 : 0];
        'PROCEDURE' P(X, L);
            'LABEL'
                L;
            'INTEGER''PROCEDURE'
                X;
                'COMMENT' (F1,G1): 'VALUE' F1: 'REAL' F1,G1;
            B : 'FOR' I := 1 'STEP' 1 'UNTIL' N,
                I + 1 'DO'
                C : 'GOTO'
                    'IF' X(A[1, 1] + I, 0) = 0 'THEN'

==== ercc07/emas-2900/wichtests_wt87.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    I := 1;
    'FOR' X := .1 'STEP' X 'UNTIL' 1.0&6 'DO'
        I := I + 1;
    OUTREAL(99, I)
'END'

==== ercc07/emas-2900/wichtests_wt88.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        A;
    'INTEGER''PROCEDURE' F(X, Y);
        'VALUE'
            X,
            Y;
        'INTEGER'
            X,
            Y;
        A := F := X + 1;
    'INTEGER''PROCEDURE' G(X);
        'INTEGER'
            X;
        X := G := A + 2;
    A := 0;
    OUTREAL(99, A + F(A, G(A)) / G(A))
'END'

==== ercc07/emas-2900/sup27fsrce_makeopt.txt ====
PARM FREE,OPT,STACK,NOLIST
IMP80 CTOPT+SUP27FSRCE_SUP27FS,SUPZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_COM33S,COMZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_PRINT07S,PRINTZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_OPER35S,OPERZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_ENTER12S,ENTERZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_GPC38S,GPCZZ,,.OUT
IMP80 SUP27FSRCE_MINDIAGS,MINDIAGZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_COMMS49S,COMMSZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_FAST38S,FASTZZ,,.OUT
IMP80 CTOPT+SUP27FSRCE_TAPE73S,TAPEZZ,,.OUT
PARM MAP
LINK
SUPZZ
COMZZ
PRINTZZ
OPERZZ
ENTERZZ
GPCZZ
MINDIAGZZ
COMMSZZ

==== ercc07/emas-2900/wichtests_wt89.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL'
        I,
        J;
    'ARRAY'
        A[1 : 2, 1 : 3];
    'REAL' 'PROCEDURE' GPS(I, N, Z, V);
        'REAL'
            I,
            N,
            Z,
            V;
        'BEGIN'
        'FOR' I := 1 'STEP' 1 'UNTIL' N 'DO'
            Z := V;
        GPS := 1
        'END';
    OUTREAL(99, GPS(J, 3.0, I, GPS(I, 2.0, A[I, J], I + J)));
    'FOR' I := 1 'STEP' 1 'UNTIL' 2 'DO'
        'FOR' J := 1 'STEP' 1 'UNTIL' 3 'DO'

==== ercc07/emas-2900/wichtests_wt90.txt ====
'BEGIN'
'COMMENT' LIBRARY5;
    'REAL'
        R;
    'BOOLEAN'
        B;
    'INTEGER''PROCEDURE' F(X);
        'REAL'
            X;
        F := 0;
    'INTEGER'
        I,
        N,
        S;
    'INTEGER''PROCEDURE' G(Y);
        'BOOLEAN'
            Y;
        G :=
            'IF' Y 'THEN'
                2
            'ELSE'

==== ercc07/emas-2900/wichtests_wt91.txt ====
'BEGIN'
    'COMMENT'   ET COMMENT;
    'COMMENT' LIBRARY 1;
    'REAL'
        C;
    'ARRAY'
        D[ - 0 : + 1, 0&0 : 1.0];
    'INTEGER''PROCEDURE' R(C);
        'REAL'
            C;
        R :=
            'IF' 'TRUE' 'THEN'
                C
            'ELSE'
                R(0);
    D[0, 0] := C := C := 1;
    'COMMENT' PROGRAM MODIFIED TO AVOID USE BEFORE DECLARATION;
    'BEGIN'
        'INTEGER''ARRAY'
            H,
            A[1 : C+D[0,1-(R(+1))]],

==== ercc07/emas-2900/wichtests_wt92.txt ====
'BEGIN'
'COMMENT' LIBRARY 1;
    'INTEGER'
        N;
    'INTEGER''PROCEDURE' P(Q, R);
        'INTEGER''PROCEDURE' Q;
        'COMMENT'   (R):'INTEGER''PROCEDURE' R;
        'INTEGER''PROCEDURE' R;
        'BEGIN'
        'INTEGER'
            B;
        B := 3 * Q(R);
        P := B
        'END';
    'INTEGER''PROCEDURE' A(F);
        'INTEGER''PROCEDURE'
            F;
        A := 2 * F;
    'INTEGER''PROCEDURE' B;
        'BEGIN'
        N := N - 1;

==== ercc07/emas-2900/nrsrce_sdisc02s.txt ====

%OWNLONGINTEGER VSN=X'5344495343205631';     ! M'SDISC V1'
! DRIVING DISCS VIA DCU WRITTEN BY PDS JAN 79
!
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 18D ONWARDS *
! Alterations from above-mentioned record format, for the S-series, are
! as follows:
!     GPCTABSIZE  ->   DCUTABSIZE
!     GPCA        ->   DCUA
!     SMACS       ->   SCUS
!     GPCCONFA    ->   DCUCONFA
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,DCUTABSIZE,DCUA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,KLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,PROCMON,DQADDR,  %C
         SACPORT,OCPPORT,ITINT,CONTYPEA,DCUCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SCUS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER SPDRQ,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,SP0,SP1,SP2,SP3, %C

==== ercc07/emas-2900/drsimpcmds.txt ====
%externalintegermapspec Comreg%alias "S#COMREG"(%integer N)
%externalroutinespec compile%alias "S#COMPILE"(%string(255) s, %string(31) entry,
%integername flag)
%externalstringfnspec failuremessage %alias"s#failuremessage" (%integer n)
%externalroutine orionimp %alias "ORIONIMP"
%integer flag
%string(255) s
s=""
compile(s,"ICL(CEZORIONIMP",flag)
printstring(failuremessage(flag)) %and %stop %unless flag=0
%end
%externalroutine DRSIMP %alias "DRSIMP"
%integer flag
%string(32) File
compile(file,"ICL9CEZDRSIMP",flag)
printstring( failuremessage(flag)) %and %stop %unless flag=0
%return %unless comreg(24)=0 %or comreg(24)=8
%end
%externalroutine PERQ3IMP%alias "PERQ3IMP"
%integer flag
%string(32) File

==== ercc07/emas-2900/wichtests_wt93.txt ====
'BEGIN'
    'COMMENT' LIBRARY 3;
    'REAL' 'PROCEDURE' A(K, X1, X2, X3, X4, X5);
        'VALUE'
            K;
        'INTEGER'
            K;
        'REAL'
            X1,
            X2,
            X3,
            X4,
            X5;
        'BEGIN'
        'REAL' 'PROCEDURE' B;
            'BEGIN'
            K := K - 1;
            B := A := A(K, B, X1, X2, X3, X4)
            'END';
        'IF' K <= 0 'THEN'
            A := X4 + X5

==== ercc07/emas-2900/sup26gsrce_sup26gs.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) CHANGE SSERIES=NO TO SSERIES=YES IN CTOPTIONS FILE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=2048+255+LSTLEN; ! SIZE OF SMAE
                                        ! MADE UP OF 2049 FOR CBT
                                        ! LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT
%CONSTINTEGER LSTACKLEN=3;              ! LOCAL CONT. STACK ELEN

==== ercc07/emas-2900/fast41t.txt ====
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ercc07/emas-2900/wichtests_wt94.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        J,
        K,
        S;
    'INTEGER''PROCEDURE' F(N);
        'VALUE'
            N;
        'INTEGER'
            N;
        'BEGIN'
        'INTEGER'
            I,
            L;
        'FOR' I := N,
            S 'DIV' 2 'WHILE' S < 16 'OR' S = 28 'DO'
            'BEGIN'
            S := S + I + N;
            L := I
            'END';

==== ercc07/emas-2900/impalgs_algolps6ma.txt ====
43
D(NAME)
D(ICONST)
D(CONST)
D(ONAME)
D(COMTEXT))
D(S)
D(ENDTEXT)
D(TEXTTEXT)
D(NAMELIST)
D(HOLE)
D(MARK)
D(ONAMELIST)
D(UPSTCNT)
D(LETTERSTRING)
D(DOWN)
D(UP)
D(SCALARTYPE)
D(NOTENAME)
D(TYPE=A)
D(TYPE=B)

==== ercc07/emas-2900/wichtests_wt95.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL' 'PROCEDURE' G(X);
        'REAL'
            X;
        G := X + 1;
    'REAL' 'PROCEDURE' A(H);
        'REAL' 'PROCEDURE'
            H;
        'COMMENT'   (H1): 'REAL' H1;
        'BEGIN'
        'REAL' 'PROCEDURE' LOC(X);
            'REAL'
                X;
            LOC := H(G(X));
        A := LOC(0);
        'END' A;
    'REAL' 'PROCEDURE' B(F, H);
        'REAL' 'PROCEDURE'
            F;
        'COMMENT'   (F1): 'REAL' F1;

==== ercc07/emas-2900/wichtests_wt96.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'PROCEDURE' P(F);
        'REAL' 'PROCEDURE'
            F;
        'COMMENT'   (F1):'LABEL' F1;
        F((M));
    B1 :;
    'BEGIN'
        'REAL' 'PROCEDURE' Q(L);
            'LABEL'
                L;
            'BEGIN'
            'GOTO' L;
            Q := 0;
            OUTREAL(99, 1)
            'END';
        B2 :;
        'BEGIN'
            'REAL'
                I;

==== ercc07/emas-2900/ibmsup_lcform1s.txt ====
%constinteger LSTLEN=256;               ! LOCAL SEGMENT TABLE LENGTH
%constinteger CBTLEN=299;               ! LENGTH OF CBT TABLE
%constinteger CONTEXTL=176;             ! LENGTH OF AN IBM CONTEXT
%constinteger LCONTN=5;                 ! NO OF LOCAL CONTEXTS
!
                                        ! CONTEXTF A SORT OF SSN+1
%recordformat CONTEXTF(%longinteger PSW,{8}%integerarray GR(0:15),
      {72}FR(0:7),{104}CONTROLR(0:15),{168}%longinteger CPUTIMER)
                                        ! PARMF FOR PARAMETER PASSING(32 BYTES
%recordformat PARMF((%integer DEST,SRCE %OR %short DSNO,DACT,SSNO,SACT),
      (%integer P1,P2,P3,P4,P5,P6 %OR %integerarray P(1:6) %OR %C
      %string(6)USER,%byte INCAR,%string(15)INTMESS))
!
                                        ! SIGOUTPF FOR PASSING SIGNALS(48 BYTES)
%recordformat SIGOUTPF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,TYPE,SSN,SSNAD,SUSP)
!
                                        ! CBT THE CLAIMED BLOCK FORMAT
%recordformat CBTF(%integer DA,%short AMTX,%byte LNGTH,TAGS)
                                        ! CBT FLAGS DEFINED AS FOLLOWS
%constinteger NEW BLK=X'80';            ! BLOCK HAS BEEN JUST CREATED
%constinteger READONLY=X'40';           ! USERS REQUEST PROTECTION AGAINST WRITES

==== ercc07/emas-2900/wichtests_wt97.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        X,
        N,
        K;
    'REAL' 'PROCEDURE' SIGMA(I, K, L, T);
        'VALUE'
            L;
        'INTEGER'
            I,
            K,
            L;
        'REAL'
            T;
        'BEGIN'
        'REAL'
            X;
        X := 0;
        'FOR' I := K 'STEP' 1 'UNTIL' L 'DO'
            X := T + X;

==== ercc07/emas-2900/wichtests_wt98.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
    'REAL' 'PROCEDURE' R(A);
        'REAL'
            A;
        'BEGIN'
        'INTEGER''PROCEDURE' P(B, C);
            'INTEGER'
                B,
                C;
            P := B + C;
        R := P(A + 1, A)
        'END' R;
    'REAL'
        X;
    'BEGIN'
        'REAL'
            Y;
        Y := 4;
        X := R(R(Y + 1))
    'END';

==== ercc07/emas-2900/wichtests_wt99.txt ====
'BEGIN'
    'COMMENT' LIBRARY 1;
'COMMENT' THIS PROGRAM HAS BEEN MODIFIED TO AVOID USE BEFORE DECLARATION
         AND ALSO TO REMOVE THE TYPE CHANGES ON ARRAYS TO VALUE;
    'INTEGER''ARRAY'
        A[16384 : 16385, - 16383 : - 16382];
    'INTEGER'
        S;
    'ARRAY'
        B[1 : 2, 0 : 2];
    'PROCEDURE' P(A, B, C, D);
        'VALUE'
            B,
            C;
        'REAL'
            A,
            B;
        'ARRAY'
            C,
            D;
        'BEGIN'

==== ercc07/emas-2900/docs_edit.txt ====


      New Features in EMAS Editor
      ---------------------------

     A new version of the EMAS Editor (invoked by the Command EDIT) will be
introduced in October or when the 2988 hardware problems currently affecting
editors have been resolved. The most important of the new features is that the
Editor will save any editing when the process is closed down during an edit
session. The output will be written into a file E#EHA where it can be inspected
and copied to the required destination. Editing will no longer be lost for
communications breaks or user inactivity. The feature cannot guarantee to save
editing over system failures. Obviously at least one OCP, one disc controller
and the relevant file system disc must be operational before editing can be
saved. A report is left in the RECALL file whenever editing has been saved.

     Other commands changed are:

A,M (etc)  All text searching commands are now based on case independent text
           matching. Thus "M/Fred/" will move to "FRED" or "fred" as well as
           "Fred". The previous mode of case dependent matching can be restored

==== ercc07/emas-2900/fast42t.txt ====
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)

==== ercc07/emas-2900/akqtests.txt ====
//JOB (ERCC07,P.STEPHENS,T=240,L=8000)
//ALGOL
'BEGIN'
    'COMMENT' LIBRARY 1;
    'INTEGER'
        I;
    'REAL'
        X;
    X := 3.2;
    I := - 2;
    OUTREAL(99, I^X)
'END'
//RUN
//ALGOL
'BEGIN'
    'COMMENT' LIBRARY 99;
    'INTEGER'
        I,
        J;
    I := 0;
    J := - 2;

==== ercc07/emas-2900/sup26fsrce_com31s.txt ====
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20J ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,RATION,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,S2,S3,S4,END)
! MISC. ROUTINE SPECS
%EXTERNALROUTINESPEC PKMONREC(%STRING(20)TEXT,%RECORDNAME P)
%EXTERNALSTRING(8)%FNSPEC STRHEX(%INTEGER N)
%RECORDFORMAT PARMF(%INTEGER DEST,SRCE,P1,P2,P3,P4,P5,P6)
%EXTERNALROUTINESPEC OPMESS2(%INTEGER OP,%STRING(63)TXT)

==== ercc07/emas-2900/sup27isrce_fast40s.txt ====
!* Communications record format - extant from CHOPSUPE 21D onwards *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C
         HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3,  %C
         SDR4,SESR,HOFFBIT,BLOCKZBIT,BLKSHIFT,BLKSIZE,END)
!-----------------------------------------------------------------------
! PON & POFF ETC. DECLARATIONS

==== ercc07/emas-2900/ibmsup_lcform2s.txt ====
%constinteger LSTLEN=256;               ! LOCAL SEGMENT TABLE LENGTH
%constinteger CBTLEN=299;               ! LENGTH OF CBT TABLE
%constinteger CONTEXTL=176;             ! LENGTH OF AN IBM CONTEXT
%constinteger LCONTN=5;                 ! NO OF LOCAL CONTEXTS
!
                                        ! CONTEXTF A SORT OF SSN+1
%recordformat CONTEXTF(%longinteger PSW,{8}%integerarray GR(0:15),
      {72}FR(0:7),{104}CONTROLR(0:15),{168}%longinteger CPUTIMER,
      %integer ASYNI,SUSP,%short PECODE,ILC,%integer spare)
                                        ! PARMF FOR PARAMETER PASSING(32 BYTES
%recordformat PARMF((%integer DEST,SRCE %OR %short DSNO,DACT,SSNO,SACT),
      (%integer P1,P2,P3,P4,P5,P6 %OR %integerarray P(1:6) %OR %C
      %string(6)USER,%byte INCAR,%string(15)INTMESS))
!
                                        ! SIGOUTPF FOR PASSING SIGNALS(48 BYTES)
%recordformat SIGOUTPF(%integer DEST,SRCE,P1,P2,P3,P4,P5,P6,TYPE,SSN,SSNAD,SUSP)
!
                                        ! CBT THE CLAIMED BLOCK FORMAT
%recordformat CBTF(%integer DA,%short AMTX,%byte LNGTH,TAGS)
                                        ! CBT FLAGS DEFINED AS FOLLOWS
%constinteger NEW BLK=X'80';            ! BLOCK HAS BEEN JUST CREATED

==== ercc07/emas-2900/sup26is.txt ====

!
! TO MAKE S SERIES SUPERVISOR REQUIRES:-
!     1) CHANGE SSERIES=NO TO SSERIES=YES IN CTOPTIONS FILE
!     2) REPLACE COMF BY S SERIES COM IN ERCC08.COMSF
!
!
! THESE CONST INTEGERS DEFINE SIZES AND LAYOUT OF IMPORTANT TABLES
! THEY HAVE TO BE HERE TO BE GLOBAL TO ALL ROUTINES INCLUDING IO ONES
!
%CONSTINTEGER LSTLEN=192;               ! LOCAL SEGMENT TABLE LENGTH
%CONSTINTEGER CBTLEN=255;               ! LENGTH OF CBT TABLE
%CONSTLONGINTEGER LCACR=1;              ! ACR OF LOCAL CONTROLLER
%CONSTINTEGER DIRCSEG=10;               ! SEG NO OF DIRECTOR COMMS SEG
%CONSTINTEGER DIRCSEGOFFSET=0;          ! FOR ALIGNMENT IF NEEDED
%CONSTINTEGER DIRCSEGAD=DIRCSEG<<18;    ! VIRTUAL ADDRESS OF DIR COM SEG
%CONSTINTEGER DIRCSEGL=8*CBTLEN+255+LSTLEN; ! SIZE OF SAME
                                        ! MADE UP OF 2049 FOR CBT
                                        ! LSTLEN FOR SST
                                        ! 48+64 FOR 2 BITS OF SYTEMCALL TABLE
                                        ! 32+48 FOR DIROUTP&SIGOUT

==== ercc07/emas-2900/ibmlink2.txt ====
LINK
IP1Y
IP2Y
IOPTY
IGEN2Y
CSERV01Y
ERCS12.IPUT_IPUTOPTY
ERCC10.IBMRECODEY
ERCS12.XAOPT_OPTPUTY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIBMIMP,PGENERATEOBJECT
SUPPRESS DATA

==== ercc07/emas-2900/ibmlink3.txt ====
LINK
IP1Y
IP22Y
IOPT2Y
IGEN3Y
CSERV01Y
ERCS12.IPUT_IPUTOPTY
ERCC10.IBMRECODEY
ERCS12.XAOPT2_OPTPUTY
.END
P0Y
MODIFY P0Y
SATISFY REFS
.ALL
SATISFY DATA
.ALL
SUPPRESS
.ALL
RETAIN
ICL9CEZIBMIMP,PGENERATEOBJECT
SUPPRESS DATA

==== ercc07/emas-2900/sup27bsrce_comms49s.txt ====

!                 VERSION OF 13/06/80
!        DEC 79: INCLUDE AN OPER ADAPTOR
!                HAVE ONLY ONE SERVICE NUMBER, X'37'
!        OTHER POSSIBLE CHANGES
!           MAKE INITIALISATION CALL OF CC INITIALISE ADAPTORS AS WELL
!           MAKE IT POSSIBLE TO DEALLOCATE/ALLOCATE ALL DEVICES
!* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS *
%RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS,  %C
         DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0, %C
         %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C
         BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C
         SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ercc07/emas-2900/sup28dsrce_oper37s.txt ====
!*
!* OPER37 - 2nd April 1982 *
!*
!* Communications record format - extant from CHOPSUPE 22A onwards *
!*
%RECORDFORMAT COMF(%INTEGER OCPTYPE,SLIPL,SBLKS,SEPGS,NDISCS,DLVNADDR, %C
         (%INTEGER GPCTABSIZE,GPCA %OR %INTEGER DCUTABSIZE,DCUA), %C
         %INTEGER SFCTABSIZE,SFCA,SFCK,DIRSITE,  %C
         DCODEDA,SUPLVN,TOJDAY,DATE0,DATE1,DATE2,  %C
         TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,SERVAAD,  %C
         %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C
         NOCPS,RESV2,OCPPORT1,OCPPORT0,%INTEGER ITINT,CONTYPEA, %C
         (%INTEGER GPCCONFA %OR %INTEGER DCUCONFA), %C
         %INTEGER FPCCONFA,SFCCONFA,BLKADDR,RATION, %C
         (%INTEGER SMACS %OR %INTEGER SCUS), %C
         %INTEGER TRANS,%LONGINTEGER KMON,  %C
         %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C
         SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C
         COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,FEPS,  %C
         MAXCBT,PERFORMAD,SP1,SP2,SP3,SP4,SP5,SP6, %C
         LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ,  %C

==== ercc07/emas-2900/alib14s.txt ====
!* MODIFIED  07/06/79                                                           
!*                                                                              
!*                                                                              
%EXTERNALINTEGER ICL9CEFAC=4                                                    
!*                                                                              
!*                                                                              
%INTEGERFNSPEC IOCP(%INTEGER I,J)                                               
%ROUTINESPEC SIGNAL(%INTEGER EP,P1,P2,%INTEGERNAME F)                           
!*                                                                              
%EXTERNALROUTINESPEC ICL9CENVINIT(%INTEGER I,J,%ROUTINE TIDY PROC)              
%EXTERNALROUTINESPEC ICL9CEDIAGOUT(%INTEGER AD,LEN)                             
%SYSTEMROUTINESPEC SGNL(%INTEGER EP,P1,P2,%INTEGERNAME F)                       
%SYSTEMINTEGERFNSPEC STRMIO(%INTEGER EP,STREAM,%INTEGERNAME AFD)                
%SYSTEMINTEGERMAPSPEC COMREG(%INTEGER N)                                        
%SYSTEMROUTINESPEC SSERR(%INTEGER I)                                            
!*                                                                              
%OWNINTEGER INFD                                                                
%OWNINTEGER INREQFD                                                             
%OWNINTEGER OUTFD                                                               
%OWNINTEGER OUTREQFD                                                            
!*                                                                              

==== ercc07/emas-2900/impalgs_aprints.txt ====
!NEW ASSEMBLER WRITE ROUTINE ADDED  RRM 29.3.78
!**DELSTART
%SYSTEMINTEGERFNSPEC IOCP(%INTEGER EP,PARM)
!**DELEND
%LONGINTEGERFNSPEC LINT(%LONGLONGREAL X)
!*
!*
          %SYSTEMROUTINE READ(%INTEGER TYPEBND,ADR)
!***********************************************************************
!*       THIS ROUTINE IS THE IMP IMPLICITLY SPECIFIED ROUTINE WITH A   *
!*       %NAME PARAMETER. TYPEBND AND ADR ARE A 64 BIT DESCRIPTOR     *
!*    TO THE ACTUAL PARAMETER. THE BND FIELD HAS THE TYPE CODE INIT    *
!*    (=1 FOR INTEGER =2 FOR REAL).                                    *
!*                                                                     *
!*       THE METHOD USED IS SIMPLE REPEATED MULTIPLICATION USING LONG  *
!*       REAL VARIABLES. SOME ROUNDING ERRORS ARE INTRODUCED WHICH     *
!*       COULD BE AVOIDED BY USING PACKED DECIMAL INSTNS WITH NECESSARY*
!*       SCALING.                                                      *
!***********************************************************************
         %INTEGER TYPE,PREC,FLAG,CURSYM; ! FLAG= 0FOR'-',1 FOR '+'
         %INTEGER IVALUE,TVALUE,PARTYPE

==== ercc07/emas-2900/sup28asrce_mindiags.txt ====
%EXTERNALSTRINGFNSPEC STRHEX(%INTEGER I)
%SYSTEMROUTINE NDIAG(%INTEGER PCOUNT, LNB, FAULT, INF)
!***********************************************************************
!*_______'MASTER DIAGNOSTIC ROUTINE'. DISCOVERS THE LANGUAGE OF THE    *
!*_______FAILED ROUTINE FROM WORD 4 OF THE GLA AND CALLS APPROPRIATE   *
!*_______DIAGNOSTIC ROUTINE. THIS IS REPEATED TILL ALL DIAGNOSTICS     *
!*_______GIVEN.                                                        *
!*_______PCOUNT = PCOUNTER AT FAILURE                                  *
!*_______LNB    = LOCAL NAME BASE AT FAILURE                           *
!*_______FAULT  = FAILURE  (0=%MONITOR  REQUESTED)                     *
!*_______INF    =ANY FURTHER INFORMATION                               *
!***********************************************************************
PRINTSTRING("
MINIMUM NDIAGS ENTERED
FAULT NO ="); WRITE(FAULT,2)
PRINTSTRING("
PC=X".STRHEX(PCOUNT)."
LNB=X".STRHEX(LNB)."
")
%IF FAULT>0 %THEN %STOP
%END

==== ercc07/emas-2900/perqtrimp_poneb01s.txt ====
!
%CONST %BYTE %INTEGER %ARRAY I TO E TAB(0 : 127) =       %C
X'40',X'40',X'40',X'40',X'40',X'40',X'40',X'40',
X'40',X'40',X'15',X'40',X'0C',X'40',X'40',X'40',
X'40',X'40',X'40',X'40',X'40',X'40',X'40',X'40',
X'40',X'40',X'40',X'40',X'40',X'40',X'40',X'40',
X'40',X'4F',X'7F',X'7B',X'5B',X'