perm filename LOWCOR.DEF[HAK,ROB] blob sn#430975 filedate 1979-04-03 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	
C00036 ENDMK
C⊗;
COMMENT ⊗
     APPENDIX 3--LOW CORE ADDRESSES OF USEFUL POINTERS IN THE MONITOR

The table below  lists the contents of	some absolute locations in  the monitor.
These locations contain pointers to various system tables (such as the job table
of  login  PPNs), pointers  to	special words  (monitor  variables),  and system
parameters (such as the  highest legal job number).   Any word in memory  may be
examined by use  of either the PEEK  UUO (see page 200)  or the SETPR2	UUO (see
page 164).

To get	the address  of a particular  job's entry  in a job  table, add  the job
number to the base address of the table.

210←←JBTSTS	;COMMENT ⊗
	This is the address of the job table of status words.  The bits in
	each entry are explained with the JBTSTS UUO on page 197. ⊗;

211←←PRJPRG	;COMMENT ⊗
	This is the address of the job table of project-programmer names.
	⊗;

212←←JBTSWP	;COMMENT ⊗
	This is the address of the job table of swapper data.  The left
	half (bits 0:17--the 777777,,0 bits) of each entry contains
	400000+the first logical band number used to swap this job.  Bits
	18:26 (0,,777000 bits), called IMGOUT, contain the size of the job
	(in pages) as stored on the disk.  Bits 27:35 (0,,777 bits),
	called IMGIN, contain the size of the job (in pages) as it will
	appear when it is swapped in. ⊗;

213←←SPWGO	;COMMENT ⊗
	This is the address of the job table of P1 spacewar processes.
	The right half (bits 17:35--0,,777777 bits) of each entry contains
	the user-specified starting address of the spacewar process.  Bits
	14:17 (17,,0 bits) contain the number of ticks between startups,
	and bits 10:13 (36,,0 bits) contain the number of ticks until the
	next startup.  This word is zero for jobs that do not have P1
	spacewar processes running.  See Section 8. ⊗;

214←←TTIME	;COMMENT ⊗
	This is the address of the job table of total run times (in
	ticks).  The time for job 0 is the null time (idle time) since the
	last system reload. ⊗;

215←←UPTIME	;COMMENT ⊗
	This is the address of a word that contains the length of time in
	ticks since the last system reload. ⊗;

216←←CORMAX	;COMMENT ⊗
	This is the address of a word that contains the largest size (in
	words) a user program can be and still fit in core. ⊗;

217←←DEVLST	;COMMENT ⊗
	This is the address of the header word for the list of all device
	data blocks (DDBs).  The left half of the header word contains the
	address of the first DDB.  DDBs are described in Appendix 4. ⊗;

220←←TTYTAB	;COMMENT ⊗
	This is the address of the table of pointers to TTY DDBs.  Index
	into this table with the terminal line number.	The entry for a
	terminal not in use is zero.  The entry for a terminal in use
	contains the following information.

	BITS   OCTAL	     NAME      CONTENTS OF FIELD IN TTYTAB ENTRY

	0      400000,,0     COMBIT    This  bit is  on  if the  terminal  has a
				       monitor command yet to be processed.
	1      200000,,0     DLYBIT    This  bit is  on  if the  terminal  has a
				       delayed command yet to be processed.
	2      100000,,0     PAUSEB    This  bit is  on  if the  terminal  has a
				       command waiting for the output  buffer to
				       empty.
	3      40000,,0      KILTTY    TTYSER	has  called   TTYKIL   for  this
				       terminal  and  is through  with	the DDB,
				       which will be released by DPYKIL when and
				       if the DPY header is released.
	11:17  177,,0	     (talk)    If the terminal	is in a talk  ring, this
				       field  contains	the line  number  of the
				       next  terminal in  the  ring.  Otherwise,
				       this  field contains  the  terminal's own
				       line number.
	18:35  0,,777777     (DDB)     This  is  the address  of  the terminal's
				       DDB. ⊗;

COMMENT ⊗
221	BYTE (9) SCNNUM,DPYNUM,DDNUM,PTYNUM
	These four quantities are the numbers of 1) teletype lines, 2) III
	display lines, 3) Data Disc display lines and 4) pseudo-teletype
	lines, respectively. ⊗;

222←←JOBN-1	;COMMENT ⊗
	This is the highest possible job number. ⊗;

