	.TITLE	PARM - PARAMETER TAPE FOR WATRAN COMPILER
/
/  31 JUL 74 (PDH) ADD DEFINITIONS FOR 'ERDV' & 'TRDV'
/   7 JUN 74 (JAF, JAS) 'LEGAL IN BLOCK DATA'
/   7 FEB 74 (JAF) ADD ARITHMETIC STATEMENT FUNCTION CODE
/  17 SEP 73 (PDH) ADD SYMBOL DEFINITIONS FOR DEVICE NUMBERS
/   3 JUL 73 (PDH&JAS) $TRACEON, $TRACEOFF
/  15 APR 70
/
/ THE FOLLOWING ARE SYSTEM ADDRESSES
.SCOM=100
/
/  THE FOLLOWING ARE THE DEVICE NUMBER DEFINITIONS USED IN THE COMPILER
/
TTI=	-2	/ COMMAND INPUT
TTO=	-3	/ CONSOLE MESSAGE OUTPUT
DKI=	-11	/ SOURCE FILE INPUT
LP=	-12	/ LISTING AND ERROR MESSAGES
DKO=	-13	/ BINARY FILE OUTPUT
/
/  THE FOLLOWING ARE THE DEVICE NUMBER DEFINITIONS USED BY THE 
/  INTERPRETER, AND FOR WHICH THE COMPILER MUST GENERATE A '.IODEV'
/
ERDV=-12	/ ERROR MESSAGE OUTPUT AND ERROR TRACE BACK
TRDV=-12	/ TRACE OUTPUT ($TRACEON)
/
/
/ THE FOLLOWING ARE THE DESIGNATIONS FOR THE AUTO INDEX REGISTERS
AUTOX=	10		/ AUTOX IS USED AS A G.P. REGISTER BY EXPRES
AUTO10=	10 		/ USED ONLY FOR INITIALIZING OR LOCAL USE
AVPL=	11		/ AUTOINDEX USED IN EXPRESS
AUTO11=	11
AUTO12=	12
AUTO13=	13
AUTO14=	14
AUTO15=	15
AUTO16=	16
AUTO17=	17
	.EJECT
