Consolidate license copies
[its.git] / sysdoc / usets.119
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     ARPAnet (NCP).
595         27      SNLPV   LPT     Vogue line printer (yech!)
596         30      SNSTK   STK     Stanford keyboard.
597         31      SNMSP   MSP     (DM) Interprocess message protocol.
598         32      SNCHA   CHAOS   CHAOS net.
599         33      SNTCP   TCP     TCP Internet.
600         34      SNTRAP  TRAP    Trap "device"
601         35      SNIPQ   IPQ     Internet IP Queue.
602         41      SNUTC   UTn     Microtape (DECtape).
603         43      SN2311  DSK     2311 disk drives or equivalent.
604         60      SNFUSR  USR     A foreign (not immediately inferior) procedure.
605         61      SNUSR   USR     An immediately inferior procedure.
606         62      SNCLK   CLx     Various core link devices (x \ 6 {AIOU})
607         63      SNDIR   ---     File directory or ERR device.
608         64      SNPDP   USR     The PDP-6.
609         65      SNDIRH  DIRHNG  Directory hang "device"
610         66      SNLCK   LOCK    Lock "device"
611 \f
612 .IPIRQC         +* +*   IORM into .PIRQC
613
614         Like .PIRQC (q.v.) when reading.
615         Performs IORM into .PIRQC when writing.
616
617 \1f
618 .JNAME          +* +?   job name
619
620         The name of the job as a word of sixbit characters.
621         The uname-jname pair must be unique to a job
622         (there are some exceptions involving system-created
623         jobs or jobs not logged in).
624         The uname and jname are used as file names when
625         creating or subsequently opening the job on the USR
626         device.  See also the .UNAME user variable.
627         The .JNAME variable may be set by a .SUSET only in a
628         top-level job, and then only if the job has no
629         inferiors.
630         Attempting to set a jname to zero causes an
631         illegal operation interrupt (bit 1.6 of the .PIRQC
632         user variable).  So does attempting to set it such that
633         the uname-jname pair would no longer be unique.
634         So does attempting to illegally set one's own jname.
635
636 \1f
637 .JPC            +* +*   jump program counter
638
639         The PC as of the most recent jump instruction,
640         i.e. an instruction which changed the PC by other
641         than 1 or 2.  This is actually a register in the
642         paging box when running.
643
644 \1f
645 .MARA           +* +*   MAR (memory address register) address
646
647         Initially 0.
648         The address for the MAR register in the paging box,
649         which gives a %PIMAR interrupt when the specified operation
650         is performed on the specified address.
651                 3.3     0 = exec mode, 1 = user mode.
652                         This is forced to 1 when set with
653                         .SUSET or .USET; exec mode is for very
654                         obscure system hacks only.
655                 3.2-3.1 0  Never interrupt.
656                         1  Interrupt on instruction fetch.
657                         2  Interrupt on write.
658                         3  Interrupt on any reference.
659                 2.9-2.1 Address for MAR.
660         The MAR does not work well on accumulators.
661         See also the .PIRQC user variable, bit %PIMAR;
662         and ITS INTRUP and ITS USR.
663 \f
664 .MARPC          +* +*   MAR program counter
665
666         The PC as of the instruction that most recently
667         tripped the MAR interrupt, if any.  In addition,
668         the indirect bit will be set if that instruction
669         completed successfully (was not aborted by the MAR
670         hit).  See the .MARA user variable.
671
672 \1f
673 .MASK           +* +*   word 1 interrupt mask
674
675         Initially 0.
676         This is a mask for word 1 interrupts which indicates
677         which interrupts the job is prepared to handle.
678         If a class 2 or class 3 word 1 interrupt tries to
679         occur, but the corresponding bit in .MASK is not
680         set, then the interrupt is converted to class 1 or
681         ignored, respectively.  The bits in .MASK directly
682         correspond to those in .PIRQC (q.v.).  Bits for class
683         1 interrupts are AND'ed out before setting the .MASK
684         variable.
685
686 \1f       
687 .MBO1           +- +-   KL-10 Mbox counter
688
689         This is the low-order word of the KL-10 Mbox counter
690         value for the job.  On KA-10's, it holds garbage.
691         Its location is .MBOX+1, for convenience.
692
693 \1f       
694 .MBOX           +- +-   KL-10 Mbox counter
695
696         This is the high-order word of the KL-10 Mbox counter
697         value for the job.  On KA-10's, it holds garbage.
698
699 \1f
700 .MEMT           +* +*   memory top
701
702         This variable contains 1 plus the highest legal
703         address in the job (the accessible word with the
704         largest address).  Setting this variables is like
705         performing an equivalent .CORE uuo (q.v.):
706                 .SUSET [.SMEMT,,[FOO]]
707         is like doing:
708                 .CORE <FOO+1777>_12
709
710 \1f
711 .MPVA           +- +-   memory protect violation address
712
713         The address which the last instruction to cause a memory protection
714         violation (or a write into read only memory violation) attempted to
715         reference, on KA-10's rounded down to a page boundary.  Thus an
716         attempt to reference the non-existent location 317435 would cause
717         .MPVA to be set to 316000 octal on a KA-10, or 317435 on a KL-10.
718
719         On the KS-10, .MPVA also holds the non-existant IO register address
720         after a %PINXI.
721
722         See also the .PIRQC variable.
723 \f
724 .MSK2           +* +*   word 2 interrupt mask
725
726         Initially 0.
727         This is a mask for word 2 interrupts which indicates
728         which interrupts the job is prepared to handle.
729         If a class 2 or class 3 word 2 interrupt tries to
730         occur, but the corresponding bit in .MSK2 is not
731         set, then the interrupt is converted to class 1 or
732         ignored, respectively.  The bits in .MSK2 directly
733         correspond to those in .IFPIR (q.v.).
734
735 \1f
736 .OPC            +- +-   old program counter
737
738         The PC just before the last instruction was executed.
739         This corresponds to a register in the paging box.
740         It doesn't exist on KL-10's.
741 \f
742 .OPTION         +* +*   option bits
743
744         Initially 0.
745         The bits in this word correspond to various options
746         as follows:
747         4.9     %OPTRP  Same as the .UTRP user variable.  See ITS UUO.
748         4.8     %OPDET  ** This bit is OBSOLETE and NO LONGER EXISTS **
749                         It is documented for historical purposes only.
750                         Nowadays, fatal interrupts always cause top-level
751                         jobs to be detached.  Once upon a time, top-level
752                         jobs with consoles would be reloaded instead of
753                         detached, unless they had set %OPDET=1.
754                         See the DETACH and RELOAD symbolic system calls.
755         4.7     %OPDEC  Uuo's 40, 41, and 47 (that is,
756                         .IOT, .OPEN, and .ACCESS)
757                         should trap to the user as uuos
758                         via the .40ADDR user variable (q.v.).
759                         This is useful for programs which wish to
760                         interpret DEC TOPS-10 UUO's, since those are the
761                         only ones which conflict with ITS UUOs.
762                         Luckily, those ITS UUOs are not essential since
763                         there are symbolic system calls to do the same things.
764         4.6     %OPCMD  Superior claims it has JCL which
765                         it will cheerfully supply in response to
766                         the appropriate .BREAK 12, command.
767         4.5     %OPBRK  Superior claims to handle all .BREAK's.
768         4.4     %OPDDT  Superior claims to be DDT.
769         4.3     %OPINT  Job desires new-style (vectored
770                         and stacked) interrupts.  See also the
771                         .40ADDR variable.  See ITS INTRUP for
772                         information on old- and new-style
773                         interrupts.
774         4.2     %OPOJB  Other jobs may open this job
775                         as the OJB device, thereby turning it
776                         into a JOB device.  See ITS JOB.
777         4.1     %OPLOK  Job desires the switch locking
778                         and unlocking synchronization feature.
779                         See also the .40ADDR variable.
780                         See ITS LOCKS for information on locks.
781         3.9     %OPLIV  The job tree of which this is the
782                         top-level job is permitted to survive a
783                         system shutdown -- it should take care
784                         of logging itself out.  See the .SHUTDN uuo.
785                         Meaningful only for top-level jobs.
786                         Primarily useful for system demons which need to
787                         survive system death (e.g. the statistics
788                         demon PFTHMG DRAGON).
789         3.8     %OPOPC  Job desires that instruction-aborting interrupts
790                         such as MPV leave the PC pointing before the
791                         instruction that lost, instead of the old
792                         convention of leaving it pointing after.
793                         The new convention is far better and all new
794                         programs should use it.
795         3.7     %OPLSP  Superior claims to be MacLisp.
796         3.6     %OPLKF  Unlock locks on fatal interrupt.  When a
797                         non-disowned top-level job receives a fatal
798                         interrupt, if it has set this bit, its locks will
799                         be unlocked by the system job as part of the
800                         process of detaching it.  See the %OPLOK bit and
801                         ITS LOCKS.
802 \f
803 .PAGAHEAD       +* +*   page-ahead control
804
805         Normally zero, this word is set nonzero to enable
806         sequential paging through a part of the address space
807         specified by .PAGRANGE.  The right half of .PAGAHEAD is
808         the page-ahead interval width and the left half is the page-behind
809         distance.  Each time a page in the designated range is
810         touched for the first time, the next few pages, forming the
811         page-ahead interval begin to swap in, and a page a certain
812         distance behind (specified by the page-behind distance) is
813         swapped out or marked for swap out in the near future.  The
814         precise treatment depends on how loaded the system is.
815
816         Exactly one of the page-ahead interval width and the
817         page-behind distance should be negative.  The page-behind
818         distance should be negative, if memory is being used from low
819         addresses to high ones.  The page-ahead width should be
820         negative if moving from high addresses to low ones.
821
822         Example: -2,,4 means on first reference to page n, start
823         reading in pages n+1 through n+4 and possibly swap out page n-2.
824         Page n-1 is not affected until page n+1 is touched.  A
825         page-behind distance of 2 means that two consecutive pages are
826         always available.
827 \f
828 .PAGRANGE       +* +*   page-ahead range
829
830         Normally zero, this word is made nonzero together with .PAGAHEAD
831         to enable the sequential paging feature.  The two halves of
832         .PAGRANGE are page numbers which specify the region of the 
833         address space in which sequential paging should go on.
834         The left half specifies the first page in the sequentially
835         paged region, and the right half specifies the first page
836         after the end of that region.
837 \f
838 .PICLR          +* +*   priority interrupt clear
839
840         Initially -1.
841         If non-zero, the job may take interrupts.  If zero,
842         interupts are deferred.  This variable is cleared
843         when an old-style interrupt occurs (but not by new-style
844         interupts!), and is set to -1 by the .DISMISS uuo
845         and the DISMIS symbolic system call.  Attempts
846         to set this variable will convert the value to -1 or 0
847         depending on bit 4.9.
848
849 \1f       
850 .PIRQC          +* +*   priority interrupt request cruft (?)
851
852         This word contains bits for pending word 1 interrupts.
853         Setting bits in this causes the corresponding interrupts
854         to attempt to take place, subject to .MASK, .DF1,
855         .PICLR (q.v.), and the %OPINT bit of the .OPTION user
856         variable (see ITS INTRUP).
857
858         Interrupts are of three classes:
859         1       Very serious.  The job is stopped and its
860                 superior interrupted.
861         2       Semi-serious.  The job may request to handle
862                 such an interrupt by setting the corresponding
863                 bit in .MASK (q.v.); otherwise it is treated
864                 as a class 1 interrupt.
865         3       Trivial.  The job receives the interrupt if it
866                 has requested to handle it; otherwise the
867                 interrupt condition is ignored.  (Under the
868                 new-style interrupt scheme, a class 3 interrupt
869                 may become a class 1 interrupt.)
870         See also the .IFPIR variable for word 2 interrupts.
871
872         The interrupt bits and their classes are as follows.
873         The character * denotes a class 1 interrupt, and + a
874         class 2 interrupt.
875                 4.9     Must be zero.
876         %PIRLT  4.8     Clock break (see the .REALT uuo).
877         %PIRUN  4.7     Run time interrupt (see the .RTMR user variable).
878         %PINXI  4.6  +  Non-Existent IO register
879                         A Job in User IOT mode referenced a non-existent IO
880                         register on the KS10 Unibus.  The PC is left
881                         pointing before the guilty instruction.  The address
882                         of the non-existant register may be found in .MPVA.
883         %PIJST  4.5     Job Status display request.
884                         The sequence ^_J was typed on the console owned
885                         by this process or some inferior.
886         %PIDCL  4.4  *  A defered call was typed while the job had the TTY.
887         %PIATY  4.3     The tty was given back to the job by
888                         its superior.  Indicates that the screen has
889                         probably been written on and its contents
890                         have changed unpredictably.
891         %PITTY  4.2  +  Attempt to use tty when not possessing it.
892         %PIPAR  4.1  +  Parity error.
893         %PIFOV  3.9     Arithmetic floating overflow.
894         %PIWRO  3.8  +  Attempt to write into read only memory.
895                         See the .MPVA user variable.
896         %PIFET  3.7  +  Pure page trap (attempt to fetch an instruction from
897                         writable memory when bit 4.2 of the PC set).
898                         This feature doesn't exist on KL-10's, instead
899                         this interrupt is signalled for "Illegal entry
900                         to concealed mode" which you probably can't make
901                         happen.  (See the KI10 Processor Reference Manual.)
902                         See bit 4.2 of the .UPC user variable.
903         %PITRP  3.6  *  System uuo to user trap (see the .UTRP user variable).
904                 3.5     Arm tip break 3 (OBSOLETE).
905                 3.4     Arm tip break 2 (OBSOLETE).
906                 3.3     Arm tip break 1 (OBSOLETE).
907         %PIDBG  3.2     System being debugged.
908                         Occurs when someone uses the .SETLOC or .IFSET uuo
909                         to alter SYSDBG and the new contents are non-zero
910                         and the old contents non-negative.
911                         (See also the SSTATU symbolic system call.)
912         %PILOS  3.1  +  A .LOSE UUO or LOSE system call was executed
913                         (their purpose is to signal the superior).
914         %PICLI  2.9     CLI device interrupt.
915         %PIPDL  2.8     Pdl overflow.
916         %PILTP  2.7     Light pen interrupt on 340.
917                         Program stop or hit stop on E&S display.
918         %PIMAR  2.6  +  MAR interrupt.
919                         (See the .MARA and .MARPC user variables.)
920         %PIMPV  2.5  +  Memory protection violation (attempt to reference
921                         a page not in the job's page map).
922                         (See the .MPVA user variable.)
923         %PICLK  2.4     Slow clock interrupt (every .5 second).
924         %PI1PR  2.3  *  Single intruction proceed interrupt.
925                         Used by DDT for ^N commands.
926         %PIBRK  2.2  *  Breakpoint interrupt (.BREAK uuo executed).
927         %PIOOB  2.1  +  Illegal user address. (OBSOLETE)
928         %PIIOC  1.9  +  Input/output channel error.
929                         (See the .BCHN and .IOS user variables.)
930         %PIVAL  1.8  *  Value interrupt (.VALUE uuo executed).
931         %PIDWN  1.7     System going down or being revived.
932                         (See the .SHUTDN, .REVIVE, and .DIETIME uuo's,
933                         and the SSTATU symbolic call.)
934         %PIILO  1.6  +  Illegal instruction operation.
935         %PIDIS  1.5  +  Display memory protection violation (340 or E&S).
936         %PIARO  1.4     Arithmetic overflow.
937         %PIB42  1.3  *  Bad location 42.
938                         (See the .40ADDR user variable, and ITS INTRUP.)
939         %PIC.Z  1.2  *  ^Z typed when this job had the TTY.
940         %PITYI  1.1     Character enabled for interrupt was typed on TTY.
941                         (Semi-obsolete; see the .IFPIR user variable,
942                         and ITS TTY.) 
943 \f
944 .PMAP +<n>      +- +-   page map word
945
946         This is the page map word for page <n> of the job,
947         for <n> between 0 and 377 octal (256.K = 400 1K pages).
948         The map word read has this form:
949         4.9     %CBWRT  Page is writable.
950         4.8     %CBRED  Page exists (if this bit is zero, then the
951                         whole word is zero).
952         4.7     ???     Page is in core (as opposed to swapped out).
953         4.6     %CBPUB  Page is public (any job can write into it
954                         which wants to).
955         4.2     %CBLOK  Page is locked in core
956                         (inhibited from swapout)
957         3.9     %CBSLO  Page is in slow memory
958                         (Doesn't work; Moon says it never will)
959         3.8-3.1 Number of times the page is shared.
960                 (See the CORTYP symbolic system call,
961                 right half of value 4.)
962         2.9-2.1 Absolute page number, or page number in next
963                 sharer in the circular list of sharers.
964                 (See CORTYP, value 3.)
965         1.9-1.1 0       Page is absolute.
966                 777     Page is not shared.
967                 <m>     Next sharer in circular list of sharers
968                         is the job with user index <m>.
969
970 \1f
971 .RTMR           +* +*   runtime timer
972
973         Initially -1.
974         If non-negative, the amount of run time remaining until the job
975         will receive a word 1 runtime interrupt.  (See bit %PIRUN of the
976         .PIRQC variable.)  The time is measured in slightly different units
977         on different CPUs.  On the KA in 4.069 microsecond units, on the KL
978         in 4 microsecond units, and on the KS in 3.9 microsecond units.
979
980 \1f
981 .RUNT           +- +-   run time
982
983         Initially 0.
984         This is the run time used so far by the job,
985         measured in units of 4 microseconds.
986 \1f
987 .SERVER         +* +*   server job
988
989         Initially -1.
990         This is the user index of a job that has been given special
991         permission to modify this job, or -1 if there is no such job.
992
993         This can be used to implement various oddball client/server
994         protocols between jobs.  The client job will request some service
995         from the server job and will set his .SERVER variable to the server's
996         user index to allow the service to be performed.
997
998         If the server job is killed, all of the client jobs will have their
999         .SERVER variables set back to -1.
1000
1001         Although it is safe to set .SERVER to -1 using .SUSET or .USET,
1002         there can be timing errors if a client loads his .SERVER variable
1003         by simply writing the server's user index into it.  Specifically,
1004         during the time the server's user index is sitting in the client's
1005         memory, the server job might be killed and another job started with
1006         the same user index.  This can be guarded against by handling
1007         interrupts on the USR: channel, but this is clumsy.  A better
1008         method is to use the SSERVE system call.  (See .INFO.;ITS .CALLS)
1009 \1f
1010 .SNAME          +* +*   system name
1011
1012         This is a word of six sixbit characters which is
1013         the default "directory name" for various input/output
1014         operations.  It is initially the same as the job's
1015         .UNAME (q.v.).  It can be overridden by supplying the
1016         directory name explicitly to a symbolic system call.
1017         The other uuo's such as .OPEN and .FDELE always use .SNAME.
1018 \f
1019 .SUPPRO         +- +-   superior
1020
1021         This is -1 if the job is top-level, or the user index
1022         of the job's superior.  See .UIND.
1023
1024 \1f
1025 .SV40           +- +-   saved 40
1026
1027         The contents of absolute location 40 (i.e., the last
1028         uuo that trapped to the system for this job).
1029         See also the .UUOH user variable.
1030         Note that only uuo's 40-47 are really used for
1031         communication with the system.  All other uuo's are
1032         handed back to the executing job via its .40ADDR
1033         user variable (q.v.).
1034
1035 \1f
1036 .TR1INS         +? +?   Trap 1 instruction.
1037
1038         This is the instruction to be executed when arithmetic
1039         overflow occurs.  Op-code 0 is special, and uses
1040         its E.A. as interrupt bits to turn on in the RH of .PIRQC.
1041         The default contents of .TR1INS are simply %PIARO to
1042         set the overflow interrupt.  On the KA-10, writing the
1043         variable doesn't change it.
1044
1045 \1f
1046 .TR2INS         +? +?   Trap 2 instruction.
1047
1048         This is the instruction to be executed when pdl
1049         overflow occurs.  Op-code 0 is special, and uses
1050         its E.A. as interrupt bits to turn on in the RH of .PIRQC.
1051         The default contents of .TR2INS are simply %PIPDL to
1052         set the pdl overflow interrupt.  On the KA-10, writing the
1053         variable doesn't change it.
1054
1055 \1f
1056 .TTST           +- +-   saved TTYSTS
1057
1058         In a job which does not have the TTY, this variable
1059         holds the saved contents of TTYSTS (what would be in
1060         TTYSTS if the job were given a TTY).   This is primarily
1061         useful for examining from DDT.
1062         See ITS TTY for a description of the contents of TTYSTS.
1063         See also the TTYGET and TTYSET symbolic system calls.
1064
1065 \1f
1066 .TTS1           +- +-   saved TTYST1
1067
1068         Like .TTST, but for the TTYST1 variable instead of the
1069         TTYSTS variable.
1070
1071 \1f
1072 .TTS2           +- +-   saved TTYST2
1073
1074         Like .TTST, but for the TTYST2 variable rather than the
1075         TTYSTS variable.
1076 \f
1077 .TTY            +* +*   random TTY variable
1078
1079         This variable indicates the status of the job with
1080         respect to the console controlling its job tree.
1081         The %TBNVR, %TBINT, %TBWAT, %TBOUT, %TBINF, %TBOIG, and %TBIIN bits
1082         are settable. %TBWAT may be set only by the superior.
1083         4.9     %TBNOT  Does not have TTY now.
1084         4.8     %TBNVR  If 1, an OPEN on the tty will fail
1085                         rather than hanging, unless %TBWAT is on.
1086         4.7     %TBINT  An attempt to use the console without owning
1087                         it will cause a %PITTY interrupt (LH of
1088                         the .PIRQC user variable), unless
1089                         %TBWAT is set to 1.
1090                         In particular an OPEN on the tty
1091                         will interrupt instead of failing or
1092                         hanging.
1093         4.6     %TBWAT  If 1, overrides the setting of %TBINT
1094                         and %TBNVR, and makes the system act
1095                         as if they were 0.  Settable only with
1096                         .USET.  DDT sets this bit when $P'ing a
1097                         job, so that even if the job loses the tty
1098                         momentarily it will not get upset.
1099         4.4     %TBDTY  If the TTY was taken from the job,
1100                         then when it gets it back, this bit says
1101                         that the TTY should stay with the job
1102                         and not be passed down to an inferior.
1103         4.3     %TBOUT  Allow this job to type out, even if it
1104                         doesn't have the TTY.  Some operations,
1105                         and all input will still require the job
1106                         to have the TTY.  Not effective unless
1107                         the superior enables it by setting %TBINF
1108                         in the superior's .TTY var.
1109         4.2     %TBINF  Enable this job's inferiors to take
1110                         advantage of their %TBOUT's.
1111         4.1     %TBOIG  Ignore output.  Overrides %TBWAT, %TBINT.
1112         3.9     %TBIIN  Interrupt on attempt to do input.  Overrides
1113                         %TBWAT.
1114         3.6-3.1 $TBECL  Number if echo lines, if the job
1115                         doesn't currently have the TTY.
1116         2.9-1.1 If the job has the TTY, this is the TTY number.
1117                 If it doesn't, and doesn't want it, this is the
1118                 (internal) user number of the immediately
1119                 inferior job to give the TTY to.
1120 \f
1121 .TVCREG         +* +*   TV console register
1122
1123         Initially -1.
1124         This variable is placed in the console register
1125         when the job is run if it is non-negative.
1126         It controls which video buffer memory is used
1127         when writing into the job's tty's TV buffer     
1128         (see the CORBLK symbolic system call).
1129         The format of the console register is as follows:
1130         4.9-4.2 ALU function, used when writing into TV memory:
1131                 VALUE   SYMBOL  FUNCTION
1132                 0       CSETC   SETCAM
1133                 1       CNOR    ANDCBM
1134                 2       CANDC   ANDCAM
1135                 3       CSETZ   SETZM
1136                 4       CNAND   ORCBM
1137                 5       CCOMP   SETCMM
1138                 6       CXOR    XORM
1139                 7       CANCSD  ANDCMM
1140                 10      CORCSD  ORCAM
1141                 11      CEQV    EQVM
1142                 12      CSAME   SETMM/MOVES/JFCL
1143                 13      CAND    ANDM
1144                 14      CSETO   SETOM
1145                 15      CORSCD  ORCMM
1146                 16      CIOR    IORM
1147                 17      CSET    SETAM/MOVEM
1148         Note that those symbols are not predefined in MIDAS.
1149         4.1-3.3 Video buffer number (video switch input number).
1150                 See the VIDSW symbolic system call.
1151
1152 \1f
1153 .UIND           +- +-   user index      
1154
1155         The unique number assigned to the job by the system     
1156         when the job was created.  These numbers typically
1157         are between 0 and 77 octal or so (the exact maximum value
1158         is a function of the particular incarnation of the
1159         system).  When a job is killed, its user index is
1160         freed for re-use.
1161         Most symbolic system calls  which require a job
1162         to be specified will accept 400000+the user index
1163         in lieu of a channel with the job open on it if the
1164         call is only to examine the job and not to modify it.
1165         The .GUN and DETACH commands require a user index.
1166         Jobs 0 and 1 are special in that they always stand for
1167         the system itself and for the CORE job, respectively.
1168         (The CORE job manages core allocation for the system.)
1169         This may have various implications depending on context;
1170         for example, when sharing a page with a job via the
1171         CORBLK symbolic system call, sharing with
1172         job 0 means sharing with an absolute page, and "sharing"
1173         with job 1 means getting a fresh page.
1174 \f
1175 .UNAME          +- +?   user name
1176
1177         A word of sixbit characters which is the user
1178         name of the job.  All jobs in a given job
1179         tree must all have the same user name.  Furthermore,
1180         a console-controlled tree may not log in if another
1181         console-controlled tree is logged in under the same
1182         uname.  When a new console-controlled tree is created
1183         by typing ^Z on a free console, the uname of the newly
1184         created top-level job of the tree is set to "___nnn",
1185         where "nnn" is the user index of the newly-created
1186         job.  A non-disowned non-console controlled job is also given
1187         such a uname initially.  This may subsequently be changed to
1188         something more reasonable by using the LOGIN symbolic
1189         system call.
1190         The uname of a newly created inferior job is initialized
1191         to the uname of its creator.
1192         If a disowned job tree is re-owned, the unames of all the
1193         jobs in the re-owned job tree are set to the uname of the
1194         re-owning job tree.
1195         The .UNAME user variable may be set only with a .SUSET, and
1196         only by a top level job which has no direct inferiors;
1197         furthermore, attempting to set the uname to zero or the left
1198         half to -1 causes an illegal operation interrupt (bit 1.6 of
1199         the .PIRQC user variable), as does attempting to make the
1200         uname-jname pair of the job non-unique.
1201         See also the .JNAME user variable.
1202 \f
1203 .UPC            +* +-   user program counter
1204
1205         The PC for the job.  This word, of course,
1206         contains the PC flags in the left half;
1207         a job may set these flags for itself only by
1208         using JRST 2,@[<word with flags and pc>].
1209         On KA's, the flags in the left half are as follows:
1210         (- = .USET may not set; % = peculiar to ITS)
1211         %PCARO==400000  Overflow.
1212         %PCCR0==200000  Carry 0.
1213         %PCCR1==100000  Carry 1.
1214         %PCFOV==40000   Floating overflow.
1215         %PCFPD==20000   First part of instruction already done.
1216         %PCUSR==10000 - User mode.
1217         %PCUIO==4000  - User I/O.
1218         %PCPUR==2000  % Pure.  Instructions may only be fetched from
1219                         read-only memory.  See bit 3.7 of the .PIRQC user
1220                         variable.  This feature is not available on
1221                         all machines -- beware!
1222         %PCSPC==1000  - Unused.  (A PDP6 feature)
1223         %PC1PR==400   % One proceed.  An interrupt will occur at the end
1224                         of the next instruction.  See bit 2.3 of the .PIRQC
1225                         user variable.  Used by DDT for ^N commands.
1226         %PCX17==200   % AI KA-10 computer only.  Index-off-the-PC hack.
1227                         When this bit is set, an index field of 17 means
1228                         index off the PC instead of ac 17.
1229         %PCFXU==100     Floating underflow.
1230         %PCDIV==40      No divide.
1231                 3.5-3.1 Always zero.  May not be set non-zero.
1232
1233         On KL's the flags are as follows (note the "|" at the front
1234         of lines that differ significantly from those for KA's):
1235
1236 |       %PSPCP==400000  "Previous Context Public" - this applies only
1237                         in exec mode; in user mode this bit is the same
1238                         as in KA (%PCARO, Arithmetic overflow).
1239         %PSCR0==200000  Carry 0.
1240         %PSCR1==100000  Carry 1.
1241         %PSFOV==40000   Floating overflow.
1242         %PSFPD==20000   First part of instruction already done.
1243         %PSUSR==10000 - User mode.
1244         %PSUIO==4000  - User I/O.
1245 |       %PSPUB==2000    "Public Mode" - not used in ITS
1246 |       %PSINH==1000    Inhibits MAR-breaks and trap3 (one-proceed trap)
1247 |                       for one instruction.
1248 |       %PSTR2==400     Set by pdl overflow;  causes the "trap 2 instruction"
1249 |                       to be executed.  That instruction is kept in .TR2INS
1250 |       %PSTR1==200     Set by arithmetic overflow;  causes the
1251 |                       "trap 1 instruction" in .TR1INS to be executed.
1252 |                       Both %PSTR1 and %PSTR2 set generates a one-proceed
1253 |                       trap. 
1254 |       %PS1PR==160   % %PSINH+%PSTR2+%PSTR1.  Setting those bits
1255 |                       causes a single instruction proceed.
1256         %PSFXU==100     Floating underflow.
1257         %PSDIV==40      No divide.
1258                 3.5-3.1 Always zero.  May not be set non-zero.
1259
1260         The user mode (4.4) is always set to 1.
1261         The user I/O bit (4000, bit 4.3) is set according
1262         to whether the job is in .IOTLSR mode.
1263
1264         If the .UPC user variable for one job is read by another while
1265         the first is running, an exec mode PC may be seen (bit 4.4 = 0);
1266         this reflects the fact that the job is in the middle
1267         of a system call or something.  The .UUOH user variable
1268         should then be examined (this is precisely what DDT does
1269         for the evaluation of \e.).
1270 \f
1271 .USTP           +* --   user stop bits
1272
1273         Initially <100000,,>.
1274         If this variable is non-zero, the job is being blocked
1275         from running for one reason or another.  If zero, the
1276         .FLS variable controls whether the job may run.
1277         The form of the .USTP variable is as follows:
1278         4.9     BCSTOP  Job is being moved in core.
1279         4.8     BUCSTP  Core job is stopping this job
1280                         in order to get more core for another job.
1281         4.7     BUSRC   User control bit.  Only this
1282                         bit may be modified, and only by the
1283                         procedure's superior.  Any attempt to
1284                         set the .USTP variable non-zero
1285                         will set this bit; any attempt to set it
1286                         to zero will clear this bit.
1287         4.6     BSSTP   Set while superior is altering the page
1288                         map for the job.  (Not directly settable
1289                         by superior.)
1290         2.9-1.1 Count of transient reasons for stopping the job.
1291                 If non-zero, inhibits relocation of the job by
1292                 the core job.
1293         PEEK displays this variable by printing the high six bits
1294         in octal, then a "!", then the rest in octal.  This is
1295         why one normally sees "10!0" for a stopped job.
1296
1297 \1f
1298 .UTRP           +* --   user trap switch
1299
1300         When non-zero, this switch specifies that all uuo's
1301         which trap to the system should, instead of performing
1302         their usual actions, should cause a word 1 class 1
1303         interrupt to the job executing the uuo.  This allows
1304         simulators, etc., to trap all uuo's executed by a job.
1305         An attempt to set this variable will use only bit 1.1.
1306
1307         This is the same as the %OPTRP bit of the .OPTION user variable.
1308
1309 \1f
1310 .UUOH           +- +-   system uuo PC
1311
1312         The program counter as of the last uuo which trapped
1313         to absolute location 40 (not location 40 in the job,
1314         nor the location specified by .40ADDR!)
1315         See also the variable .SV40.
1316
1317 \1f
1318 .VAL            +* +*   value or error code of job
1319
1320         .VALUE instructions set this word to the contents
1321         of the memory location they address.  That is useless.
1322         More importantly, .LOSE instructions, and the LOSE
1323         system call, set .VAL to <error code>,,<addr of losing
1324         instruction>, so that the superior can decode the
1325         error.
1326 \f
1327 .WHO1           +* +*   user who-line control word
1328
1329         This variable controls the printing of .WHO2 and .WHO3
1330         at the end of the TV who-line (see ITS TV).
1331         4.9     If 1, suppress the who-line entirely when focused
1332                 on this job.
1333         4.8     Suppress space between halves of .WHO2.
1334         4.7-4.5 Mode for printing left half of .WHO2:
1335                 0       Do not print.
1336                 1       Date in packed form:
1337                         4.9-4.3 Year (mod 100.).
1338                         4.2-3.8 Month.
1339                         3.7-3.3 Day.
1340                         3.2-3.1 Unused.
1341                         See the RQDATE symbolic system call, but
1342                         note that here the date is shifted.
1343                 2       Time in fortieths of a second, printed in tenths
1344                         in the form HH:MM:SS.T.
1345                 3       Time in half-seconds, printed in the form HH:MM:SS.
1346                 4       Octal halfword.
1347                 5       Decimal halfword (no . is supplied).
1348                 6       Three sixbit characters.
1349                 7       Unused.
1350         4.4-4.2 Mode for printing right half of .WHO2.
1351         4.1     Print 3.9-3.3 twice (doubled character).
1352         3.9-3.3 If non-zero, character to print after left half of .WHO2.
1353         3.2     If 1, suppress the space between .WHO2 and .WHO3 printout.
1354         3.1     If 1, suppress the space between halves of .WHO3.
1355         2.9-2.7 Mode for printing left half of .WHO3.
1356         2.6-2.4 Mode for printing right half of .WHO3.
1357         2.3     Print 2.2-1.5 twice.
1358         2.2-1.5 If non-zero, character to print after left half of .WHO3.
1359         1.4-1.1 Unused.
1360         That is, if the who-line is printed at all, what appears
1361         at the end is these characters:
1362                         AAAAXX-BBBB=CCCCYY+DDDD
1363         where:  AAAA is the result of printing the left half of .WHO2.
1364                 BBBB right half of .WHO2.
1365                 CCCC left half of .WHO3.
1366                 DDDD right half of .WHO3.
1367                 XX one or two characters specified by .WHO1 4.1-3.3.
1368                 YY one or two characters specified by .WHO1 2.3-1.5.
1369                 - space, unless .WHO1 4.8 is 1.
1370                 = space, unless .WHO1 3.2 is 1.
1371                 + space, unless .WHO1 3.1 is 1.
1372         Note that the specifications fall neatly into 8-bit bytes
1373         (for the convenience of the PDP-11); hence it is easiest
1374         to specify this word using .BYTE 8 in MIDAS.
1375         Example:
1376                 .SUSET [.SWHO1,,[ .BYTE 8 ? 166 ? 0 ? 144 ? 200+", ]]
1377         causes .WHO2 to appear as a word of sixbit, and .WHO3 to
1378         appear as octal halfword typeout in mmm,,nnn format.
1379
1380 \1f
1381 .WHO2           +* +*   first user who-line variable
1382
1383         See .WHO1 for details.
1384
1385 \1f
1386 .WHO3           +* +*   second user who-line variable
1387
1388         See .WHO1 for details.
1389 \f
1390 .XJNAME         +* +*   "intended" job name.
1391
1392         This variable holds what the job's name was "intended"
1393         to be, by its creator.  Why might the job's name not
1394         actually be what it was intended to be?  Perhaps because
1395         that name was already in use by some other job, and the
1396         creator had to find a second choice.  For example, when
1397         :NEW T in DDT creates a job named T0 because there was
1398         already a job named T, the job T0's .XJNAME will be "T".
1399         In any case, when using the common technique of having
1400         several programs be links to one file, which figures
1401         out what name it was invoked under and behaves
1402         accordingly, the .XJNAME is the right place to look to
1403         find out what behavior the invoker desires.
1404
1405         When a job is first created, its .XJNAME is the same as it's .JNAME.
1406
1407 \1f
1408 .XUNAME         +* +*   "real" user name.
1409
1410         This variable holds what says who you really are,
1411         as opposed to what you are logged in as.
1412         It should be a word of sixbit, just like .UNAME.
1413         For example, if you are logged in as FOO1 then
1414         your XUNAME will probably be FOO, because that's
1415         what DDT will normally set it to.  However, though
1416         the .UNAME may change because of reowning or attaching,
1417         the .XUNAME will ot change iunless requested specifically.
1418         However, the user may alter DDT's .XUNAME by depositing in
1419         ..XUNAME, which works by informing DDT and having DDT
1420         tell ITS.
1421         Whenever an inferior is created, its .XUNAME is initialized
1422         from its superior's.