223←←CHKBEG	;COMMENT ⊗
	This is the first location in the checksummed part of the system
	⊗;

224←←JBTQ	;COMMENT ⊗
	This is the address of the job table of entries in the job queues.
	The queues are circular with each entry containing a forward
	pointer in the right half and a backward pointer in the left half.
	The pointers are all relative to JBTQ: a pointer that is positive
	points to another job's entry in the table; a pointer that is
	negative points to the queue's header word, which itself is just
	another entry in the circular queue and which contains both
	forward and backward pointers.	The magnitude of a negative
	pointer indicates the number of the queue the entry is in.  See
	also the contents of absolute locations 231, 234, and 235 below
	and the queue names and numbers in Appendix 5. ⊗;

225←←JOBNAM	;COMMENT ⊗
	This is the address of the job table of sixbit job names. ⊗;

226←←JOB	;COMMENT ⊗
	This is the address of a word that contains the number of the
	currently running job. ⊗;

227←←CONFIG	;COMMENT ⊗
	This is the address of an asciz string that gives the title of the
	current system. ⊗;

230←←SP2GO	;COMMENT ⊗
	This is the address of the job table of P2 spacewar processes.
	The format of this table is the same as that of the SPWGO table;
	see word 213 above. ⊗;

231←←JOBQUE	;COMMENT ⊗
	This is the address of the job table of queue numbers.	Each entry
	in this table contains either the queue number or the negative of
	the queue number for the particular job.  See the queue names and
	numbers in Appendix 5. ⊗;

232←←JBTPRI	;COMMENT ⊗
	This is the address of the job table of calculated priorities. ⊗;

233←←JBTJL	;COMMENT ⊗
	This is the address of the job table of pointers to instantaneous
	job load tables. ⊗;

234←←NQUES	;COMMENT ⊗
	This is the number of different queues.  The queues are numbered
	from 0 to this number.	See the queue names and numbers in
	Appendix 5. ⊗;

235←←QNAMS	;COMMENT ⊗
	This is the address of a table of the ascii names of the various
	queues.  Index into this table with the queue's number.  These
	names are also listed in Appendix 5. ⊗;

236←←JBTLIN	;COMMENT ⊗
	This is the address of the job table of attached terminals.  The
	entry in this table will be -1 for a detached job.  For an
	attached job the entry will contain the terminal line number in
	the right half and the permanent terminal line characteristics in
	the left half.	There may be bits on for non-permanent
	characteristics, but these bits are not kept up to date in this
	word.  See LINTAB in word 302 below for the current line
	characteristics; see also the GETLIN UUO on page 77. ⊗;

237←←LETAB+20	;COMMENT ⊗
	This is the address of the entry for the first III (TTY20) in the
	table of pointers to the displays' line editor headers (DPY
	headers).  The right half of each entry contains a pointer to the
	free storage block for that display.  The left half holds various
	flags used by the line editor.	When a display is not in use, its
	entry here is zero.  Index into LETAB with a terminal's line
	number. ⊗;

240←←JBTJLH	;COMMENT ⊗
	This is the address of the job table of oldest job loading. ⊗;

241←←STATS ;COMMENT ⊗
	This is the address of a table of system statistics. ⊗;

242←←JBTGSL	;COMMENT ⊗
	This is the address of the job table of guaranteed service level.
	⊗;

243←←STATLEN ;COMMENT ⊗
	This is the length of the STATS table of system statistics.

244←←STATPTR	;COMMENT ⊗
	This is the address of a byte pointer into the STATS table of
	system statistics. ⊗;

245←←STATNUM ;COMMENT ⊗
	This is the address of a word containing the number of times the
	STATS table has been filled. ⊗;

246←←INTIME ;COMMENT ⊗
	This is the address of a word containing the number of ticks (one
	tick=1/60th of a second) the system has spent at interrupt level
	since the system has been up. ⊗;

247←←STBEG ;COMMENT ⊗
	This is the address of another table of system statistics. ⊗;

250←←JBTKCJ ; COMMENT ⊗
	This is the address of the job table of kilo-core-jiffies (KCJs)
	used by each job.  A jiffie is a tick, i.e., 1/60th of a second.
	One KCJ represents a job running for one tick with 1K of core. ⊗;

251←←JBTBTM ;COMMENT ⊗
	This is the address of the job table of login times.  Each entry
	in this table contains the date and time when the particular job
	logged in, with the date (in system date format) in the left half
	and the time (in seconds after midnight) in the right half. ⊗;

