Consolidate license copies
[its.git] / system / whovar.5
1 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
2 ;;;
3 ;;; This program is free software; you can redistribute it and/or
4 ;;; modify it under the terms of the GNU General Public License as
5 ;;; published by the Free Software Foundation; either version 3 of the
6 ;;; License, or (at your option) any later version.
7 ;;;
8 ;;; This program is distributed in the hope that it will be useful,
9 ;;; but 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 ;channel header pointer (location 40, read only)
18 ;
19 ;       ADDRESS(channel header area)
20 ;       ADDRESS(pointer area)
21 ;       I/O version number
22 ;       source file version number
23 ;       0       always 0
24 ;       INITED  non-zero indicates PDP-11 is running ok(can be cleared by PDP-10)
25 ;       0       always 0
26 ;       GDOWN   used as flag by PDP-10 to acknowledge clear of INITED
27 ;
28 ;channel header area (aligned on PDP-10 word)
29 ;
30 ;    KBD channel:
31 ;       KBDFLG  cleared by 10/set by 11 (chain of activated KBD buffers)
32 ;       0       allows PDP-10 to do SKIPN for activation test
33 ;    DPY channel: (1 per console)
34 ;       DPYCHN  buffer assigned to channel, if zero then DPY channel is closed
35 ;       DPYKBD  .BYTE KBD#, DPY# (377 for either implies not assigned)
36 ;    KBD flags: (1 per console)
37 ;       ECOFLG  Set by PDP-10.  Next time DPYBUF is empty clear ECOFLG
38 ;               and put flag on KBD ring to signal this condition
39 ;       CHNCLS  if -1, log this guy out!!!!
40 ;    WHO flags: (1 per console)
41 ;       WHOLIN  who line variables for this console
42 ;       WHOUSR  -1=>do system line, 0=>user who line
43 ;
44 ;format of KBD buffer (aligned on PDP-10 word)
45 ;
46 ;       KBDSTS  negative=>-(data byte count), 0=>free
47 ;       0
48 ;       KBDRNG  next KBD buffer associated with this KBD
49 ;       KBDLST  next buffer on activated list (0=>end of chain)
50 ;       KBDCHN  keyboard channel
51 ;       0       not used
52 ;       KBDATA  key board data area (1 PDP-11 word/character)
53 ;
54 ;format of DPY buffer (aligned on PDP-10 word)
55 ;
56 ;       DPY10B  word PDP-10 is hacking (used only for initailization)
57 ;       DPY11B  word PDP-11 is hacking
58 ;       DPYPP   page printer variables
59 ;       DPYLGL  last legal address in this buffer
60 ;       DPYSIZ  size of data area in bytes
61 ;       0       not used
62 ;       DPYATA  display data area (1 PDP-11 word/character)
63 ;
64 ;format of pointer area (aligned on PDP-10 word)
65 ;
66 ;       ADDRESS(system who line variables)
67 ;       ADDRESS(PDP-10/PDP-11 communication area)
68 ;       TENWHO (SET TO -1 WHENEVER ANYONE TYPES WHO LINE COMMAND, RESET TO 0 WHEN 10
69 ;               UPDATES WHO LINES
70 ;       TENWH1  PADDING
71 ;
72 ;Notes:
73 ;
74 ;1.     All addresses and pointers are in PDP-11 address space.
75 ;
76 ;2.     KBD buffers are ringed two per channel.  While the PDP-10 is
77 ;       emptying one, the PDP-11 can fill the other.
78 ;
79 ;3.     There is only one DPY buffer per channel.  When the buffer is filled
80 ;       with negative numbers, it is free.  When the PDP-10 writes a positive
81 ;       number in the current word: then the PDP-11 processes the data in that
82 ;       word, sets that word to a negative number, and advances to the next word.
83 ;\fWHO LINE VARIABLES
84 ;
85 ;SYSTEM WHO LINE  (one PDP-11 word/line unless otherwise indicated)
86 ;    ITSTCH     # total # 10/11 dpy channels (read only for PDP-10)
87 ;    ITSCHN     # 10/11 dpy channels in use (read only for PDP-10)
88 ;    ITSVER     ITS version #
89 ;    ITSJOB     total jobs
90 ;    ITSCOR     total core
91 ;    ITSRU      runnable users
92 ;    ITSWBJ     # jobs swap blocked
93 ;    ITSJWP     # jobs waiting for pages
94 ;    ITSTRC     total runable core
95 ;    ITSCFU     core available for users
96 ;    ITSDAT     date [byte (7) year (4) month (5) day]
97 ;    ITSDBG     system debug flag
98 ;    ITSTIM     time of day (# half seconds since midnight) aligned on PDP-10 word
99 ;    ITSTI1     low order of time
100 ;    ITSUSR     total number of users
101 ;
102 ;USER WHO LINE (One PDP-11 word per line unless otherwise noted)
103      WHJOB==0   ;job #, -1=>who line not in use
104 ;    WHJOB1     ;pads WHJOB
105      WHMODE==1  ;mode   0=>follow keyboard
106 ;                       1=>freeze
107 ;                       2=>next higher (when PDP-10 sees this state, it searches
108 ;                          user variables for next higher job index number with same
109 ;                          uname.  When it finds it, it stores the number in job #
110 ;                          and changes mode to 1
111 ;                       3=>next lower
112 ;    WHMOD1     ;pads WHMODE
113      WHUNAM==2  ;uname in sixbit (left 18 bits in first two words, right in next two)
114 ;    WHUNM1
115      WHUNM2==3
116 ;    WHUNM3
117      WHJNAM==4  ;jname in sixbit
118 ;    WHJNM1
119      WHJNM2==5
120 ;    WHJNM3
121      WHSNAM==6  ;sname in sixbit
122 ;    WHSNM1
123      WHSNM2==7
124 ;    WHSNM3
125      WHSTAT==10 ;status in sixbit, 0=>job does not exist
126 ;    WHSTA1
127      WHSTA2==11
128 ;    WHSTA3
129      WHJ%RT==12 ;job % run time
130 ;    WHJTRT     job total run time (one millisec units)
131 ;    WHRPAG     job number of pages real mem assigned
132 ;    WHPAG      job number of pages virtual mem assigned
133 ;    WHO1       user who line control word
134 ;    WHO1A
135 ;    WHO2       first user who line variable
136 ;    WHO2A
137 ;    WHO2B
138 ;    WHO2C
139 ;    WHO3       second user who line variable
140 ;    WHO3A
141 ;    WHO3B
142 ;    WHO3C
143 ;
144 ;
145 ;NOTE:  The PDP-11 will not update who lines until it sees that ITSTIM
146 ;       has changed.
147 ;
148 ;PDP-10/PDP-11 COMMAND CHANNEL
149 ;
150 ;    CMDFLG     aligned on PDP-10
151 ;               0=>buffer is free (PDP-10 can write CMDBUF)
152 ;               positive=>command # from PDP-10 (PDP-11 can write CMDBUF)
153 ;               negative=>affirmative reply from PDP-11 (0=>command failed)
154 ;               PDP-10 can read CMDBUF, then must zero CMDFLG
155 ;    CMDFL1     always 0
156 ;    CMDBUF     each arg takes 4 bytes (1 PDP-10 word)
157 ;
158 ;    PDP-10/PDP-11 COMMANDS
159 ;
160 ;       1       video switch
161 ;               arg1:   video switch input #  (set by PDP-10)
162 ;               arg2:   video switch output # ( "  "   "  " )
163 ;
164 ;       2       reserve DPY
165 ;               arg1:   DPY reserved (set by PDP-11)
166 ;
167 ;       3       free DPY
168 ;               arg1:   DPY to free (set by PDP-10)
169 ;
170 ;;other 10-11 commuincation issues ..
171 ;
172 ;;go down resetting video switch vs not
173 ;;PDP-11 indicates it has reset video switch
174 ;       ;(PDP-10 then detaches all jobs with tv ttys)