// BNCGX - BCPL Compiler -- Nova Code Generator Declarations
// Copyright Xerox Corporation 1980
//  Paxton, 9-14-78: unsigned compares

// last modified by Butterfield, May 30, 1979  4:24 PM
// - add Iifsgetframe for use by SWStackStrings - 5/30
// - add Istring for use by SWStackStrings - 5/9/79

manifest
 [  
 TRUE = 12
 FALSE = 13
 RV = 16
 NEG = 17
 NOT = 18
 ULS = 20
 ULE = 21
 UGE = 22
 UGR = 23
 PLUS = 35
 MINUS = 36
 MULT = 37
 DIV = 38
 REM = 39
 LOGAND = 40
 LOGOR = 41
 EQ = 42
 NE = 43
 LS = 44
 LE = 45
 GE = 46
 GR = 47
 EQV = 48
 NEQV = 49
 LSHIFT = 52
 RSHIFT = 53
 VECAP = 54
 NUMARGS = 61
 TABLE = 65
 STATIC = 72
 EXT = 73
 ENDSTATIC = 75
 FNAP = 86
 RTAP = 87
 END = 89
 GOTO = 91
 SWITCHON = 108
 LINE = 115
 FINISH = 119
 ABORT = 120
 PLINE = 121
 NEWLOCAL = 122
 STIND = 135
 STORE = 136
 FNRN = 137
 RTRN = 138
 LZ = 139
 LLZ = 140
 SZ = 141
 SWITCHLOAD = 142
 ZEXT = 143
 ZINT = 144
 LP = 147
 LN = 148
 LLP = 149
 LLVP = 150
 STVECAP = 151
 SP = 153
 STACK = 154
 RSTACK = 155
 SAVE = 156
 ENDFRAME = 160
 PARAM = 162
 RTCALL = 163
 FNCALL = 164
 LENTRY = 165
 LC = 166
 LVRV = 168
 LL = 169
 LLL = 170
 ZLOC = 171
 WSUB = 172
 BSUB = 173
 SL = 177
 JUMP = 178
 JT = 179
 JF = 180
 RES = 181
 LAB = 184
 LOC = 185
 LSTR = 186
 INT = 187
 ENTRY = 188
 NQUAL = 190
 WQUAL = 191
 XQUAL = 192
 WBQUAL = 193
 STWQUAL = 196
 STXQUAL = 197
 STWBQUAL = 198
 STNQUAL = 199
 YQUAL = 200
 STYQUAL = 201
  ]

external
[
ScanImpures
ScanPures
Readop; ReadC; ReadL; ReadN
WB; BP
///*DCS* Hairier Symbol Table
 LookForSym
CGreport
PassTwo
CG
CGn
WriteOct
WriteSkip
WriteInstr
WriteLabel
WriteName
SetName
Nval; Bval; Wval; STRval
Initstack
SetSSP
Clearstack
Setarg
Copyarg
Push
Pop1
Pop2
freeac
Clearac
CGload
CGstore
CGstoreintemp
CGstoreintempN
CGloadac
CGloadreg
CGloadxr
CGloadac0
CGloadac1
CGload01
CGloadboth
CGlda
CGsta
CGmemref
CGmakememref
CGae
CGconst
CGoutconstants
CGcheckconstants
CGjmp
CGtest
CGlabdef
CGrv
CGsubscr
CGjumpandsave
CGmul
CGdiv
CGrem
CGand
CGior
CGeqv
CGxor
CGneg
CGnot
CGadd
CGsub
CGregop
CGlsh
CGrsh
CGshift
CGswitch
CGpchain
CGlchain
CGzchain
CGothers
CGplus
CGrel
CGcall
CGqual
CGnqual
CGstnqual
]

external
[
Cparameter
PCparameter
LabelDef
plabdefvec
pchainvec
plabelt
lchainvec
llabelt
elabelvec
eaddrvec
elabelt
vlabelt
zlabelt
ctypetable
cdatatable
caddrtable
cnametable
ctablep
constcount
constreflimit
casev
casel
argvec
arg1
arg2
arg3
SSP
MaxSSP
MaxVecSSP
framestack
framestackp
Dict
PCmax
]

manifest [	SSPoffset = 0
		SSPlimit = #177
		SSPtemp0 = 0
		SSPtemp1 = 1
		SSPtemp2 = 2
		SSPtemp3 = 3
	    ]


manifest [ Z = 0; R = 1; P = 2; X = 3 ]