252←←DQCNT ;COMMENT ⊗
	This is the address of a word containing the number of disk
	operations waiting to be started. ⊗;

253←←TTYLOK	;COMMENT ⊗
	This is the address of a word used as a flag to prevent users from
	typing anything on their terminals. ⊗;

254←←MAINTMODE	;COMMENT ⊗
	This is the address of a word used as a flag to indicate that
	system maintenance is going on. ⊗;

255←←CORPTR	;COMMENT ⊗
	This is address of a block of words describing the state of the
	swapper.  The first 4 words are 0, FINISH, FORCE, and FIT. ⊗;

256←←LASTDISASTERTIME	;COMMENT ⊗
	This is the address of a word containing the system uptime when
	the last disaster occurred. ⊗;

;257	(unused)

260←←STEND2	;COMMENT ⊗
	This is the address of the last word in the table of system
	statistics beginning at STBEG (see above). ⊗;

;261	(unused)

262←←EXPMOD	;COMMENT ⊗
	This is the address of a word used as a flag to LOGIN to type out
	the file X.TXT[2,2]. ⊗;

;263	(unused)

264←←FSRPQ	;COMMENT ⊗
	This is the address of a table containing the number of free
	storage requests by size. ⊗;

265←←SYSTOP	;COMMENT ⊗
	This is the address of a word that contains the physical address
	of the first word after the system (where free storage begins). ⊗;

266←←CORTAB	;COMMENT ⊗
	This is the address of a table that indicates the usage of each
	page of core.  There is one word per core page.  The interesting
	part of each word is a 9-bit byte in bits 18:26 (0,,777000 bits).
	This field for a given page contains either 1) the number of the
	job occupying the page, 2) a 101 if the page is part of the
	system, 3) a 103 if the page is non-existant, 4) a 105 if the page
	is part of free storage, 5) a 110 if the page is a page map, or 6)
	a 0 if the page is unused. ⊗;

267←←NOLOGIN	;COMMENT ⊗
	This is the address of a word used as a flag to prevent anyone
	from logging in. ⊗;

270←←PTYJOB	;COMMENT ⊗
	This is the address of the table of owners of pseudo-teletypes
	(PTYs).  Each entry contains the number of the job that owns that
	PTY.  Index into this table with the PTY line number minus 121. ⊗;

271←←JBTPRV	;COMMENT ⊗
	This is the address of the job table of active privileges. ⊗;

COMMENT ⊗
	The right half of this word contains UCLTAB which is the address
	of the CALL UUO name table.

272←←UCLLEN*1000+UCLDLN,,UCLTAB
	This table is made up of two parts.  The first UCLDLN words
	contain the names of DEC CALLs, and the next UCLLEN-UCLDLN words
	contain the names of the special Stanford CALLs (numbers from
	400000 up).  Thus the total length of the table is UCLLEN, which
	is in bits 0:8 (777000,,0 bits) of word 272; the length of the
	first part of the table, UCLDLN, is in bits 9:17 (777,,0 bits) of
	word 272.  The CALL names within each part are in their expected
	order by CALLI number. ⊗;

273←←DSKPPN	;COMMENT ⊗
	This is the address of the job table of Disk PPNs (ALIASes).  If a
	job has no ALIAS, its entry in this table is zero.  Disk PPNs are
	explained on page 20. ⊗;

274←←FTIME	;COMMENT ⊗
	This is the address of the job table containing each job's time
	last run.  Each entry contains the date and time when the
	particular job was last run, with the date (in system date format)
	in the left half and the time (in seconds after midnight) in the
	right half. ⊗;

275←←NJOBS	;COMMENT ⊗
	This is the address of the job table that gives the number of
	users for each upper segment.  Each entry contains the number of
	jobs attached to the given upper segment.  Index into this table
	with the upper segment's job number. ⊗;

276←←DSKOPS	;COMMENT ⊗
	This is the address of the job table containing the number of disk
	operations each job has done.  The entry for job 0 is the total
	number of disk operations since the system was reloaded. ⊗;

277←←INITIM	;COMMENT ⊗
	This is the address of a word that contains the date and time of
	the last system reload.  The date (in system date format) is in
	the left half and the time (in seconds after midnight) is in the
	right half. ⊗;

