;	This file is included everwhere to broadcast stuff
; needed by separately-compiled routines, including constants
; and addresses of support routines.

ifn	usrflg,[
define	gcon	name,val
name: .==.+2
termin

define	gconv	name,[val]
name:	irp	each,,val
		.==.+1
		termin
termin

define	jumper	name
name:	.==.+1 
	termin
]

ife	usrflg,[
define	gcon	name,val
name: val ? jsp	xr,exitc
termin

define	gconv	name,[val]
name:	irp	each,,val
		each
		termin
termin

define	jumper	name
jrst	name
termin
]

loc	comadr
nullp==0,,-100
gcon	$true,tbool+true	; boolean true
gcon	$false,tbool+false	; boolean false
gcon	$none,tnone+(refbit)+none$	; the null return
gcon	$null,tnull+(refbit)+null$	; the null object
$nil=$null
gcon	$nulls,tstr+(refbit)+nulls$	; the null string
gcon	$nullv,tref+nullv$	; the unusable vector
gcon	$neg1,tint+777777	; -1
gcon	$zero,tint+0		; 0
gcon	$one,tint+1		; 1
gcon	$two,tint+2		; 2
gcon	$tyo,tchan+ttyocn	; default tty output
gcon	$tyi,tchan+ttyicn	; default tty input
gcon	$work,trel+work$	; a page to work with
gcon	$ents,tref+ents$	; the system entries
comadx==.
; Can't $rtnc following stuff
gconv	$memhi,tref+gchi	; current high bound on free mem
gconv	$memlo,tref+gclo	; current low bound on free mem
gconv	$stkhi,tref+stktop	; upper bound on stack
gconv	$pure,tref+gchi+1	; current pure stuff
gconv	$purtop,tref+gchi
gconv	$types,tref+types$	; the types vector
gconv	$sigpr,0	; signal printing flag
gconv	$mtab,0		; the module table
gconv	$intlock,0	; this locks up the world
gconv	intchk,skip	; this gets hit when we want to interrupt
.i.==440000(bsize)
.c==chsize*10000
gconv	$bptab,[(.i.-.c),(.i.-2*.c),(.i.-3*.c),(.i.-4*.c),(.i.-5*.c)]
gconv	$r.get,r.get	; get record component (get_*)
gconv	$r.put,r.put	; put record component (put_*)
gconv	$r.acc,r.acc	; general access entry
gconv	$o.new,o.new	; make a new oneof (make_*)
gconv	$typbp,[(221600+sp)]
gconv	$vtab,0		; the vector table (for desc canon)
gconv	$o.is,o.is	; test for taggedness of oneof
gconv	$o.get,o.get	; force a get of a oneof component
gconv	$trace,0	; the trace flag
gconv	$trxct,0
gconv	$trsav,0	; trace request
gconv	$lflag,0	; listen loop recovery flag
gconv	$bad,txrep+1	; Bad thing
tbad==tref+$bad
;	jumps to internal routines
jumplo==:.
jumper	setup
jumper	exiter
jumper	qsetup
jumper	yield
jumper	resume
jumper	exitc
jumper	qexit
jumper	notref
jumper	notrsb
jumper	badrep
jumper	frog
jumper	linker
jumper	buggy
jumper	mexit
jumper	badrtn
jumper	memout
jumper	framer
jumper	itpop
jumper	siggy
jumper	causer
jumper	notype
jumper	mxrout	; qproc return
jumper	vcopy	; copy a vector
jumper	rcopy	; copy a range
jumper	yldout
jumper	agnew
jumper	nixon
jumper	i.ofl	; overflow signal
jumper	myield
jumper	amake	; make an array
jumper	badtyp	; bad type code from force
jumper	safex	; jumper to safe exit
jumper	chkout	; check interrupts and jrst (xr)
jumphi==.-1	; highest jumper

loc	nulls$
gconv	nulls%,[tsrep+0,0]
gconv	none$,[tvec+1,0]
gconv	null$,[tvec+1,0]
gconv	nullv$,[tvec+1,0]
gconv	$sname,sixbit /clusys/
gconv	$bvec,tref+basvec	; vector of basic areas
gconv	$stack,trel+stack	; start of stack
gconv	$gcsav,tint		; # of words saved by last gc
gconv	$gcreq,0		; # of GC requests
gconv	$ahack,0		; # of hacked array arguments
gconv	$.greq,0	; ^G request
gconv	$.sreq,0	; ^S request
gconv	$ihand,0	; inferior interrupt handler (procedure object)
gconv	$infer,0	; 0,,lh of .ifpir user variable
gconv	$inreq,0	; inferior interrupt requests
gconv	$safex,0	; safex hacking flag
gconv	$indef,0	; any interrupt request increments this
gconv	$otty,0		; non-zero if tty is open
gconv	$start,start	; starting address
gconv	$cflag,0	; arg checking flag (1 -> no check)
gconv	$snap,0		; # of things snapped
gconv	$gcopt,0	; GC options word
gconv	$fhand,0	; 1 -> propagate failure
gconv	$hheap,0	; hi heap marker
gconv	$styx,0		; statistics-keeping flag
