Consolidate license copies
[its.git] / sysdoc / usets.116
1 Copyright (c) 1999 Massachusetts Institute of Technology
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or (at
6 your option) any later version.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 ------------------------------
17
18 ITS USETS:
19
20 This file attempts to maintain up-to-date documentation on
21 all user variables hacked by .USET/.SUSET.  Those wonderful
22 souls who update the information in any way (additions,
23 deletions, corrections) should describe their
24 modifications in a brief note to INFO-ITS@AI so
25 that interested parties can correct their copies or
26 conceptions without needing to print or read the
27 entire file again.  For example:
28
29         :QMAIL INFO-ITS@AI I added more details to the .FOO user var ^C
30
31 If you want to be put on the INFO-ITS mailing list,
32 just say so in a message to it.
33 -------------------------------------------------
34 Each job running under ITS has a large number of variables
35 associated with it maintained by the system.  In order to
36 examine and set these variables, the .USET and .SUSET
37 uuo's are provided.  The .USET uuo allows the specification
38 of the job whose variables are to be accessed.  The .SUSET
39 uuo always accesses the variables of the job which executes it
40 (SUSET = Self USET).
41
42 The .USET uuo is used like this:        .USET CHNL,SPEC
43 and the .SUSET uuo like this:           .SUSET SPEC
44 The ac field CHNL of the USET must be the number of
45 an input/output channel for which a job is open,
46 as either the USR, JOB, or BOJ device.
47 The .USET may modify the variables only
48 if it has modification rights to the job (the job
49 is a JOB device, or is a direct inferior).
50
51 The contents of the effective address SPEC are of this form:
52         4.9     0 = read variable, 1 = set variable.
53         4.8     Block mode (see below).
54         4.7-3.1 Number of user variable to access.
55         2.9-2.1 Address of a location within the caller which
56                 is to receive the value of the variable, or which
57                 contains the new value for the variable.
58 If bit 4.8 is 1, then the word at location SPEC is really
59 an AOBJN pointer to a block of specifications.  This is
60 useful for getting several variables at a time easily.
61 The AOBJN pointer is updated as the operation progresses,
62 and so must be in a writable area.  Block mode may not be nested.
63 If an illegal specification is given to .USET or .SUSET,
64 the job will receive an illegal operation word 1 interrupt
65 (bit 1.6 of the .PIRQC user variable).
66
67 The variables are described in this document by the names which
68 DDT knows for them; the first character of each name is a ".".
69 If you open up a location by using one of these names, DDT
70 treats it specially and actually accesses the corresponding
71 variable and not a location in the job's core.
72
73 When writing .USET's and .SUSET's in MIDAS code,
74 one may use the symbols defined by MIDAS for accessing them.
75 These are the same as the names known to DDT, except that
76 the "." is followed by "R" for reading or "S" for setting.
77
78 If you open a location containing a SPEC, try typing
79 .R$?? if it is positive, or .S$?? if it is negative; this will
80 use bit typeout mode to print out the spec as it might have been
81 assembled; for example, 400001,,500  .S$??  gives .SVAL,,500 .
82
83 Examples:
84
85 To read your own runtime in 4-microsecond ticks into FOO:
86
87         .SUSET [.RRUNT,,FOO]
88
89 To set your word 1 interrupt mask:
90
91         .SUSET [.SMASK,,[%PIDWN\%PIPDL]]
92                 ;enable "pdl overflow" and "sys going down" interrupts
93
94 To read your input/output status word for channel 13 into FOO:
95
96         .SUSET [.RIOS+13,,FOO]
97
98 To start a job (your immediate inferior!) open on channel
99         USRC at its location QUUX, with its option
100         bits indicating your readiness to supply JCL:
101
102         .USET USRC,[.SOPTION,,[%OPCMD,,]]
103         .USET USRC,[.SUPC,,[QUUX]]
104         .USET USRC,[.SUSTP,,[0]]
105
106 Another way to do the same thing is:
107
108         MOVE AC,[-3,,USBLOK]
109         .USET USRC,AC
110           . . .
111 USBLOK: .SOPTION,,[%OPCMD,,]
112         .SUPC,,[QUUX]
113         .SUSTP,,[0]
114 \f
115 FORM OF DESCRIPTIONS:
116
117 The descriptions of the various variables accessible by
118 .USET and .SUSET are in the following form:
119
120 <DDT name>      <access>        <mnemonic explanation for name>
121
122         <long-winded paragraph describing variable>
123
124 The <access> descriptor contains four characters "wx yz".
125 The first two ("wx") refer to the access for .USET;
126 the last two ("yz") to the access for .SUSET.
127 In each case these characters are chosen from these sets:
128         --      May neither read nor set.
129         +-      May read but not set.
130         +*      May read and set.
131         +?      May read, may sometimes set (please read on...)
132 That is, + means may read, * may set, - denies access,
133 while ? says that things are more complicated.
134 \f
135 .40ADDR         +* +*   "40" address
136
137         The right half:
138
139         Initially 40 octal.  Whenever the system
140         references locations "40" through "44" specifically,
141         (e.g. giving the user interrupts, or returning uuo's 50-77),
142         the system really references the 5-word block that
143         .40ADDR points to.  Thus, if .40ADDR is set to 500, the
144         system expects location 502 to contain the address of
145         the interrupt routine.  This is especially useful to
146         distinguish system-returned uuo's (0 and 50-77) from
147         standard user-mode uuo's (1-37); the latter always
148         trap through location 40, while the former trap
149         through .40ADDR.
150         The various words accessed through .40ADDR are
151         as follows (indexed by "normal" location #):
152                 40      System places a uuo here when it wants
153                         to give it to the user.
154                 41      Should contain the address of the uuo handler.
155                         If .40ADDR is not indeed 40, this
156                         may be a different uuo handler from the
157                         one which handles uuo's 1-37.
158                         If .40ADDR is actually 40, then unless
159                         41's index and indirect fileds are 0 and its
160                         opcode is either 0 or JSR, all system-returned
161                         UUOs will cause ILOPR interrupts instead.
162                         This is to protect programs that want their
163                         hardware user-UUOs to be handled by a PUSHJ
164                         from being clobbered when they accidentally
165                         execute a meaningless UUO.
166                 42      If the job's %OPINT bit in its
167                         .OPTION variable (q.v.) is 0, then
168                         this is a JSR to the user's old-style
169                         interrupt handler.  The three words addressed
170                         by the JSR are, in order, the word in
171                         which the interrupt bits are placed, the
172                         return address for the interrupt, and the
173                         first instruction of the handler.
174                         If the %OPINT bit is 1, then this
175                         is an AOBJN pointer to a vector of
176                         5-word blocks describing the various
177                         interrupt handlers and their priorities.
178                         See ITS INTRUP for details.
179                 43      If the job's %OPLOK bit is set in
180                         its .OPTION variable, then this is
181                         the pointer to the list of switches
182                         to be reset if the job is killed.
183                 44      If the job's %OPLOK bit is set,
184                         this is an AOBJN pointer to a block
185                         of critical code region descriptors.
186                         See ITS LOCKS for details.
187
188         The left half:
189
190         Initially 20 octal.  This is the address of a block of
191         20 octal words which a job's superior may use to hack
192         that job.  For compatibility, if LH(.40ADDR) is zero,
193         the default of 20 will be assumed.
194 \f
195 .ADF1           +* +*   ANDCAM into .DF1
196
197         Like .DF1 (q.v.) when reading.
198         Performs ANDCAM into .DF1 when writing.
199
200 \1f
201 .ADF2           +* +*   ANDCAM into .DF2
202
203         Like .DF2 (q.v.) when reading.
204         Performs ANDCAM into .DF2 when writing.
205
206 \1f
207 .AIFPIR         +* +*   ANDCAM into .IFPIR
208
209         Like .IFPIR (q.v.) when reading.
210         Performs ANDCAM into .IFPIR when writing.
211
212 \1f
213 .AMASK          +* +*   ANDCAM into .MASK
214
215         Like .MASK (q.v.) when reading.
216         Performs ANDCAM into .MASK when writing.
217
218 \1f
219 .AMSK2          +* +*   ANDCAM into .MSK2
220
221         Like .MSK2 (q.v.) when reading.
222         Performs ANDCAM into .MSK2 when writing.
223
224 \1f
225 .APIRQC         +* +*   ANDCAM into .PIRQ
226
227         Like .PIRQC (q.v.) when reading.
228         Performs ANDCAM into .PIRQC when writing.
229 \f
230 .APRC           +- +-   APR CONO
231
232         4.9     Procedure is in a disowned tree.
233         4.7     (BUMRTL)  Tree will be gunned if hasn't run for an hour
234                 (meaningful only in top level job).  Cleared by reowning or
235                 attaching.  See the DETACH and DISOWN system calls.
236         4.6     Core request pending for this job.
237         4.5     User disabled, waiting to be flushed by SYS job.
238                 The SYS job will delete the job tree eventually.
239         4.4-4.1 .BCHN user variable (q.v.).
240         3.9     In process of deleting or logging out this job.
241                 Bit 4.5 will probably be set eventually.
242         3.5-3.1 Must be zero.
243         2.9-1.1 CONO'ed to APR whenever job is about
244                 to be run.  Initially 447.  Modified by
245                 altering the .MASK user variable.
246
247 \1f
248 .BCHN           +* +*   bad channel number
249
250         Initially 0.
251         Number of channel most recently in error.
252         Typically after reading this variable one does a
253         .STATUS or a STATUS symbolic system call
254         to get the status word for the channel.  This word
255         can then be fed to the ERR device.
256         .BCHN is actually part of the .APRC variable.
257         See also the .IOS variable.
258
259 \1f
260 .CNSL           +- +-   console tty number
261
262         If the job is in a console-controlled tree, this
263         variable contains the console's number, even if
264         the job doesn't own the console.  If the job is
265         in a non-console-controlled tree, .CNSL is -1
266         if the job is scheduled as part of the system,
267         -2 if the job is scheduled as a disowned job;
268         for a job-device-handler job, .CNSL is the same
269         as it is for the job it is serving.
270
271 \1f
272 .DF1            +* +*   defer bits, word 1
273
274         Initially 0.
275         Defer bits for word 1 interrupts (see .PIRQC
276         and .MASK).  If an interrupt bit is set in both
277         .PIRQC and .MASK, but is also set in .DF1,
278         it is temporarily deferred.
279
280 \1f
281 .DF2            +* +*   defer bits, word 2
282
283         Initially 0.
284         Defer bits for word 2 interrupts (see .IFPIR
285         and .MSK2).  If an interrupt bit is set in both
286         .IFPIR and .MSK2, but is also set in .DF2,
287         it is temporarily deferred.
288 \f
289 .EBO1           +- +-   KL-10 Ebox counter
290
291         This is the low-order word of the KL-10 Ebox counter
292         value for the job. It contains garbage on KA-10's.
293         Its location is .EBOX+1, for convenience.
294
295 \1f
296 .EBOX           +- +-   KL-10 Ebox counter
297
298         This is the high-order word of the KL-10 Ebox counter
299         value for the job. It contains garbage on KA-10's.
300
301 \1f
302 .FLS            +- --   flush instruction
303
304         Initially 0.
305         The instruction which is blocking the running of
306         the job.  Zero if user not blocked (user can run
307         if .USTP is also zero).
308         (The scheduler tests a job for runnability by first
309         checking the .USTP variable, and if it is zero,
310         then executing the flush instruction.  The job is
311         runnable iff the flush instruction skips.)
312
313 \1f
314 .FTL1           +- +-   Fatal interrupt first word
315
316         After a fatal interrupt, this variable contains the
317         .PIRQC bits which caused the error.  At any other time
318         it contains garbage.
319 \1f
320 .FTL2           +- +-   Fatal interrupt second word
321
322         After a fatal interrupt, this variable contains the
323         .IFPIR bits which caused the error.  At any other time
324         it contains garbage.
325
326 \1f
327 .HSNAME         +* +*   Home System Name
328
329         This is a word of sixbit like .SNAME (q.v.).  It
330         is initialized to be the same as the UNAME on creation
331         of a not-logged-in tree, and when a job is created
332         as an inferior or as a job device, it's .HSNAME is
333         copied from that of it's creator.  The LOGIN system call
334         sets it to be the same as the UNAME, although this should
335         be changed to be the XUNAME.
336
337         This is not used by ITS for anything, but is intended to
338         associate a directory with a specific XUNAME for the sake
339         of init and mail files of people without a directory of
340         the same name as their XUNAME.  DDT will soon initialize
341         it by looking up information in the INQUIR database for
342         the particular user.
343 \1f
344 .IDF1           +* +*   IORM into .DF1
345
346         Like .DF1 (q.v.) when reading.
347         Performs IORM into .DF1 when writing.
348 \f
349 .IDF2           +* +*   IORM into .DF2
350
351         Like .DF2 (q.v.) when reading.
352         Performs IORM into .DF2 when writing.
353
354 \1f
355 .IFPIR          +* +*   inferior procedure and i/o requests (?)
356
357         Initially 0.
358         This variable contains bits for pending word 2 interrupts.
359
360         Bit 3.n is the interrupt bit for the n'th job directly
361         inferior to the specified job (see the .INTB user variable).
362         These therefore occupy bits 3.8-3.1.
363         An inferior interrupt bit is set if an a class 1
364         or untrapped class 2 interrupt occurs in the inferior,
365         or if the inferior is using new-style interrupts
366         (see ITS INTRUP, and the %OPINT bit of the .OPTION
367         user variable) and any unhandled interrupt occurs.
368         Performing a .UCLOSE on an inferior clears the
369         inferior interrupt bit in the .IFPIR variable
370         of the job performing the .UCLOSE.
371
372         Bit 1.n is the interrupt bit for input/output
373         channel n-1 (actually, these occupy bits 2.7-1.1).
374         Thus bit 1.1 = channel 0, 1.2 = channel 1,
375         1.3 = channel 2, . . ., bit 2.7 = channel 17.
376         When an input/output interrupt is detected, the
377         system call WHYINT shoud be used to discover the
378         cause (see ITS .CALLS).
379
380         The following devices can cause channel interrupts:
381
382         TTY     Input:  A character was typed which according
383                         to the job's TTYST1 and TTYST2 variables
384                         (see ITS TTY) should be treated as an interrupt
385                         character.  If the tty is opened for input
386                         on more than one channel, only one channel,
387                         if any, receives the interrupt.
388                 Output: The **MORE** condition has occurred.
389                         See ITS TTY.
390         STY     Input:  Input is pending (i.e. the corresponding TTY
391                         has attempted output).  If the STY is open
392                         for input on more than one channel, only
393                         one channel, if any, receives the interrupt.
394                         See ITS TTY.
395                 Output: The STY's alter ego is waiting for input,
396                         or at least was (it isn't guaranteed not to
397                         stop waiting and do something else).
398         STK     Input is available.  Interrupts occur on all enabled channels.
399         USR     A foreign job open on the channel has been killed.
400                 If the job went away while the channel was pushed
401                 on the I/O pdl, this interrupt will occur when the
402                 channel is popped.  See the .UCLOSE, .IOPUSH, and
403                 .IOPOP uuo's.
404                 If the job is the PDP-6, the PDP-6 has requested an interrupt.
405         JOB     Various conditions, some programmable.  See ITS JOB.
406         BOJ     Various conditions, some programmable.  See ITS JOB.
407         NET     One of the following conditions has occurred:
408                         The IMP has gone down.
409                         RFC received.
410                         After RFC sent, the connection is now open.
411                         Input available.
412                         Connection closed.
413                         Net interrupt received (INR or INS).
414         MSP     Message has been sent.
415 \f
416 .IIFPIR         +* +*   IORM into .IFPIR
417
418         Like .IFPIR (q.v.) when reading.
419         Performs IORM into .IFPIR when writing.
420
421 \1f
422 .IMASK          +* +*   IORM into .MASK
423
424         Like .MASK (q.v.) when reading.
425         Performs IORM into .MASK when writing.
426
427 \1f
428 .IMSK2          +* +*   IORM into .MSK2
429
430         Like .MSK2 (q.v.) when reading.
431         Performs IORM into .MSK2 when writing.
432
433 \1f
434 .INTB           +- +-   interrupt bit
435
436         Gets the interrupt bit for the procedure.  This is
437         the word 2 interrupt bit which the procedure's
438         superior will see when the procedure interrupts
439         its superior.  This variable will therefore have
440         exactly one of bits 3.1-3.8 set, and no others.
441         If the procedure is top level (has no superior),
442         then this variable is negative.
443
444 \1f
445 .IOC +<n>       +- +-   input/output channel
446
447         The variable .IOC+<n> is the input/output channel
448         word for channel <n>, for n between 0 and 17 octal.
449         Normally zero for a closed channel.
450
451 \1f
452 .IOP +<n>       +- +-   input/output pdl
453
454         The input/output pdl is a pdl of two-word entries
455         used by the .IOPUSH, .IOPOP, and .IOPDL uuo's.
456         The first word of each pair is the .IOC word for
457         the stacked channel, and the second is the .IOS word.
458         In addition, bits 4.9-4.6 of the .IOS word of each
459         pair contain the channel number which the channel was
460         pushed from (this is used by the .IOPDL uuo).
461         The pdl has eight entries; thus <n> should be between
462         0 and 17 (0 is the .IOC word for the least recently
463         pushed entry, etc.).
464 \f
465 .IOS +<n>       +- +-   input/output status
466
467         The variable .IOS+<n> is the input/output status
468         word for channel <n>, for <n> between 0 and 17 octal.
469         Normally zero for a closed channel.
470         This word contains various bits describing the status
471         of the channel.  The left half is a set of error
472         codes if non-zero; the .IOS word can be given to
473         the ERR device to obtain an ascii message for
474         the error.  The right half contains various bits
475         describing the state of the device.  (Internally to
476         ITS, the right half contains an access pointer;
477         the right half bits supplied for .IOS are the
478         same as those generated by the .STATUS uuo or
479         the STATUS symbolic system call.)
480
481         The various bits in the .IOS word are as follows:
482         4.9-4.6 Always zero (see the .IOP variable).
483         4.5-4.1 If non-zero, the number of a non-display
484                 input/output error (see table below).
485         3.9-3.7 If non-zero, the number of an IDS interpreted
486                 display input/output error (see table below).
487         3.6-3.1 If non-zero, the number of a standard error.
488                 Set primarily by failing .OPEN's and
489                 .FDELE's.  These are the same as the error
490                 codes returned by failing .CALL's (see
491                 table below).
492         2.9-2.3 Device dependent.
493         2.2     Buffering capacity empty.
494         2.1     Buffering capacity full.
495         1.9-1.7 Mode in which device was opened.
496                 1.9     0 = ascii, 1 = image.
497                 1.8     0 = unit, 1 = block.
498                 1.7     0 = input, 1 = output.
499         1.6-1.1 ITS internal physical device code
500                 (see table below).
501
502         The error messages indicated by bits 4.5-4.1 are:
503           1     DEVICE HUNG OR REPORTING NON-DATA ERROR
504           2     END OF FILE
505           3     NON-RECOVERABLE DATA ERROR
506           4     NON-EXISTENT SUB-DEVICE
507           5     OVER IOPOP
508           6     OVER IOPUSH
509           7     USR OP CHNL DOES NOT HAVE USR OPEN
510          10     CHNL NOT OPEN
511          11     DEVICE FULL (or directory full)
512          12     CHNL IN ILLEGAL MODE ON IOT
513          13     ILLEGAL CHR AFTER CNTRL P ON TTY DISPLAY
514          14     DIRECTORY FULL
515          15     DIRECTORY'S ALLOCATION EXHAUSTED
516
517         The error messages indicated by bits 3.9-3.7 are:
518           1     IDS ILLEGAL SCOPE MODE
519           2     IDS SCOPE HUNG
520           3     MORE THAN 1K SCOPE BUFFER
521           4     IDS MEM PROTECT
522           5     IDS ILLEGAL SCOPE OP
523           6     IDS MEM PROTECT ON PDL PNTR
524           7     IDS ILLEGAL PARAMETER SET
525
526         The error messages indicated by bits 3.6-3.1 are:
527           1     NO SUCH DEVICE
528           2     WRONG DIRECTION
529           3     TOO MANY TRANSLATIONS
530           4     FILE NOT FOUND
531           5     DIRECTORY FULL
532           6     DEVICE FULL
533           7     DEVICE NOT READY
534          10     DEVICE NOT AVAILABLE
535          11     ILLEGAL FILE NAME
536          12     MODE NOT AVAILABLE
537          13     FILE ALREADY EXISTS
538          14     BAD CHANNEL NUMBER
539          15     TOO MANY ARGUMENTS (CALL)
540          16     PACK NOT MOUNTED
541          17     DIRECTORY NOT AVAIL
542          20     NON-EXISTENT DIRECTORY NAME
543          21     LOCAL DEVICE ONLY
544          22     SELF-CONTRADICTORY OPEN
545          23     FILE LOCKED
546          24     M.F.D. FULL
547          25     DEVICE NOT ASSIGNABLE TO THIS PROCESSOR
548          26     DEVICE WRITE-LOCKED
549          27     LINK DEPTH EXCEEDED
550          30     TOO FEW ARGUMENTS (CALL)
551          31     CAN'T MODIFY JOB
552          32     CAN'T GET THAT ACCESS TO PAGE
553          33     MEANINGLESS ARGS
554          34     WRONG TYPE DEVICE
555          35     NO SUCH JOB
556          36     VALID CLEAR OR STORED SET
557          37     NO CORE AVAILABLE
558          40     NOT TOP LEVEL
559          41     OTHER END OF PIPELINE GONE OR NOT OPEN
560          42     JOB GONE OR GOING AWAY
561          43     ILLEGAL SYSTEM CALL NAME
562          44     CHANNEL NOT OPEN
563          45     INPUT BUFFER EMPTY OR OUTPUT BUFFER FULL
564          46     UNRECOGNIZABLE FILE (LOAD)
565          47     LINK TO NON-EXISTENT FILE
566
567         The physical device codes from bits 1.6-1.1 are as
568         follows.  Note that, as a half-hearted rule, bit 1.6
569         indicates that file names are significant, and bit 1.5
570         indicates a software-implemented device.
571         This list is subject to additions and deletions!
572         CODE    SYMBOL  DEVICE  DESCRIPTION
573          0              TTY     Console input.
574          1      SNTTY   TTY     Printing console output.
575          2      SNTDS   TTY     Display console output.
576          3      SNLPD   LPT     Data Products line printer.
577          4      SNVID   VID     Vidisector ???
578          5      SNBAT           Vidisector ???
579          6      SNPLT   PLT     Calcomp plotter.
580          7      SNPTP   PTP     Paper tape punch.
581         10      SNIMPX  IMX     Input multiplexor.
582         11      SNOMPX  OMX     Output multiplexor.
583         12      SNPTR   PTR     Paper tape reader.
584         13      SN340   DIS     DEC 340 display, Ascii output.
585         14      SN340I  IDS     Interpreted 340 display.        ???
586         15      SNMTC   MTn     Magnetic tape.
587         16      SNCOD   COD     Morse code device.
588         17      SNTAB   TAB     Tablet. ???
589         21      SNNUL   NUL     Source of zeroes, or output sink.
590         22      SNJOB   JOB     Job device.
591         23      SNBOJ   BOJ     Inverse of JOB.
592         24      SNSPY   SPY     Spy on another console.
593         25      SNSTY   STY     Pseudo-teletype.
594         26      SNNET   NET     ARPA network.
595         27      SNLPV   LPT     Vogue line printer (yech!)
596         30      SNSTK   STK     Stanford keyboard.
597         31      SNMSP   MSP     Interprocess message protocol.
598         41      SNUTC   UTn     Microtape (DECtape).
599         43      SN2311  DSK     2311 disk drives or equivalent.
600         60      SNFUSR  USR     A foreign (not immediately inferior) procedure.
601         61      SNUSR   USR     An immediately inferior procedure.
602         62      SNCLK   CLx     Various core link devices (x \ 6 {AIOU})
603         63      SNDIR   ---     File directory or ERR device.
604         64      SNPDP   USR     The PDP-6.
605 \f
606 .IPIRQC         +* +*   IORM into .PIRQC
607
608         Like .PIRQC (q.v.) when reading.
609         Performs IORM into .PIRQC when writing.
610
611 \1f
612 .JNAME          +* +?   job name
613
614         The name of the job as a word of sixbit characters.
615         The uname-jname pair must be unique to a job
616         (there are some exceptions involving system-created
617         jobs or jobs not logged in).
618         The uname and jname are used as file names when
619         creating or subsequently opening the job on the USR
620         device.  See also the .UNAME user variable.
621         The .JNAME variable may be set by a .SUSET only in a
622         top-level job, and then only if the job has no
623         inferiors.
624         Attempting to set a jname to zero causes an
625         illegal operation interrupt (bit 1.6 of the .PIRQC
626         user variable).  So does attempting to set it such that
627         the uname-jname pair would no longer be unique.
628         So does attempting to illegally set one's own jname.
629
630 \1f
631 .JPC            +* +*   jump program counter
632
633         The PC as of the most recent jump instruction,
634         i.e. an instruction which changed the PC by other
635         than 1 or 2.  This is actually a register in the
636         paging box when running.
637
638 \1f
639 .MARA           +* +*   MAR (memory address register) address
640
641         Initially 0.
642         The address for the MAR register in the paging box,
643         which gives a %PIMAR interrupt when the specified operation
644         is performed on the specified address.
645                 3.3     0 = exec mode, 1 = user mode.
646                         This is forced to 1 when set with
647                         .SUSET or .USET; exec mode is for very
648                         obscure system hacks only.
649                 3.2-3.1 0  Never interrupt.
650                         1  Interrupt on instruction fetch.
651                         2  Interrupt on write.
652                         3  Interrupt on any reference.
653                 2.9-2.1 Address for MAR.
654         The MAR does not work well on accumulators.
655         See also the .PIRQC user variable, bit %PIMAR;
656         and ITS INTRUP and ITS USR.
657 \f
658 .MARPC          +* +*   MAR program counter
659
660         The PC as of the instruction that most recently
661         tripped the MAR interrupt, if any.  In addition,
662         the indirect bit will be set if that instruction
663         completed successfully (was not aborted by the MAR
664         hit).  See the .MARA user variable.
665
666 \1f
667 .MASK           +* +*   word 1 interrupt mask
668
669         Initially 0.
670         This is a mask for word 1 interrupts which indicates
671         which interrupts the job is prepared to handle.
672         If a class 2 or class 3 word 1 interrupt tries to
673         occur, but the corresponding bit in .MASK is not
674         set, then the interrupt is converted to class 1 or
675         ignored, respectively.  The bits in .MASK directly
676         correspond to those in .PIRQC (q.v.).  Bits for class
677         1 interrupts are AND'ed out before setting the .MASK
678         variable.
679
680 \1f       
681 .MBO1           +- +-   KL-10 Mbox counter
682
683         This is the low-order word of the KL-10 Mbox counter
684         value for the job.  On KA-10's, it holds garbage.
685         Its location is .MBOX+1, for convenience.
686
687 \1f       
688 .MBOX           +- +-   KL-10 Mbox counter
689
690         This is the high-order word of the KL-10 Mbox counter
691         value for the job.  On KA-10's, it holds garbage.
692
693 \1f
694 .MEMT           +* +*   memory top
695
696         This variable contains 1 plus the highest legal
697         address in the job (the accessible word with the
698         largest address).  Setting this variables is like
699         performing an equivalent .CORE uuo (q.v.):
700                 .SUSET [.SMEMT,,[FOO]]
701         is like doing:
702                 .CORE <FOO+1777>_12
703
704 \1f
705 .MPVA           +- +-   memory protect violation address
706
707         The address which the last instruction to cause a
708         memory protection violation (or a write into read only
709         memory violation) attempted to reference,
710         on KA-10's rounded down to a page boundary.
711         Thus an attempt to reference the non-existent
712         location 317435 would cause .MPVA to be set to
713         316000 octal on a KA-10, or 317435 on a KL-10.
714         See also the .PIRQC variable.
715         On the KS-10, .MPVA holds the non-existant IO register address
716         after a %PINXI.
717 \f
718 .MSK2           +* +*   word 2 interrupt mask
719
720         Initially 0.
721         This is a mask for word 2 interrupts which indicates
722         which interrupts the job is prepared to handle.
723         If a class 2 or class 3 word 2 interrupt tries to
724         occur, but the corresponding bit in .MSK2 is not
725         set, then the interrupt is converted to class 1 or
726         ignored, respectively.  The bits in .MSK2 directly
727         correspond to those in .IFPIR (q.v.).
728
729 \1f
730 .OPC            +- +-   old program counter
731
732         The PC just before the last instruction was executed.
733         This corresponds to a register in the paging box.
734         It doesn't exist on KL-10's.
735 \f
736 .OPTION         +* +*   option bits
737
738         Initially 0.
739         The bits in this word correspond to various options
740         as follows:
741         4.9     %OPTRP  Same as the .UTRP user variable.  See ITS UUO.
742         4.8     %OPDET  ** This bit is OBSOLETE and NO LONGER EXISTS **
743                         It is documented for historical purposes only.
744                         Nowadays, fatal interrupts always cause top-level
745                         jobs to be detached.  Once upon a time, top-level
746                         jobs with consoles would be reloaded instead of
747                         detached, unless they had set %OPDET=1.
748                         See the DETACH and RELOAD symbolic system calls.
749         4.7     %OPDEC  Uuo's 40, 41, and 47 (that is,
750                         .IOT, .OPEN, and .ACCESS)
751                         should trap to the user as uuos
752                         via the .40ADDR user variable (q.v.).
753                         This is useful for programs which wish to
754                         interpret DEC TOPS-10 UUO's, since those are the
755                         only ones which conflict with ITS UUOs.
756                         Luckily, those ITS UUOs are not essential since
757                         there are symbolic system calls to do the same things.
758         4.6     %OPCMD  Superior claims it has JCL which
759                         it will cheerfully supply in response to
760                         the appropriate .BREAK 12, command.
761         4.5     %OPBRK  Superior claims to handle all .BREAK's.
762         4.4     %OPDDT  Superior claims to be DDT.
763         4.3     %OPINT  Job desires new-style (vectored
764                         and stacked) interrupts.  See also the
765                         .40ADDR variable.  See ITS INTRUP for
766                         information on old- and new-style
767                         interrupts.
768         4.2     %OPOJB  Other jobs may open this job
769                         as the OJB device, thereby turning it
770                         into a JOB device.  See ITS JOB.
771         4.1     %OPLOK  Job desires the switch locking
772                         and unlocking synchronization feature.
773                         See also the .40ADDR variable.
774                         See ITS LOCKS for information on locks.
775         3.9     %OPLIV  The job tree of which this is the
776                         top-level job is permitted to survive a
777                         system shutdown -- it should take care
778                         of logging itself out.  See the .SHUTDN uuo.
779                         Meaningful only for top-level jobs.
780                         Primarily useful for system demons which need to
781                         survive system death (e.g. the statistics
782                         demon PFTHMG DRAGON).
783         3.8     %OPOPC  Job desires that instruction-aborting interrupts
784                         such as MPV leave the PC pointing before the
785                         instruction that lost, instead of the old
786                         convention of leaving it pointing after.
787                         The new convention is far better and all new
788                         programs should use it.
789         3.7     %OPLSP  Superior claims to be MacLisp.
790         3.6     %OPLKF  Unlock locks on fatal interrupt.  When a
791                         non-disowned top-level job receives a fatal
792                         interrupt, if it has set this bit, its locks will
793                         be unlocked by the system job as part of the
794                         process of detaching it.  See the %OPLOK bit and
795                         ITS LOCKS.
796 \f
797 .PAGAHEAD       +* +*   page-ahead control
798
799         Normally zero, this word is set nonzero to enable
800         sequential paging through a part of the address space
801         specified by .PAGRANGE.  The right half of .PAGAHEAD is
802         the page-ahead interval width and the left half is the page-behind
803         distance.  Each time a page in the designated range is
804         touched for the first time, the next few pages, forming the
805         page-ahead interval begin to swap in, and a page a certain
806         distance behind (specified by the page-behind distance) is
807         swapped out or marked for swap out in the near future.  The
808         precise treatment depends on how loaded the system is.
809
810         Exactly one of the page-ahead interval width and the
811         page-behind distance should be negative.  The page-behind
812         distance should be negative, if memory is being used from low
813         addresses to high ones.  The page-ahead width should be
814         negative if moving from high addresses to low ones.
815
816         Example: -2,,4 means on first reference to page n, start
817         reading in pages n+1 through n+4 and possibly swap out page n-2.
818         Page n-1 is not affected until page n+1 is touched.  A
819         page-behind distance of 2 means that two consecutive pages are
820         always available.
821 \f
822 .PAGRANGE       +* +*   page-ahead range
823
824         Normally zero, this word is made nonzero together with .PAGAHEAD
825         to enable the sequential paging feature.  The two halves of
826         .PAGRANGE are page numbers which specify the region of the 
827         address space in which sequential paging should go on.
828         The left half specifies the first page in the sequentially
829         paged region, and the right half specifies the first page
830         after the end of that region.
831 \f
832 .PICLR          +* +*   priority interrupt clear
833
834         Initially -1.
835         If non-zero, the job may take interrupts.  If zero,
836         interupts are deferred.  This variable is cleared
837         when an old-style interrupt occurs (but not by new-style
838         interupts!), and is set to -1 by the .DISMISS uuo
839         and the DISMIS symbolic system call.  Attempts
840         to set this variable will convert the value to -1 or 0
841         depending on bit 4.9.
842
843 \1f       
844 .PIRQC          +* +*   priority interrupt request cruft (?)
845
846         This word contains bits for pending word 1 interrupts.
847         Setting bits in this causes the corresponding interrupts
848         to attempt to take place, subject to .MASK, .DF1,
849         .PICLR (q.v.), and the %OPINT bit of the .OPTION user
850         variable (see ITS INTRUP).
851
852         Interrupts are of three classes:
853         1       Very serious.  The job is stopped and its
854                 superior interrupted.
855         2       Semi-serious.  The job may request to handle
856                 such an interrupt by setting the corresponding
857                 bit in .MASK (q.v.); otherwise it is treated
858                 as a class 1 interrupt.
859         3       Trivial.  The job receives the interrupt if it
860                 has requested to handle it; otherwise the
861                 interrupt condition is ignored.  (Under the
862                 new-style interrupt scheme, a class 3 interrupt
863                 may become a class 1 interrupt.)
864         See also the .IFPIR variable for word 2 interrupts.
865
866         The interrupt bits and their classes are as follows.
867         The character * denotes a class 1 interrupt, and + a
868         class 2 interrupt.
869                 4.9     Must be zero.
870         %PIRLT  4.8     Clock break (see the .REALT uuo).
871         %PIRUN  4.7     Run time interrupt (see the .RTMR user variable).
872         %PINXI  4.6  +  Non-Existent IO register
873                         A Job in User IOT mode referenced a non-existent IO
874                         register on the KS10 Unibus.  The PC is left
875                         pointing before the guilty instruction.  The address
876                         of the non-existant register may be found in .MPVA.
877         %PIJST  4.5     Job Status display request.
878                         The sequence ^_J was typed on the console owned
879                         by this process or some inferior.
880         %PIDCL  4.4  *  A defered call was typed while the job had the TTY.
881         %PIATY  4.3     The tty was given back to the job by
882                         its superior.  Indicates that the screen has
883                         probably been written on and its contents
884                         have changed unpredictably.
885         %PITTY  4.2  +  Attempt to use tty when not possessing it.
886         %PIPAR  4.1  +  Parity error.
887         %PIFOV  3.9     Arithmetic floating overflow.
888         %PIWRO  3.8  +  Attempt to write into read only memory.
889                         See the .MPVA user variable.
890         %PIFET  3.7  +  Pure page trap (attempt to fetch an instruction from
891                         writable memory when bit 4.2 of the PC set).
892                         This feature doesn't exist on KL-10's, instead
893                         this interrupt is signalled for "Illegal entry
894                         to concealed mode" which you probably can't make
895                         happen.  (See the KI10 Processor Reference Manual.)
896                         See bit 4.2 of the .UPC user variable.
897         %PITRP  3.6  *  System uuo to user trap (see the .UTRP user variable).
898                 3.5     Arm tip break 3 (OBSOLETE).
899                 3.4     Arm tip break 2 (OBSOLETE).
900                 3.3     Arm tip break 1 (OBSOLETE).
901         %PIDBG  3.2     System being debugged (occurs when someone uses the
902                         .SETLOC or .IFSET uuo to alter SYSDBG and the new contents
903                         are non-zero and the old contents non-negative).
904                         See also the SSTATU symbolic system call.
905         %PILOS  3.1  +  A .LOSE UUO or LOSE system call was executed
906                         (their purpose is to signal the superior).
907         %PICLI  2.9     CLI device interrupt.
908         %PIPDL  2.8     Pdl overflow.
909         %PILTP  2.7     Light pen interrupt on 340.
910                         Program stop or hit stop on E&S display.
911         %PIMAR  2.6  +  MAR interrupt (see the .MARA and .MARPC user variables).
912         %PIMPV  2.5  +  Memory protection violation (attempt to reference
913                         a page not in the job's page map).  See the .MPVA
914                         user variable.
915         %PICLK  2.4     Slow clock interrupt (every .5 second).
916         %PI1PR  2.3  *  Single intruction proceed interrupt.
917                         Used by DDT for ^N commands.
918         %PIBRK  2.2  *  Breakpoint interrupt (.BREAK uuo executed).
919         %PIOOB  2.1  +  Illegal user address. (OBSOLETE)
920         %PIIOC  1.9  +  Input/output channel error (see the .BCHN
921                         and .IOS user variables).
922         %PIVAL  1.8  *  Value interrupt (.VALUE uuo executed).
923         %PIDWN  1.7     System going down or being revived.  See the .SHUTDN, .REVIVE,
924                         and .DIETIME uuo's, and the SSTATU symbolic call.
925         %PIILO  1.6  +  Illegal instruction operation.
926         %PIDIS  1.5  +  Display memory protection violation (340 or E&S).
927         %PIARO  1.4     Arithmetic overflow.
928         %PIB42  1.3  *  Bad location 42 (see the .40ADDR user variable, and ITS INTRUP).
929         %PIC.Z  1.2  *  ^Z typed when this job had the TTY.
930         %PITYI  1.1     Character enabled for interrupt was typed on TTY.
931                         (Semi-obsolete; see the .IFPIR user variable, and ITS TTY.)
932 \f
933 .PMAP +<n>      +- +-   page map word
934
935         This is the page map word for page <n> of the job,
936         for <n> between 0 and 377 octal (256.K = 400 1K pages).
937         The map word read has this form:
938         4.9     %CBWRT  Page is writable.
939         4.8     %CBRED  Page exists (if this bit is zero, then the
940                         whole word is zero).
941         4.7     ???     Page is in core (as opposed to swapped out).
942         4.6     %CBPUB  Page is public (any job can write into it
943                         which wants to).
944         4.2     %CBLOK  Page is locked in core
945                         (inhibited from swapout)
946         3.9     %CBSLO  Page is in slow memory
947                         (Doesn't work; Moon says it never will)
948         3.8-3.1 Number of times the page is shared.
949                 (See the CORTYP symbolic system call,
950                 right half of value 4.)
951         2.9-2.1 Absolute page number, or page number in next
952                 sharer in the circular list of sharers.
953                 (See CORTYP, value 3.)
954         1.9-1.1 0       Page is absolute.
955                 777     Page is not shared.
956                 <m>     Next sharer in circular list of sharers
957                         is the job with user index <m>.
958
959 \1f
960 .RTMR           +* +*   runtime timer
961
962         Initially -1.
963         If non-negative, the amount of run time remaining until the job
964         will receive a word 1 runtime interrupt.  (See bit %PIRUN of the
965         .PIRQC variable.)  The time is measured in slightly different units
966         on different CPUs.  On the KA in 4.069 microsecond units, on the KL
967         in 4 microsecond units, and on the KS in 3.9 microsecond units.
968
969 \1f
970 .RUNT           +- +-   run time
971
972         Initially 0.
973         This is the run time used so far by the job,
974         measured in units of 4 microseconds.
975 \1f
976 .SERVER         +* +*   server job
977
978         Initially -1.
979         This is the user index of a job that has been given special
980         permission to modify this job, or -1 if there is no such job.
981
982         This can be used to implement various oddball client/server
983         protocols between jobs.  The client job will request some service
984         from the server job and will set his .SERVER variable to the server's
985         user index to allow the service to be performed.
986
987         If the server job is killed, all of the client jobs will have their
988         .SERVER variables set back to -1.
989
990         Although it is safe to set .SERVER to -1 using .SUSET or .USET,
991         there can be timing errors if a client loads his .SERVER variable
992         by simply writing the server's user index into it.  Specifically,
993         during the time the server's user index is sitting in the client's
994         memory, the server job might be killed and another job started with
995         the same user index.  This can be guarded against by handling
996         interrupts on the USR: channel, but this is clumsy.  A better
997         method is to use the SSERVE system call.  (See .INFO.;ITS .CALLS)
998 \1f
999 .SNAME          +* +*   system name
1000
1001         This is a word of six sixbit characters which is
1002         the default "directory name" for various input/output
1003         operations.  It is initially the same as the job's
1004         .UNAME (q.v.).  It can be overridden by supplying the
1005         directory name explicitly to a symbolic system call.
1006         The other uuo's such as .OPEN and .FDELE always use .SNAME.
1007 \f
1008 .SUPPRO         +- +-   superior
1009
1010         This is -1 if the job is top-level, or the user index
1011         of the job's superior.  See .UIND.
1012
1013 \1f
1014 .SV40           +- +-   saved 40
1015
1016         The contents of absolute location 40 (i.e., the last
1017         uuo that trapped to the system for this job).
1018         See also the .UUOH user variable.
1019         Note that only uuo's 40-47 are really used for
1020         communication with the system.  All other uuo's are
1021         handed back to the executing job via its .40ADDR
1022         user variable (q.v.).
1023
1024 \1f
1025 .TR1INS         +? +?   Trap 1 instruction.
1026
1027         This is the instruction to be executed when arithmetic
1028         overflow occurs.  Op-code 0 is special, and uses
1029         its E.A. as interrupt bits to turn on in the RH of .PIRQC.
1030         The default contents of .TR1INS are simply %PIARO to
1031         set the overflow interrupt.  On the KA-10, writing the
1032         variable doesn't change it.
1033
1034 \1f
1035 .TR2INS         +? +?   Trap 2 instruction.
1036
1037         This is the instruction to be executed when pdl
1038         overflow occurs.  Op-code 0 is special, and uses
1039         its E.A. as interrupt bits to turn on in the RH of .PIRQC.
1040         The default contents of .TR2INS are simply %PIPDL to
1041         set the pdl overflow interrupt.  On the KA-10, writing the
1042         variable doesn't change it.
1043
1044 \1f
1045 .TTST           +- +-   saved TTYSTS
1046
1047         In a job which does not have the TTY, this variable
1048         holds the saved contents of TTYSTS (what would be in
1049         TTYSTS if the job were given a TTY).   This is primarily
1050         useful for examining from DDT.
1051         See ITS TTY for a description of the contents of TTYSTS.
1052         See also the TTYGET and TTYSET symbolic system calls.
1053
1054 \1f
1055 .TTS1           +- +-   saved TTYST1
1056
1057         Like .TTST, but for the TTYST1 variable instead of the
1058         TTYSTS variable.
1059
1060 \1f
1061 .TTS2           +- +-   saved TTYST2
1062
1063         Like .TTST, but for the TTYST2 variable rather than the
1064         TTYSTS variable.
1065 \f
1066 .TTY            +* +*   random TTY variable
1067
1068         This variable indicates the status of the job with
1069         respect to the console controlling its job tree.
1070         The %TBNVR, %TBINT, %TBWAT, %TBOUT, %TBINF, %TBOIG, and %TBIIN bits
1071         are settable. %TBWAT may be set only by the superior.
1072         4.9     %TBNOT  Does not have TTY now.
1073         4.8     %TBNVR  If 1, an OPEN on the tty will fail
1074                         rather than hanging, unless %TBWAT is on.
1075         4.7     %TBINT  An attempt to use the console without owning
1076                         it will cause a %PITTY interrupt (LH of
1077                         the .PIRQC user variable), unless
1078                         %TBWAT is set to 1.
1079                         In particular an OPEN on the tty
1080                         will interrupt instead of failing or
1081                         hanging.
1082         4.6     %TBWAT  If 1, overrides the setting of %TBINT
1083                         and %TBNVR, and makes the system act
1084                         as if they were 0.  Settable only with
1085                         .USET.  DDT sets this bit when $P'ing a
1086                         job, so that even if the job loses the tty
1087                         momentarily it will not get upset.
1088         4.4     %TBDTY  If the TTY was taken from the job,
1089                         then when it gets it back, this bit says
1090                         that the TTY should stay with the job
1091                         and not be passed down to an inferior.
1092         4.3     %TBOUT  Allow this job to type out, even if it
1093                         doesn't have the TTY.  Some operations,
1094                         and all input will still require the job
1095                         to have the TTY.  Not effective unless
1096                         the superior enables it by setting %TBINF
1097                         in the superior's .TTY var.
1098         4.2     %TBINF  Enable this job's inferiors to take
1099                         advantage of their %TBOUT's.
1100         4.1     %TBOIG  Ignore output.  Overrides %TBWAT, %TBINT.
1101         3.9     %TBIIN  Interrupt on attempt to do input.  Overrides
1102                         %TBWAT.
1103         3.6-3.1 $TBECL  Number if echo lines, if the job
1104                         doesn't currently have the TTY.
1105         2.9-1.1 If the job has the TTY, this is the TTY number.
1106                 If it doesn't, and doesn't want it, this is the
1107                 (internal) user number of the immediately
1108                 inferior job to give the TTY to.
1109 \f
1110 .TVCREG         +* +*   TV console register
1111
1112         Initially -1.
1113         This variable is placed in the console register
1114         when the job is run if it is non-negative.
1115         It controls which video buffer memory is used
1116         when writing into the job's tty's TV buffer     
1117         (see the CORBLK symbolic system call).
1118         The format of the console register is as follows:
1119         4.9-4.2 ALU function, used when writing into TV memory:
1120                 VALUE   SYMBOL  FUNCTION
1121                 0       CSETC   SETCAM
1122                 1       CNOR    ANDCBM
1123                 2       CANDC   ANDCAM
1124                 3       CSETZ   SETZM
1125                 4       CNAND   ORCBM
1126                 5       CCOMP   SETCMM
1127                 6       CXOR    XORM
1128                 7       CANCSD  ANDCMM
1129                 10      CORCSD  ORCAM
1130                 11      CEQV    EQVM
1131                 12      CSAME   SETMM/MOVES/JFCL
1132                 13      CAND    ANDM
1133                 14      CSETO   SETOM
1134                 15      CORSCD  ORCMM
1135                 16      CIOR    IORM
1136                 17      CSET    SETAM/MOVEM
1137         Note that those symbols are not predefined in MIDAS.
1138         4.1-3.3 Video buffer number (video switch input number).
1139                 See the VIDSW symbolic system call.
1140
1141 \1f
1142 .UIND           +- +-   user index      
1143
1144         The unique number assigned to the job by the system     
1145         when the job was created.  These numbers typically
1146         are between 0 and 77 octal or so (the exact maximum value
1147         is a function of the particular incarnation of the
1148         system).  When a job is killed, its user index is
1149         freed for re-use.
1150         Most symbolic system calls  which require a job
1151         to be specified will accept 400000+the user index
1152         in lieu of a channel with the job open on it if the
1153         call is only to examine the job and not to modify it.
1154         The .GUN and DETACH commands require a user index.
1155         Jobs 0 and 1 are special in that they always stand for
1156         the system itself and for the CORE job, respectively.
1157         (The CORE job manages core allocation for the system.)
1158         This may have various implications depending on context;
1159         for example, when sharing a page with a job via the
1160         CORBLK symbolic system call, sharing with
1161         job 0 means sharing with an absolute page, and "sharing"
1162         with job 1 means getting a fresh page.
1163 \f
1164 .UNAME          +- +?   user name
1165
1166         A word of sixbit characters which is the user
1167         name of the job.  All jobs in a given job
1168         tree must all have the same user name.  Furthermore,
1169         a console-controlled tree may not log in if another
1170         console-controlled tree is logged in under the same
1171         uname.  When a new console-controlled tree is created
1172         by typing ^Z on a free console, the uname of the newly
1173         created top-level job of the tree is set to "___nnn",
1174         where "nnn" is the user index of the newly-created
1175         job.  A non-disowned non-console controlled job is also given
1176         such a uname initially.  This may subsequently be changed to
1177         something more reasonable by using the LOGIN symbolic
1178         system call.
1179         The uname of a newly created inferior job is initialized
1180         to the uname of its creator.
1181         If a disowned job tree is re-owned, the unames of all the
1182         jobs in the re-owned job tree are set to the uname of the
1183         re-owning job tree.
1184         The .UNAME user variable may be set only with a .SUSET, and
1185         only by a top level job which has no direct inferiors;
1186         furthermore, attempting to set the uname to zero or the left
1187         half to -1 causes an illegal operation interrupt (bit 1.6 of
1188         the .PIRQC user variable), as does attempting to make the
1189         uname-jname pair of the job non-unique.
1190         See also the .JNAME user variable.
1191 \f
1192 .UPC            +* +-   user program counter
1193
1194         The PC for the job.  This word, of course,
1195         contains the PC flags in the left half;
1196         a job may set these flags for itself only by
1197         using JRST 2,@[<word with flags and pc>].
1198         On KA's, the flags in the left half are as follows:
1199         (- = .USET may not set; % = peculiar to ITS)
1200         %PCARO==400000  Overflow.
1201         %PCCR0==200000  Carry 0.
1202         %PCCR1==100000  Carry 1.
1203         %PCFOV==40000   Floating overflow.
1204         %PCFPD==20000   First part of instruction already done.
1205         %PCUSR==10000 - User mode.
1206         %PCUIO==4000  - User I/O.
1207         %PCPUR==2000  % Pure.  Instructions may only be fetched from
1208                         read-only memory.  See bit 3.7 of the .PIRQC user
1209                         variable.  This feature is not available on
1210                         all machines -- beware!
1211         %PCSPC==1000  - Unused.  (A PDP6 feature)
1212         %PC1PR==400   % One proceed.  An interrupt will occur at the end
1213                         of the next instruction.  See bit 2.3 of the .PIRQC
1214                         user variable.  Used by DDT for ^N commands.
1215         %PCX17==200   % AI KA-10 computer only.  Index-off-the-PC hack.
1216                         When this bit is set, an index field of 17 means
1217                         index off the PC instead of ac 17.
1218         %PCFXU==100     Floating underflow.
1219         %PCDIV==40      No divide.
1220                 3.5-3.1 Always zero.  May not be set non-zero.
1221
1222         On KL's the flags are as follows (note the "|" at the front
1223         of lines that differ significantly from those for KA's):
1224
1225 |       %PSPCP==400000  "Previous Context Public" - this applies only
1226                         in exec mode; in user mode this bit is the same
1227                         as in KA (%PCARO, Arithmetic overflow).
1228         %PSCR0==200000  Carry 0.
1229         %PSCR1==100000  Carry 1.
1230         %PSFOV==40000   Floating overflow.
1231         %PSFPD==20000   First part of instruction already done.
1232         %PSUSR==10000 - User mode.
1233         %PSUIO==4000  - User I/O.
1234 |       %PSPUB==2000    "Public Mode" - not used in ITS
1235 |       %PSINH==1000    Inhibits MAR-breaks and trap3 (one-proceed trap)
1236 |                       for one instruction.
1237 |       %PSTR2==400     Set by pdl overflow;  causes the "trap 2 instruction"
1238 |                       to be executed.  That instruction is kept in .TR2INS
1239 |       %PSTR1==200     Set by arithmetic overflow;  causes the
1240 |                       "trap 1 instruction" in .TR1INS to be executed.
1241 |                       Both %PSTR1 and %PSTR2 set generates a one-proceed trap.
1242 |       %PS1PR==160   % %PSINH+%PSTR2+%PSTR1.  Setting those bits
1243 |                       causes a single instruction proceed.
1244         %PSFXU==100     Floating underflow.
1245         %PSDIV==40      No divide.
1246                 3.5-3.1 Always zero.  May not be set non-zero.
1247
1248         The user mode (4.4) is always set to 1.
1249         The user I/O bit (4000, bit 4.3) is set according
1250         to whether the job is in .IOTLSR mode.
1251
1252         If the .UPC user variable for one job is read by another while
1253         the first is running, an exec mode PC may be seen (bit 4.4 = 0);
1254         this reflects the fact that the job is in the middle
1255         of a system call or something.  The .UUOH user variable
1256         should then be examined (this is precisely what DDT does
1257         for the evaluation of \e.).
1258 \f
1259 .USTP           +* --   user stop bits
1260
1261         Initially <100000,,>.
1262         If this variable is non-zero, the job is being blocked
1263         from running for one reason or another.  If zero, the
1264         .FLS variable controls whether the job may run.
1265         The form of the .USTP variable is as follows:
1266         4.9     BCSTOP  Job is being moved in core.
1267         4.8     BUCSTP  Core job is stopping this job
1268                         in order to get more core for another job.
1269         4.7     BUSRC   User control bit.  Only this
1270                         bit may be modified, and only by the
1271                         procedure's superior.  Any attempt to
1272                         set the .USTP variable non-zero
1273                         will set this bit; any attempt to set it
1274                         to zero will clear this bit.
1275         4.6     BSSTP   Set while superior is altering the page
1276                         map for the job.  (Not directly settable
1277                         by superior.)
1278         2.9-1.1 Count of transient reasons for stopping the job.
1279                 If non-zero, inhibits relocation of the job by
1280                 the core job.
1281         PEEK displays this variable by printing the high six bits
1282         in octal, then a "!", then the rest in octal.  This is
1283         why one normally sees "10!0" for a stopped job.
1284
1285 \1f
1286 .UTRP           +* --   user trap switch
1287
1288         When non-zero, this switch specifies that all uuo's
1289         which trap to the system should, instead of performing
1290         their usual actions, should cause a word 1 class 1
1291         interrupt to the job executing the uuo.  This allows
1292         simulators, etc., to trap all uuo's executed by a job.
1293         An attempt to set this variable will use only bit 1.1.
1294
1295         This is the same as the %OPTRP bit of the .OPTION user variable.
1296
1297 \1f
1298 .UUOH           +- +-   system uuo PC
1299
1300         The program counter as of the last uuo which trapped
1301         to absolute location 40 (not location 40 in the job,
1302         nor the location specified by .40ADDR!)
1303         See also the variable .SV40.
1304
1305 \1f
1306 .VAL            +* +*   value or error code of job
1307
1308         .VALUE instructions set this word to the contents
1309         of the memory location they address.  That is useless.
1310         More importantly, .LOSE instructions, and the LOSE
1311         system call, set .VAL to <error code>,,<addr of losing
1312         instruction>, so that the superior can decode the
1313         error.
1314 \f
1315 .WHO1           +* +*   user who-line control word
1316
1317         This variable controls the printing of .WHO2 and .WHO3
1318         at the end of the TV who-line (see ITS TV).
1319         4.9     If 1, suppress the who-line entirely when focused
1320                 on this job.
1321         4.8     Suppress space between halves of .WHO2.
1322         4.7-4.5 Mode for printing left half of .WHO2:
1323                 0       Do not print.
1324                 1       Date in packed form:
1325                         4.9-4.3 Year (mod 100.).
1326                         4.2-3.8 Month.
1327                         3.7-3.3 Day.
1328                         3.2-3.1 Unused.
1329                         See the RQDATE symbolic system call, but
1330                         note that here the date is shifted.
1331                 2       Time in fortieths of a second, printed in tenths
1332                         in the form HH:MM:SS.T.
1333                 3       Time in half-seconds, printed in the form HH:MM:SS.
1334                 4       Octal halfword.
1335                 5       Decimal halfword (no . is supplied).
1336                 6       Three sixbit characters.
1337                 7       Unused.
1338         4.4-4.2 Mode for printing right half of .WHO2.
1339         4.1     Print 3.9-3.3 twice (doubled character).
1340         3.9-3.3 If non-zero, character to print after left half of .WHO2.
1341         3.2     If 1, suppress the space between .WHO2 and .WHO3 printout.
1342         3.1     If 1, suppress the space between halves of .WHO3.
1343         2.9-2.7 Mode for printing left half of .WHO3.
1344         2.6-2.4 Mode for printing right half of .WHO3.
1345         2.3     Print 2.2-1.5 twice.
1346         2.2-1.5 If non-zero, character to print after left half of .WHO3.
1347         1.4-1.1 Unused.
1348         That is, if the who-line is printed at all, what appears
1349         at the end is these characters:
1350                         AAAAXX-BBBB=CCCCYY+DDDD
1351         where:  AAAA is the result of printing the left half of .WHO2.
1352                 BBBB right half of .WHO2.
1353                 CCCC left half of .WHO3.
1354                 DDDD right half of .WHO3.
1355                 XX one or two characters specified by .WHO1 4.1-3.3.
1356                 YY one or two characters specified by .WHO1 2.3-1.5.
1357                 - space, unless .WHO1 4.8 is 1.
1358                 = space, unless .WHO1 3.2 is 1.
1359                 + space, unless .WHO1 3.1 is 1.
1360         Note that the specifications fall neatly into 8-bit bytes
1361         (for the convenience of the PDP-11); hence it is easiest
1362         to specify this word using .BYTE 8 in MIDAS.
1363         Example:
1364                 .SUSET [.SWHO1,,[ .BYTE 8 ? 166 ? 0 ? 144 ? 200+", ]]
1365         causes .WHO2 to appear as a word of sixbit, and .WHO3 to
1366         appear as octal halfword typeout in mmm,,nnn format.
1367
1368 \1f
1369 .WHO2           +* +*   first user who-line variable
1370
1371         See .WHO1 for details.
1372
1373 \1f
1374 .WHO3           +* +*   second user who-line variable
1375
1376         See .WHO1 for details.
1377 \f
1378 .XJNAME         +* +*   "intended" job name.
1379
1380         This variable holds what the job's name was "intended"
1381         to be, by its creator.  Why might the job's name not
1382         actually be what it was intended to be?  Perhaps because
1383         that name was already in use by some other job, and the
1384         creator had to find a second choice.  For example, when
1385         :NEW T in DDT creates a job named T0 because there was
1386         already a job named T, the job T0's .XJNAME will be "T".
1387         In any case, when using the common technique of having
1388         several programs be links to one file, which figures
1389         out what name it was invoked under and behaves
1390         accordingly, the .XJNAME is the right place to look to
1391         find out what behavior the invoker desires.
1392
1393         When a job is first created, its .XJNAME is the same as it's .JNAME.
1394
1395 \1f
1396 .XUNAME         +* +*   "real" user name.
1397
1398         This variable holds what says who you really are,
1399         as opposed to what you are logged in as.
1400         It should be a word of sixbit, just like .UNAME.
1401         For example, if you are logged in as FOO1 then
1402         your XUNAME will probably be FOO, because that's
1403         what DDT will normally set it to.  However, though
1404         the .UNAME may change because of reowning or attaching,
1405         the .XUNAME will ot change iunless requested specifically.
1406         However, the user may alter DDT's .XUNAME by depositing in
1407         ..XUNAME, which works by informing DDT and having DDT
1408         tell ITS.
1409         Whenever an inferior is created, its .XUNAME is initialized
1410         from its superior's.