300←←-DISPL,,COMTAB	;COMMENT ⊗
	COMTAB is the address of the table of monitor commands names in
	sixbit, and DISPL is the number of commands in that table. ⊗;

;301	(unused)

302←←LINTAB	;COMMENT ⊗
	This is the address of the table of terminal line characteristics.
	Each entry in this table corresponds to a particular terminal.
	The terminal's line characteristics are in the left half (see the
	GETLIN UUO on page 77 for the meanings of these bits).	The right
	half is used to store ESCAPE/BREAK arguments (for terminals that
	are displays).	Index into this table with terminal's line number.
	⊗;

303←←ASTAB	;COMMENT ⊗
	This is the address of the audio switch connection table.  There
	is a word here for each III and Data Disc display; index into this
	table with the display's line number minus 20.	The data in each
	entry of this table is as follows (for more details about the
	audio switch, see Section 4.9):

	BITS   OCTAL	     VALUES OF FIELDS IN ASTAB ENTRY

	0      400000,,0     One if a UUO is waiting for a  temporary connection
			     to finish on this display.
	1      200000,,0     One  if  the  current  connection	is  a  temporary
			     connection.
	2      100000,,0     One  if a	page interruption  is happening  at this
			     display.
	3      40000,,0      One if a delayed beep is pending.
	4      20000,,0      One  if the  permanent  audio channel  is	not page
			     interruptible.
	5      10000,,0      One   if  the   permanent	channel   is   not  beep
			     interruptible.
	6:7    6000,,0	     Beep disposition for temporary channel.
	8:9    1400,,0	     Page disposition for temporary channel.
	10:13  360,,0	     Temporary channel number.
	14:17  17,,0	     Permanent channel number.
	18:35  0,,777777     Remaining duration  of temporary connection  (0 for
			     infinite).

304←←JB2PRV	;COMMENT ⊗
	This is the address of the job table of passive privilege bits. ⊗;

305←←-LFTLEN,,LFTTAB	;COMMENT ⊗
	This word contains the number (LFTLEN) and address (LFTTAB) of the
	table of left-half privilege bits and their names.  Each entry in
	this table is of the form <sixbit name>,,<half-word bit value>. ⊗;

306←←-RHTLEN,,RHTTAB	;COMMENT ⊗
	This word contains the number (RHTLEN) and address (RHTTAB) of the
	table of right-half privilege bits and their names.  Each entry in
	this table is of the form <sixbit name>,,<half-word bit value>. ⊗;

307←←JBTSIN	;COMMENT ⊗
	This is the address of the job table of entries in the list of
	jobs to be swapped in. ⊗;

310←←JBTGLU	;COMMENT ⊗
	This is the address of the job table of cells used to mark jobs
	which must not be swapped out. ⊗;

311←←JOBNM1	;COMMENT ⊗
	This is the address of a word containing the current maximum
	number of jobs the system can support. ⊗;

312←←DDFCNT	;COMMENT ⊗
	This is the address of a word containing the number of Data Disc
	channels that are currently available. ⊗;

313←←DSTBLN,,DSTBUF	;COMMENT ⊗
	This word contains the length (DSTBLN) and address (DSTBUF) of a
	table of statistics for the disk. ⊗;

314←←COMWHO	;COMMENT ⊗
	This is the address of the first of several words used to hold the
	system wholine in ascid representation for displaying.	The system
	wholine ends with a CR and LF. ⊗;

315←←NPARIN	;COMMENT ⊗
	This is the address of a word which contains the number of parity
	errors detected with indeterminate locations.  The word at
	NPARIN-1 is called NPARER and contains the total number of parity
	errors detected. ⊗;

316←←JBTMAP	;COMMENT ⊗
	This is the address of the job table of pointers to each job's
	page map. ⊗;

317←←XMSET	;COMMENT ⊗
	This points to 9 words of XGP default settings for TMAR, PMAR,
	BMAR, LMAR, RMAR, XLINES, XTNODE, XVNODE and XGPBLN.  (XGPBLN is
	not settable by users.) ⊗;

320←←RTRHCT	;COMMENT ⊗
	This points to a table of error counts for the disk per head per
	pack. ⊗;

321←←TBLKPT,,TPJMP	;COMMENT ⊗
	Offsets within the piece of paper control block.

322←←DPHPOS,,PPCALL	; COMMENT ⊗
	Offsets within the piece of paper control block. ⊗;

