/	SUBTITLE	header		Descriptions and constant definitions
/
/	Explanation of file name prefixes:
/	a denotes a file defining constants
/	b denotes a file containing basic system functions with no local variables
/	c denotes a file containing system functions potentially available to the user
/	  or functions with  local variables
/	d denotes a file containing non pointer read only data
/	e denotes a file containing pointer read only data
/	f denotes a file containg non pointer read/write data
/	g denotes a file containg pointer read/write data
/
/	Explanation of prefixes used in the POP11 system:
/	b denotes a bit string variable
/	c denotes a character strip
/	f denotes a user entry point to a system function
/	k denotes a constant related to key words
/	m denotes a constant defining a bit mask
/	n denotes a POP11 number
/	o denotes an offset
/	s denotes a system entry point to a system function
/		sd denotes a type checking function
/		These functions copy things from the stack
/		to the registers checking types and performing conversions
/	u denotes a user entry point to an updater system function
/	v denotes a POP11 virtual machine instruction
/	w denotes a word record
/
/	Explanation of a keyword:
/	bits 0,1 and 2	: record type
/	bits 3 to 14	: record size in words
/	bit 15		: garbage collector mark bit, usually set
/
/	Explanation of keyword record type:
/	0-00	: bytes	system function
/	0-01	: bytes system byte record
/	0-10	: bytes	character strip (even number of bytes)
/	0-11	: bytes character strip (odd number of bytes)
/	1-00	: pointers user function
/	1-01	: pointers system record (ref, pair, word)
/	1-10	: pointers for full strips
/	1-11	: pointers for system record (for recordfns)
/
/	NB a record with a -ve key is full of bytes
/	   a record with a zero key is a system function
/
/	Explanation of function calling sequences:
/	Functions are called with 'jsr pc,subr' and return with 'rts pc'
/	For the error handler to work correctly the following conventions
/	MUST be followed:
/	Every function must begin with a descriptor block of the form:
/		ksysfn		/ a zero word
/	fsubr:	br ssubr	/ br to entry point
/		fnprops		/ false if none
/		updater		/ false if none
/		start of exit code
/
/	Exit code MUST be a series of pops from the auxiliary
/	stack followed by an rts pc
/
/	there is a large group of functions not directly available to the user
/	and with no exit code. these are formed into one large group
/	and their file names are allof the form b-*.s.
/	These share a communal descriptor and are therefore contiguous in core.
/
/	Explanation of register usage:
/	r0,r1,r2 and r3 are general purpose. They are NOT preserved
/	over subroutine calls. Some exceptional functions (e.g d2int)
/	set up registers for their callers
/	r4 always holds 000001; i.e mnmbit and mmark in one
/	r5 points to the user stack
/	sp points to the auxiliary stack
/	pc is the program counter
/
/	Explanation of a user function record:
/	The first word of such a record is kusrfn+size (in bytes)
/	Kusrfn is defined so that the bits mfunction are not set in a function
/	record key.
/	The next word of a user function record (ie the first word of the record
/	proper) is the number of local variables the function has.
/	The next two words are the fnprops and updater.
/	Following words contain pointers to the local variables of this function (if any).
/	If the function has any formal parameters the next word indicates
/	how many of the local variables are formals - the formals themselves
/	immediately precede this word.
/	Subsequent words of the record are pseudo instructions - each with a one
/	word argument.
/	Permissible pseudo instructions are:
/		vpush:	The argument is the address of a word whose
/			value is to be pushed onto the user stack.
/		vpop:	The argument is a word whose value is to be set by
/			a pop from the user stack.
/		vpushq:	The argument is to be pushed onto the stack.
/		vifso:	The top item from the stack is removed.
/			If it is not false the argument is added to the user
/			program counter.
/		vifnot:	The argument is added to the user program counter
/			if the topitem of the stack is false.
/		vpisfo:	If the top item of the stack is false it is removed
/			from the stack; if it is not false it is left on the stack
/			and the argument added to the user pc.
/		vpifnt:	is to vpisfo as vifnot is to vifso.
/		vgoby:	The argument is added to the user pc.
/		vcall:	The argument is a pointer to a word whose value is applied.
/		vucall:	The argument is a pointer to a word the updater of
/			whose value is applied.
/		vcallq:	The argument is a function which is applied.
/		vreturn:	The argument is the number of output locals this function
/			has. These are the first local variables stored.
/			Their values are pushed and the user function is exited.
/
/	Explanation of the format of a closure function:
/	First word is kusrfn+size,
/	Second word is -(number of frozen parameters plus one for fnpart)
/		This is -ve allowing a closure to be discriminated from a normal user function.
/	Third word is fnprops
/	Fourth word is updater
/	Subsequent words are frozen parameters and then the fnpart.
/
/
/
/	SUBTITLE	constants	defines various constants
/	Written by Steven Hardy
/	This file defines various constants used by the POP11 system
/
/	The following are assembly time conditional flags
/	which tailor the POP11 system to your local requirements
/
/
/
/
/
/
/
