// SwatSym.decl
// Copyright Xerox Corporation 1979, 1982
// Last modified March 21, 1982  1:42 PM by Boggs

//----------------------------------------------------------------------------
structure SymHead:	// layout of first 16 words of a .SYMS file
//----------------------------------------------------------------------------
[
version word		// version of BLDR that loaded this (=1000)
fileLength word		// length of this file in words
namesAddr word		// file word location of name strings area
symsAddr word		// location of static symbol descriptions
brFilesAddr word	// location of .BR symbol descriptions
binFilesAddr word	// location of .RUN and .BB file descriptions
blank word 10		// this header is 16 words long
]

//----------------------------------------------------------------------------
structure Sym:		// layout of static symbol description block
//----------------------------------------------------------------------------
// Note: SwatSymA.asm knows the layout of this structure.
[
namePos word		// -> CE or offset in name area of .Sym file
type bit 5		// proc, var, label, undef, or manif
blank bit
reloc bit		// relocatable - in an overlay
builtIn bit		// namePos -> CE on builtInString queue
inCache bit		// namePos -> CE on userString queue
blank bit 5
bank bit 2		// bank number of address
addr word		// address of static
value word		// value of static (initial contents for variables)
]
manifest lenSym = size Sym/16

manifest
[
// Sym.type values
variable = 1
procedure = 2
label = 3

maxCacheLength = 25	// max # of cached symbols
]

//----------------------------------------------------------------------------
structure STF:		// Symbol Table Fragment
//----------------------------------------------------------------------------
[
link word		// must be first
builtIn bit		// true if this fragment contains built-in symbols
numSyms bit 15		// # of Sym structure in this fragment
firstSym word		// numSymBlk Sym structures start here
]
manifest lenSTFHeader = offset STF.firstSym/16

//----------------------------------------------------------------------------
structure CE:		// Cache Entry
//----------------------------------------------------------------------------
[
link word
sym word		// -> Sym block
namePos word		// saved value of sym>>Sym.namePos
string word		// -> string
]
manifest lenCE = size CE/16