323←←PPRJMP,,PPNO	;COMMENT ⊗
	Offsets within the piece of paper control block. ⊗;

324←←JBTPAG	;COMMENT ⊗
	This is the address of the job table of core image sizes.  The
	left half of each entry contains the size of the job in pages; the
	right half contains the number of pages that are above FSLIMIT.

	←← of physical addresses (lowest first):  SYSTEM, FREE STORAGE,
	USERS.	The system part occupies a fixed amount of core (in a
	given version), and its ending address is stored in SYSTOP.  Free
	storage grows and shrinks as more or less core is needed, and its
	ending address is stored in FSTOP.  (SYSPAG and FSPAG contain page
	rather than word versions of the same ending addresses.)  It does
	not matter where the 256K word boundary is, as long as it is after
	the end of free storage.  User core is everything after FSTOP.	If
	free storage needs to expand, then the user at FSTOP is swapped
	out.  If a job were locked in core at FSTOP he might get swapped
	out.  To get around this, user core is divided into two regions,
	high and low, which are exactly the same, except that locked jobs
	exist completely within the high region.  The dividing line
	between the high and low regions is called FSLIMIT and is set big
	enough so that free storage will never get that big.  The process
	of locking a job in core involves first checking to see if it is
	entirely in the high region.  If it is, the JLOCK bit is set in
	JBTSTS and the job is considered locked.  If not, then the job is
	swapped out and the LOKSWP bit is set instead.	This bit indicates
	to the swapper that the job must be swapped into the high region.
	The job will be swapped in when there is enough high region core
	available for it and then the LOKSWP bit will be turned off and
	the JLOCK bit turned on. ⊗;

325←←MTRLST	;COMMENT ⊗
	This is the address of the first word of a linked list of meter
	control blocks used by the system when the performance meter is in
	"background" mode. ⊗;

326←←SKIPP1	;COMMENT ⊗
	This is an I/O instruction to execute which will skip if it is
	executed on processor 1 (P1). ⊗;

327←←SKIPP2	;COMMENT ⊗
	This is an I/O instruction to execute which will skip if it is
	executed on processor 2 (P2). ⊗;

330←←LEBUF	;COMMENT ⊗
	Offset within the DPY header of the line editor buffer. ⊗;

COMMENT ⊗
331←←LDSHF*1000+LDPWR,,LDAVG
	LDAVG contains the current load average multiplied by
	2↑(LDPWR+LDSHF).  The load average is updated every 60th of a
	second by adding the following value to LDAVG:	Q * 2↑LDSHF -
	OLD.LDAVG * 2↑(-LDPWR), where Q is the instantaneous number of
	jobs in the RUNQ and TQ, and OLD.LDAVG is the previous value in
	LDAVG.	Thus, the load average is the smoothed average of the
	number of jobs in RUNQ or TQ, where the smoothing period is
	2↑LDPWR 60ths of a second. ⊗;

332←←DDQSIZ	;COMMENT ⊗
	This is the address of a word containing the size of the queue of
	terminals waiting for Data Disc channels. ⊗;

333←←DDQREQ,,LSTESC	;COMMENT ⊗
	LSTESC is a table with one word per terminal.  Contained in LSTESC
	are the Data Disc channel wait queue, the last escape command
	typed on each (physical) terminal, and the physical terminal
	"responsible" for each logical TTY line.  The responsible terminal
	is the last terminal to type a character (while mapped) to the
	given logical TTY line.  To find the terminal responsible for a
	logical TTY line, index into LSTESC with the logical TTY line
	number and pick up a byte from the indexed word with the byte
	position DDQREQ. ⊗;

334←←LEPOS	;COMMENT ⊗
	Offset within the DPY header of the line editor position word.	If
	the line editor for this display has been positioned by an LEYPOS
	UUO, then the sign-bit of this word will be on and the position of
	the line editor (in LEYPOS format, see page 131) will be the two's
	complement value in bits 11:21 (177,,740000) of this word. ⊗;

335←←VDTIE	;COMMENT ⊗
	This is the table that tells what Data Disc line number each TV
	monitor (Data Disc display) is tied to.  Index into this table
	with the TV monitor number minus 26.  The entry contains the line
	number that the given TV monitor is tied to, or zero if the TV
	monitor is untied.  See the VDSMAP UUO on page 152 for an
	explanation of tied and untied TV monitors. ⊗;