1 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
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.
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.
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.
17 ;channel header pointer (location 40, read only)
19 ; ADDRESS(channel header area)
20 ; ADDRESS(pointer area)
22 ; source file version number
24 ; INITED non-zero indicates PDP-11 is running ok(can be cleared by PDP-10)
26 ; GDOWN used as flag by PDP-10 to acknowledge clear of INITED
28 ;channel header area (aligned on PDP-10 word)
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
44 ;format of KBD buffer (aligned on PDP-10 word)
46 ; KBDSTS negative=>-(data byte count), 0=>free
48 ; KBDRNG next KBD buffer associated with this KBD
49 ; KBDLST next buffer on activated list (0=>end of chain)
50 ; KBDCHN keyboard channel
52 ; KBDATA key board data area (1 PDP-11 word/character)
54 ;format of DPY buffer (aligned on PDP-10 word)
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
62 ; DPYATA display data area (1 PDP-11 word/character)
64 ;format of pointer area (aligned on PDP-10 word)
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
74 ;1. All addresses and pointers are in PDP-11 address space.
76 ;2. KBD buffers are ringed two per channel. While the PDP-10 is
77 ; emptying one, the PDP-11 can fill the other.
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.
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 #
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
102 ;USER WHO LINE (One PDP-11 word per line unless otherwise noted)
103 WHJOB==0 ;job #, -1=>who line not in use
105 WHMODE==1 ;mode 0=>follow keyboard
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
112 ; WHMOD1 ;pads WHMODE
113 WHUNAM==2 ;uname in sixbit (left 18 bits in first two words, right in next two)
117 WHJNAM==4 ;jname in sixbit
121 WHSNAM==6 ;sname in sixbit
125 WHSTAT==10 ;status in sixbit, 0=>job does not exist
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
135 ; WHO2 first user who line variable
139 ; WHO3 second user who line variable
145 ;NOTE: The PDP-11 will not update who lines until it sees that ITSTIM
148 ;PDP-10/PDP-11 COMMAND CHANNEL
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
156 ; CMDBUF each arg takes 4 bytes (1 PDP-10 word)
158 ; PDP-10/PDP-11 COMMANDS
161 ; arg1: video switch input # (set by PDP-10)
162 ; arg2: video switch output # ( " " " " )
165 ; arg1: DPY reserved (set by PDP-11)
168 ; arg1: DPY to free (set by PDP-10)
170 ;;other 10-11 commuincation issues ..
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)