manifest [ type = 0; ref = 1; loc = 2; pos = 3; name = 4 ]
manifest [ argsize = 5; argvecsize = argsize * 24 ]

manifest [ Codelimit = #4777 ]

manifest [	ctablesize = 200
		framestacksize = 10
	    ]

manifest [	AC = 1
		XR = 2
		LOCAL = 3
		RVLOCAL = 4
		NUMBER = 5
		RVNUMBER = 6
		LVLABEL = 7
		LABEL = 8
		RVLABEL = 9
		LVCOMMON = 10
		COMMON = 11
		RVCOMMON = 12
	    ]

manifest [	Nconst = 1
		Lconst = 2
		Dconst = 3
		Zconst = 4
		Jconst = 5
	    ]

get "bcplx"

manifest[ framespacemin = Savespacesize + 2] // allow room for
						    // the 2 arguments 
						    // that are always
						    // stored

//  BCPL Compiler -- Nova Code Declarations
//   Last modified on Wed 01 Nov 72 0030.41 by  jec.

manifest [
Ilda		= #020000
Ista		= #040000
Ijmp		= #000000
Ijsr		= #004000
Iisz		= #010000
Idsz		= #014000
Imov		= #101000
Imovs		= #101300
Imovzl		= #101120
Imovzr		= #101220
Imovl		= #101100
Imovr		= #101200
Iinc		= #101400
Iadd		= #103000
Iadc		= #102000
Iadczl		= #102120
Iadczr		= #102220
Isub		= #102400
Isubcl		= #102560
Isubcr		= #102660
Isubzl		= #102520
Isubzr		= #102620
Ineg 		= #100400
Inot		= #100000
Iand		= #103400
Iandzr		= #103620
Iands		= #103700
Iandszr		= #103404
Iseq0		= #101014
Isne0		= #101015
Isls0		= #101113
Isle0		= #100512
Isgr0		= #100513
Isge0		= #101112
Iseq		= #102414
Isne		= #102415
Isls		= #102513
Isle		= #102113
Isgr		= #102112
Isge		= #102512
Isuge		= #102032
Isugr		= #102432
Isule		= #102433
Isuls		= #102033
Iseq1		= #100014
Isne1		= #100015
Iset0		= #102400
Iset1		= #102000
Ideferbit	= #002000
Iskpbit		= #000001

Ajsr1		= #064400
Ajsr2		= #065000

Inqual		= Ijsr + #300	// no Ideferbit
Istnqual	= Ijsr + #315	// no Ideferbit
Iior		= Ijsr + #340+ Ideferbit
Ixor		= Ijsr + #341+ Ideferbit
Ieqv		= Ijsr + #342+ Ideferbit
Imul		= Ijsr + #343+ Ideferbit
Idiv		= Ijsr + #344+ Ideferbit
Irem		= Ijsr + #345+ Ideferbit
Ilsh		= Ijsr + #346+ Ideferbit
Irsh		= Ijsr + #347+ Ideferbit
Ibranch		= Ijsr + #350 + Ideferbit
Ilookup		= Ijsr + #351+ Ideferbit
Ijsr352		= Ijsr + #352+ Ideferbit
Ifinish		= Ijsr + #353+ Ideferbit
Iabort		= Ijsr + #354+ Ideferbit
Ilongjump	= Ijsr + #355+ Ideferbit
Igetlv		= Ijsr + #356+ Ideferbit
Imulplus	= Ijsr + #357 + Ideferbit
Istnqual0	= Ijsr + #360 + Ideferbit
Istnqual1	= Ijsr + #361 + Ideferbit
Iyqual01	= Ijsr + #362 + Ideferbit
Iyqual10	= Ijsr + #363 + Ideferbit
Istyqual01	= Ijsr + #364 + Ideferbit
Istyqual10	= Ijsr + #365 + Ideferbit
Ireturn		= Ijsr + #366 + Ideferbit
Istoreargs	= Ijsr + #367 + Ideferbit
Igetframe	= Ijsr + #370 + Ideferbit
Iifsgetframe	= Ijsr + #376 + Ideferbit

Iwbqual01	= Ijsr + #374 + Ideferbit
Iwbqual10	= Ijsr + #375 + Ideferbit
Istwbqual01	= Ijsr + #376 + Ideferbit
Istwbqual10	= Ijsr + #377 + Ideferbit

Istring		= Ijsr + #377 + Ideferbit  // test it here

]