/ HERE-AFTER LIES THE DEFINITION OF THE INTERNAL CHARACTER SET !
/
NVAR=	0	/ EXPRESS ONLY, -V
PVAR=	1	/ EXPRESS ONLY, +V
STATST=	2	/ EXPRESS ONLY, START OF EXPRESSION
SUBS=	3	/ EXPRESS ONLY, SUBSCRIPTING (
FUNS=	4	/ EXPRESS ONLY, FUNCTION (
OPEN=	5	/  (
OR=	6	/ .OR. AND !
AND.=	7	/ .AND.
NOT=	10	/ .NOT.
LESS=	11	/ .LT. AND <
GREAT=	12	/ .GT. AND >
LE=	13	/ .LE.
GE=	14	/ .GE.
EQ=	15	/ .EQ.
NE=	16	/ .NE.
MINUS=	17	/ -
PLUS=	20	/ +
STAR=	21	/ *
SLASH=	22	/  /
ARROW=	23	/  ** AND ^
NARROW= 24	/ EXPRESS ONLY, -^
COMMA=	25	/  ,
REPLAC=	26	/ =
ENDST=	27	/  END OF STATEMENT
CLOSE=	30	/ )
/
/
AA=31
BB=32
CC=33
DD=34
EE=35
FF=36
GG=37
HH=40
II=41
JJ=42
KK=43
LL=44
MM=45
NN=46
OO=47
PP=50
QQ=51
RR=52
SS=53
TT=54
UU=55
VV=56
WW=57
XXX=60
YY=61
ZZ=62
DLR=63
	.EJECT
ZERO=	64
ONE=	65
TWO=	66
THREE=	67
FOUR=	70
FIVE=	71
SIX=	72
SEVEN=	73
EIGHT=	74
NINE=	75
POINT=	76	/ . IS LOGICALLY PART OF NUMBERS
TRUE=	77	/ .TRUE.
FALSE=	100	/ .FALSE.
APOST=	200	/  ' MUST BE A EIGHT BIT CODE
SPACE=	101
AMPER= 	102	/ AMPERSAND &
ILLEG=	115
/
/ THE FOLLOWING CODE ARE THE HIERARCHY NUMBERS USED TO CHECK
/ FOR STATEMENTS OUT OF ORDER
/
H0=	0000	/ START OF PROGRAM
H1=	1000	/ SUBROUINE OR FUNCTION STATEMENT
H2=	2000	/ IMPLICIT STATEMENT
H3=	3000	/ ALL SPECIFICATION STATEMENTS
H4=	4000	/ EQUIVALENCE STATEMENT
H5=	5000	/ ALL OTHER STATEMENTS
BDLEGL=	100	/ STATEMENT IS LEGAL IN BLOCK DATA
ILGIF=	200	/ MARKS STATEMENT AS BEING ILLEGAL AFTER AN 'IF'
/
/ THE FOLLOWING INDICATE THE TYPE OF PROGRAM BEING PROCESSED
/
DONK=	0	/ DON'T KNOW
MAINK=	1	/ MAINLINE PROGRAM
SUBK=	2	/ SUBROUTINE
FUNK=	3	/ FUNCTION SUBPROGRAM
BLOCKD=	4	/ BLOCK DATA SUBPROGRAM
/
/ THE FOLLOWING BITS SIGNIFY THE TYPE OF ENTRY TO BE MADE
/ WHEN THE SYMBOL TABLE ROUTINE 'CALCP' IS CALLED AND THEY
/ REMAIN IN THE PTABLE.
/
VARIAB=	0		/ VARIABLE
STNUM=	1		/ STATEMENT NUMBER
CONST=	2		/ CONSTANTS
COMNAM=	4		/ COMMON NAME
/
	.EJECT
	.DEC
/ THE FOLLOWING ARE THE ASSIGNMENTS FOR THE VARIOUS MODES AND
/  INDICATORS USED IN THE IDENTIFICATION , SEARCH , EXPRES , & CALCP
/ SUBPROGRAMS. THEY ARE COMPILE TIME DTABLE BITS ONLY.
LOGICM=	1
SINTGM=	2
DINTGM=	3
UNKNOW=	4
REALM=	5
DBLEM=	6
NINTM=	7
DNINTM=	8
CMPLXM=	9
UCMPXM=	10
DCMPXM=	11
CHARM=	12
	.OCT
/
/ INDICATOR BITS LEFT IN AC FOR ENTRY TO 'SEARCH'
NAME=	1
CONSTN=	2
INTGRS=	6
/
/ THE FOLLOWING ARE THE COMPILE TIME OTABLE INDICATOR BITS
VROTB=	0	/ VARIABLE
CNOTB=	1	/ CONSTANT
STOTB=	2	/ STATEMENT NUMBER
DMOTB=	3	/ DIMENSION TABLE
TAOTB=	4	/ TEMPORARY ACCUMULATOR
SAOTB=	5	/ SUBSCRIPTING ACCUMULATOR
FROTB=	6	/ FUNCTION REFERENCE
AROTB=	7	/ SUBROUTINE ARGUMENT
/
/
/ THE FOLLOWING ARE THE EXECUTION (OBJECT) TIME MODE INDICATORS
INTMD=	0	/ SINGLE INTEGER
DINTMD=	1	/ DOUBLE INTEGER
REALMD=	2	/ REAL
DOUBMD=	3	/ DOUBLE MODE
CMPXMD=	4	/ COMPLEX
DCMPMD=	5	/ DOUBLE COMPLEX
LOGIMD=	6	/ LOGIC
TEMPMD=	7	/ TEMPORARY
CHARMD= 7	/ CHARACTER
/
/ SUBROUTINE CALL ARGUMENT TYPES
/
C.CON=0		/ CONSTANT
C.VAR=3		/ VARIABLE
C.STN=4		/ STATEMENT NUMBER
C.FUN=5		/ FUNCTION NAME
C.END=6		/ END OF ARGUMENT LIST
C.DIM=7		/ DIMENSIONED VARIABLE
/
	.EJECT
/ SUBROUTINE FORMAL PARAMTER TYPES
S.VAR=3		/ VARIABLE
S.RET=6		/ RETURNED VALUE VARIABLE
S.STN=5		/ STATEMENT NUMBER
S.FUN=4		/ FUNCTION NAME
S.DIM=7		/ DIMENSIONED VARIABLE
/
/
/
/  STATEMENT NUMBER CODES
NON.EX=	1	/ DEFINED ON A NON-EXECUTABLE STATEMENT
.EXC=	2	/ DEFINED ON A EXECUTABLE STATEMENT
FORM=	4	/ DEFINED ON AN FORMAT STATEMENT
.IOPUT=	10	/ USED IN AN I/O TYPE STATEMENT
DO.S=	20	/ USED IN A DO STATEMENT
TRAN.=	40	/ USED IN A TRANSFER STATEMENT(GO TO, ETC.)
/
/
/
/ CONTROL BITS FOR THE DTABLE
/
MODEST=400000	/ MODE SET IN A SPEC STATEMENT
DIMSET=200000	/ OCCURRED IN A DIMENSION STAT
COMSET=100000	/ OCCURRED IN A COMMON STAT
DATSET=40000	/ DATA IS APPLIED
FUNNAM=20000	/ VARIABLE IS FUNCTION SUBPROGRAM NAME
DIMENS=10000	/ DIMENSIONS HAVE BEEN SUPPLIED
FUNBIT=4000
XTERNL=2000	/ EXTERNAL FUNCTION
FORMAL=1000	/ FORMAL PARMETER
NOFUN= 400	/ FORMAL PARAMETER (VARIABLE)
VARDIM=200	/ VARIABLE HAS VARIABLE DIMENSIONS
DOPEVT=100	/ APPEND ONLY. INDICATES A CHAR VAR WITH DOPE VECTOR
NOHERE=40	/ NO CLUE YET AS TO ITS STATUS
EQUSET=20	/ OCCURRED IN AN EQUIVALENCE STATEMENT
USED=  2	/ A VARIABLE HAS BEEN USED
DFINED=1	/ ITEM HAS BEEN DEFINED
DEFIND=DFINED
/
SIGNER=10
CONBIT=20
/
	.EJECT
/ THE FOLLOWING CONTROL SWITCHES INDICATE WHAT CONDITIONS ARE
/ LEGAL OR ILLEGAL FOR ENTRANCE TO "EXPRES". THE PROPER
/ SWITCHES ARE SET IN THE AC PRIOR TO CALLING "EXPRES".
/
EXPILL=	000001	/ EXPRESSION ILLEGAL
CALLSW=	000002	/ CALL NAME
DFNSW=	000004	/ DEFINE ITEM
LHSSW=	000010	/ LEFT HAND SIDE OF AN ARITHMETIC EXPRESSION
CONILL=	000020	/ CONSTANT ILLEGAL
HOLDSA=	000040	/ HOLD S-ACC
NOSTEP= 000100	/ DO NOT STEP PAST TERMINATOR ON EXITING
ASFBIT=	000200	/INDICATE POSSIBLE ARITHMETIC STATEMENT FUNCTION
/
/ ILLEGAL MODE INDICATORS USED BY EXPRES (COLLECT & GENERAT)
/
	.OCT
CPXILL=20	/ COMPLEX   ILLEGAL
LOGILL=10	/ LOGICAL      "
RELILL=4	/ REAL         "
INTILL=2	/ INTEGER      "
CHRILL=1	/ CHARACTER ILLEGAL
/
/
/
/ SOME SWITCHES USED BY EXPRES
/
EXTRA=	    40	/ DELETE EXTRA ITEM FROM OPERATOR TABLE
		/ AFTER COMPILE
N=	   100	/ A CONSTANT USED TO GENERATE MODE STRINGS
		/ FOR CONVENIENT TABLE STORAGE
ONEOLY=	   100	/ PICK UP ONLY ONE VARIABLE FROM V TABLE
COMP=	   200	/ COMPLEMENT LAST VARIABLE AFTER COMPILE
DNVAR=	   400	/ REPLACE LAST VARIABLE BY -V AFTER COMPILE
DPVAR=	   600	/ REPLACE LAST VARIABLE BY +V AFTER COMPILE
TOACC=	  1000	/ FORCE MOST ELABORATE VARIABLE INTO ACC
STLEGL=	  2000	/ STATEMENT # ILLEGAL
TWOVAR=	  2000	/ LOOK AT SECOND LAST VARIABLE AND INCREMENT
STATNB=   2000	/ STATEMENT NUMBER AS AN ARGUMENT
		/ "GENRAT" IF IT IS -V
INVERT=	  4000	/ INVERT THE RESULT (+ FOR - , - FOR +)
SUBCHK=	  4000	/ CHECK FOR CONSTANT; ADDITIVE SUBSCRIPT
ARRFUN=	 10000	/ ARRAY OR FUNCTION LEGAL
INACC=	 10000	/ IN ACCUMULATOR (PSEUDO)
M=	 10000	/ A CONSTANT USED TO FORM CLUE BITS FOR "COLLECT"
RELATN=	 10000	/ RELATIONAL OPERATOR ( ONEOLY OFF )
TEMPER=	 40000	/ IN TEMPORARY ACCUMULATOR
ITRBIT=	100000	/ FORMAL PARAMETER BEING PASSED
DIMMEN=	200000	/ ARRAY NAME
FUNCAL=	400000	/ FUNCTION NAME
/
/ ADDITIONAL SWITCHES USED BY EXPRES
/
DIMBIT=	DIMENS
/
	.EJECT
/  ARITHMETIC OPCODES OF EXPRESS
/
ADDD=	0
ORE=	0
SUB=	1
ORN=	1
RSUB=	2
RORN=	2
MULT=	3
ANDD=	3
DIVV=	4
RDIV=	5
EXP=	6
REXP=	7
EXPN=	10
REXPN=	11
NEXP=	12
RNEXP=	13
NEXPN=	14
RNEXPN=	15
GTN=	16
GT=	17
LTN=	20
LT=	21
EQLN=	22
EQL=	23
LOAD=	24
LOADN=	25
RTRNX=	26
/
/
STORE=	40
STOREN=	41
MOVE1=	42
MOVE=	00	/ NOT AN OPCODE
MOVEN=	40	/ NOT AN OPCODE
CALL=	43
SUBSRP=	45
DOS=	46	/ START OF DO LOOP
UNDO=	47	/ END OF DO LOOP
GOTO=	50	/ GO TO
GOTOB=	51	/ COMPUTED 'GO TO'
IFA=	52	/ ARITHMETIC 'IF'
IFL=	53	/ LOGICAL 'IF'
IFLN=	54	/ NEGATIVE LOGICAL 'F'
READS=	55	/ READ OPCODE
WRITES=	56	/ WRITE OPCODE
GROUPS=	57	/ INPUT OR OUTPUT AN ARRAY AN ARRAY
SINVAR=	60	/ INPUT OR OUTPUT A SINGLE VARIABLE
IODONE=	61	/ END OF I/O LIST
STCNT=	62	/ STATEMENT COUNTER
TRCON=	63	/ $TRACEON
TRCOF=	64	/ $TRACEOFF
PAUSE=	75	/ PAUSE
RTRN=	76	/ RETURN
LEAVE=	77	/ LEAVE INTERPRETIVE MODE
/
/ EXPRES TEMP. ACC. MODE BITS
/ 
FREEAC=	40000	/ TEMP. ACC. IS FREE
/
	.EOT
