Consolidate license copies
[its.git] / sysdoc / ttyvar.105
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 TTY Variables:
19
20      This file attempts to maintain up-to-date documentation on all
21 the TTY variables.  Those wonderful souls who update this information
22 in anyway (additions, deletions, corrections) should describe their
23 modifications in a brief note to INFO-ITS so that interested parties
24 can correct their copies or conceptions without needing to print or read
25 the entire file again.  For example:
26
27 :MAIL INFO-ITS I added documentation on the FOO variable to TTYVAR.^C
28 ----------------------------------------------------------------------
29
30      For a more complete description of TTY handling see the file
31 .INFO.;ITS TTY.  This file exists primarily to facilitate lookup via
32 the DOC program.  Use :DOC TTYVAR <name> to read the documentation
33 of a specific variable.
34
35      The system calls for reading and setting TTY variables are:
36 CNSGET, CNSSET, OPEN, RCPOS, RFNAME, RSSIZE, SCML, SCPOS, STYGET,
37 TTYGET, TTYSET, and TTYVAR.
38 \f
39 BIT names:
40
41      Bit names begin with %Tx where x specifies which variable.  Byte
42 pointer names begin with $Tx.  Here is a list of the prefixs in use
43 and where they're found:
44
45 %TA     TTYSTA
46 %TB     .TTY
47 %TC     TTYCOM
48 %TD     output buffers (these are characters, not bits)
49 %TF     ?
50 %TG     TTYST1 and TTYST2
51 %TI     IOCHNM (for input channels)
52 %TJ     IOCHNM (for output channels)
53 %TN     TCTYP (these are codes, not bits)
54 %TO     TTYOPT LH
55 %TP     TTYOPT RH
56 %TQ     TTYSMT LH
57 %TR     TTYSMT RH
58 %TS     TTYSTS
59 %TT     TTYTYP LH
60 %TX     input buffers
61 %TY     TTYTYP RH
62 \f
63 HEIGHT: Screen Height (per-TTY)
64
65      HEIGHT contains the number of lines on the screen.  For printing
66 terminals it is usually some large number.
67
68      This variable can be read with the CNSGET, RSSIZE, and TTYVAR system
69 calls and set with the CNSSET and TTYVAR system calls.
70 \1f
71 IDLTIM: Idle Time (per-TTY)
72
73      IDLTIM contains the length of time since the last input character
74 character was typed on the TTY, in 30'ths of a second. 
75
76      This variable can be read with the TTYVAR system call.
77 \f
78 IOCHNM: I/O channel bits (per-channel)
79
80      Some of the control bits set first time options and some are per-channel.
81 Those which are per-channel are marked below with a *.  The standard names
82 for these bits are also given.
83
84 Control bits on input:
85         2.6 *   %TIECH  Read even if char needs pi echoing
86         2.5 *   %TIPEK  Don't remove char from buffer (peek)
87         2.3 *   %TIACT  Don't wait for activation char
88         2.2 *   %TIINT  Read even if char is an interrupt
89                         char and hasn't interrupted yet.
90         2.1 *   %TINWT  Do not wait for input.  If no input is
91                         available, return -1 in unit mode, or
92                         return a partially filled block in block mode.
93         1.9 *   %TIFUL  Use the full TV character set if possible.
94                         In this mode, characters have this form:
95                         2.3     %TXTOP  Top.
96                         2.2     Obsolete.  Used to be Shift lock.
97                         2.1     %TXSUP  Super.  Used to be Shift.
98                         1.9     %TXMTA  Meta.
99                         1.8     %TXCTL  Control.
100                         1.7-1.1 %TXASC  Ascii part of character.
101                         Of course, for non-TV's only %TXASC
102                         will be non-zero.
103         1.6     Set up 3 line echo area (like SCML of 3).
104         1.4     "DDT" mode.  Initially clear the %TGPIE and
105                 %TGMPE bits for carriage return, line feed,
106                 and tab, thus causing them not to echo.
107         1.3     Image mode.  Initially clear the %TGPIE
108                 and %TGMPE bits for all characters.
109         1.2     0 = unit mode, 1 = block mode.  In block mode,
110                 ^C causes a block mode end of file.
111         1.1     0 = input.
112
113 Control bits on output:
114
115         2.6 *   %TJECH  Echo mode output.
116         2.5 *   %TJCTN  Don't do line continuation.
117         2.4 *   %TJSTP  Channel is hung in **MORE**.
118                 Unusual in that the system modifies this bit.
119         2.3 *   %TJDIS  Recognize ^P cursor codes.
120         2.2 *   %TJSIO  Super-image output.  No padding
121                         or cursor control is performed.
122         2.1 *   %TJMOR  Do not do **MORE** processing.
123         1.9 *   %TJPP2  Output in the echo area if it exists.
124         1.6     Same as 2.2 - turns on %TJSIO.
125         1.5     Same as 2.3 - turns on %TJDIS.
126         1.4     Turns on %TJECH, %TJPP2, %TJMOR.
127         1.3     Image mode.  Initially set %TGIMG bits
128                 for all characters.
129         1.2     0 = unit mode, 1 = block mode.  In block mode
130                 output all ^C's are ignored.
131         1.1     1 = output.
132
133      The I/O channel word for a TTY channel can be read with RFNAME.  It
134 is set by the OPEN call.
135 \f
136 ISPEED: Input Speed (per-TTY)
137
138      ISPEED is the input speed of the terminal.  It refers to the input
139 speed code stored in the TTYTYP variable.  However, it is not a speed
140 code, but rather the speed in bits per second.  Also, you are allowed to
141 set the ISPEED variable, while you are not allowed to set the whole TTYTYP
142 variable.
143
144      This variable can be read and set with the TTYVAR system call.
145 \1f
146 OSPEED: Output Speed (per-TTY)
147
148      OSPEED is the output speed of the terminal.  It refers to the output
149 speed code stored in the TTYTYP variable.  However, it is not a speed
150 code, but rather the speed in bits per second.  Also, you are allowed to
151 set the OSPEED variable, while you are not allowed to set the whole TTYTYP
152 variable.
153
154      This variable can be read and set with the TTYVAR system call.
155 \f
156 TCTYP:  Terminal type code (per-TTY)
157
158         0       %TNPRT  Printing terminal.
159         1       %TNDP   Good Datapoint.
160         2       %TNODP  Bad Datapoint ("loser").
161         3       %TNIML  Imlac.
162         4       %TNTEK  Tektronix.
163         5       %TNTV   PDP-11 TV.
164         6       %TNMEM  Memowreck.
165         7       %TNSFW  Software terminal (accepts internal
166                         ITS display codes, such as live in
167                         internal terminal output buffers;
168                         see ITS TTY for details).
169         10      %TNTRM  Terminet.
170         11      %TNESC  Display using ASCII standard display codes.
171         12      %TNDTM  Datamedia.
172         13      %TNRAY  Teleray 1061
173         14      %TNHDS  Concept 100
174         15      %TNH19  Zenith H19
175         16      %TNAAA  Ann Arbor Ambassador
176
177      This variable can be read with the CNSGET and TTYVAR system calls
178 and set with the CNSSET and TTYVAR system calls.
179 \f
180 TTYCOM: Com-link bits (per-TTY)
181
182         4.9             Communicate mode.
183         4.8     %TCLFT  Local feed through (my job sees his typing).
184         4.7     %TCRFT  Remote feed through (his job sees my typing).
185         4.6     %TCICO  Input comm override (my job sees my typing).
186         4.5     %TCOCO  Output comm override (I see my job's typing).
187         4.4     %TCRFS  Refuse comm messages.
188         4.3     %TCQRY  Query me if comm attempted to me.
189         4.2     %TCMTR  The tty's motor is off, and must be
190                         turned on before next output.
191                         (Currently only Terminets get turned off.)
192         4.1     %TCECH  The last output to this tty was PI echo.
193         3.9     %TCINP  Someone waited for input since last home-up.
194         3.8     %TCDET  Console's tree detached by top level interrupt.
195         3.7     %TCDNG  Type bell (input buffer full).
196         3.6     %TCCBK  Reading uname or tty number after ^_K.
197         3.5     %TCCBS  Reading uname or tty number after ^_S.
198         3.4     %TCFPD  First part of an output code sequence is done.
199         3.3     %TCTPN  Type ^_N on leaving comm (unless user types it).
200         3.2     %TCPAD  0 => padding necessary on datapoint.
201         3.1     %TCHNG  Done flag seems to be fried - time out quickly.
202         2.9-1.1 -1 if not in comm mode; otherwise number of
203                 next tty in circular list of those in comm mode
204                 together.
205
206 Only the %TCICO, %TCOCO, %TCRFS, %TCQRY, %TCMTR, and %TCINP bits may
207 be set.
208
209      This variable can be read with the CNSGET and TTYVAR system calls
210 and set with the CNSSET and TTYVAR system calls.
211 \f
212 TTYOPT: TTY capability and option bits (per-TTY)
213
214         4.8     %TOALT  Standardize altmodes.
215         4.7     %TOCLC  Convert lower case input to upper case.
216         4.6     %TOERS  This tty can selectively erase.
217         4.5     %TOHDX  This tty is half-duplex.
218         4.4     %TOMVB  This tty can backspace directly.
219         4.3     %TOSAI  This tty handles SAIL characters.
220         4.2     %TOSA1  Used to initialize %TSSAI for new jobs.
221         4.1     %TOOVR  This tty can overprint correctly.
222         3.9     %TOMVU  This tty can move its cursor upward.
223         3.8     %TOMOR  Used to initialize %TSMOR for new jobs.
224         3.7     %TOROL  Used to initialize %TSROL for new jobs.
225         3.6     %TORAW  Don't optimize cursor motion.
226         3.5     %TOLWR  This tty has a lower case keyboard.
227         3.4     %TOFCI  This tty's keyboard has the full TV character set.
228         3.3     %TOIML  This tty acts like an IMLAC.
229         3.2     %TOLID  This tty can insert/delete lines.
230         3.1     %TOCID  This tty can insert/delete characters.
231         2.9-2.7 $TPPLF  How to pad line feeds:
232                         0       Don't.
233                         1       Two pad chars (Memorex, 2741).
234                         2       Terminet.
235         2.6-2.4 $TPPCR  How to pad carriage returns:
236                         0       Don't.          4       Execuport.
237                         1       Normal.         5       2741.
238                         2       Double.         6       Memorex.
239                         3       Unused.         7       Unused.
240                         For a Datapoint, number of pad chars before
241                         each string of cursor motion commands.
242                         For a Terminet, 0=no padding, 1,2,3,4,5
243                         correspond to 10,15,30,60,120 cps.
244         2.3-2.1 $TPPTB  How to pad tabs:
245                         0       Tabs not allowed.
246                         <n>     Use <n-1> pad chars.
247                         On displays,
248                         0       don't use tabs.
249                         1       use tabs.
250                         2       use VT52-style absolute positioning.
251         1.9     %TPMTA  Treat bit 1.8 of input characters as the meta bit.
252                         this is for terminals such as Telerays which have Edit keys.
253         1.8     %TPPRN  interchange ( with [, and ) with ], on input.
254         1.7     %TPTEL  Treat CRLF input as CR for TELNET protocol.
255         1.6     %TPCBS  The ^\ intelligent terminal protocol is enabled.
256         1.5     %TP11T  PDP-11 TV.  Reflects %TY11T.
257         1.4     %TPORS  Output reset really does something.
258         1.3     %TPRSC  This tty can do region scrolling.
259         1.2     %TPIBC  Oddball 2741-like tty.  ;no longer defined
260         1.1     %TPIBM  It really is a 2741.    ;no longer defined
261
262      This variable can be read with the CNSGET and TTYVAR system calls
263 and set with the CNSSET and TTYVAR system calls.
264 \f
265 TTYROL: Scroll count (per-TTY)
266
267      TTYROL contains the number of lines the TTY moves up when it scrolls.
268 Scrolling occurs when a LF is sent while the cursor is on the last line.
269
270      This variable can be read and set with the TTYVAR system call.
271 \f
272 TTYSMT: Smarts (per-TTY)
273
274 Bits marked with a * are pertain to the graphics protocol.  If %TQGRF is 0,
275 they should all be 0.
276
277     4.9-4.7     %TQMCH  CPU type.  0 => unknown or uninteresting.
278                         1 => PDP11.  2 => IMLAC PDS4.  3 => IMLAC PDS1.
279     4.6-4.2 *   %TQHGT  Character height in dots.
280     4.1-3.7 *   %TQWID  Character width in dots.
281         3.6 *   %TQVIR  Terminal implements virtual coordinates.
282         3.5 *   %TQBNK  Terminal implements blinking.
283         3.4 *   %TQXOR  Terminal implements XOR mode.
284         3.3 *   %TQREC  Terminal implements the rectangle commands.
285         3.2 *   %TQSET  Terminal implements multiple sets.
286         3.1 *   %TQGRF  Terminal understands the graphics protocol.
287                         (Used to be called %TQGPH.)
288         2.9 *   %TRGIN  Terminal provides graphic input.
289         2.8 *   %TRGHC  Terminal provides has graphic hardcopy.
290         2.7     %TRLED  Terminal supports the local-editing protocol.  
291                         (See SUPDUP doc) 
292         2.6 *   %TRSCN  Terminal implements scan-line output.
293     2.5-2.3     %TRLSV  Nonzero means terminal can save about 4**n lines.
294                         (See SUPDUP doc) 
295     2.2-1.7     %TRTIM  Signed offset from GMT minus 20.  A value of zero
296                         means don't know, don't care, or user program
297                         hasn't implemented it yet.
298
299      This variable can be read and set with the TTYVAR system call.
300 \f
301 TTYSTA: Console Status
302
303         4.9     %TACFM  Tty does not need a console free message
304                         eventually (hasn't been in use since
305                         the last one).
306         4.8     %TAC.Z  Tty is being ^Z'd.  Shouldn't be on with
307                         %TACFM.  If %TACFM and %TAC.Z are both 0,
308                         the tty is being freed and a console free
309                         message is immanent.
310         4.7     %TANJS  This ^Z is being flushed because no job
311                         slots are available.  If set, %TAC.Z
312                         will be 1 and %TACFM will be 0.
313         4.6-4.3 %TANEC  Number of following chars to inhibit echo and ints for.
314                         This is used for the arg chars that follow Top-E,
315                         Top-S, Top-Y, etc.
316
317      This variable can be read with the STYGET system call.
318 \f
319 TTYST1: Activation and Echo control word 1 (per-job)
320
321 This variable contains six groups of six bits.
322 Each group is as follows:
323         1.6     %TGMPE  Echo at main program level (when IOT'ed).
324         1.5     %TGPIE  Echo at interrupt level (when typed).
325         1.4     %TGIMG  Echo in image mode.
326         1.3     %TGSPC  Special hack: convert lower case to upper.
327         1.2     %TGACT  Activation character.
328         1.1     %TGINT  Interrupt character.
329
330 The character groups are:
331         4.9-4.4         ^@-^F ^K ^L ^N-^R ^T-^Z ^\-^_
332         4.3-3.7         Upper and lower case letters.
333         3.6-3.1         Digits.
334         2.9-2.4         ! " # $ % & ' , . : ; ? @ \ ` | ~
335         2.3-1.7         + * - / = ^ _
336         1.6-1.1         < > ( ) [ ] { }
337
338      This variable can be read with the TTYGET system call and set
339 with the TTYSET system call.
340 \1f
341 TTYST2: Activation and Echo control word 2 (per-job)
342
343 This variable contains six more groups of six bits.
344 Each group is as follows:
345         1.6     %TGMPE  Echo at main program level (when IOT'ed).
346         1.5     %TGPIE  Echo at interrupt level (when typed).
347         1.4     %TGIMG  Echo in image mode.
348         1.3     %TGSPC  Special hack: convert lower case to upper.
349         1.2     %TGACT  Activation character.
350         1.1     %TGINT  Interrupt character.
351
352 The character groups are:
353         4.9-4.4         ^G ^S
354         4.3-3.7         ^I ^J  (tab, linefeed)
355         3.6-3.1         altmode  (33)
356         2.9-2.4         ^M  (carriage return)
357         2.3-1.7         rubout  (177)
358         1.6-1.1         space, ^H  (backspace)
359
360      This variable can be read with the TTYGET system call and set
361 with the TTYSET system call.
362 \f
363 TTYSTS: TTY option bits (per-job)
364
365         4.9     %TSFRE  Free console (not in use).
366         4.8     %TSCLE  ^L should echo as "^L" (normally
367                         clears screen on displays).
368         4.7     %TSHDX  Same as %TOHDX.  Vestigial.
369         4.6     %TSFCO  Use full 12-bit TV char set for output and
370                         echoing: echo CONTROL as ALPHA, echo META
371                         as BETA, echo SUPER as EPSILON, and use
372                         Sail graphics if TOP is set.
373         4.5     %TSALT  Do not standardize altmodes.
374         4.4     %TSROL  Scroll mode.
375         4.3     %TSSAI  Echo and ascii output use SAIL
376                         character set.
377         4.2     %TSACT  Next input IOT shouldn't wait
378                         for an activation character.
379         4.1     %TSNEA  Don't echo in echo area; echo in M.P. Area.
380         3.9     %TSINT  Next input character should
381                         interrupt even if it ordinarily
382                         would not (%TGINT = 0).
383         3.8     %TSMOR  Inhibit **MORE** processing.
384         3.7     %TSATY  Set whenever an .ATTY executed by
385                         some superior returns the tty to
386                         the job.
387         3.4     %TSNOE  Defer echoing.
388         3.3     %TSLCZ  Last character typed was ^Z.
389                         This bit causes .ATTY's to fail.
390         3.2     %TSSII  Super-image input.  The special
391                         actions of ^Z and ^_ are suppressed.
392         3.1     %TSCNS  This is a console, not a device.
393         2.9-1.1 The user index of the job which controls
394                 the tty, or -1 if the tty is free.
395
396 %TSFRE, %TSHDX, %TSLCZ, %TSCNS, and the RH may not be altered.
397
398      This variable can be read with the TTYGET system call and set
399 with the TTYSET system call.
400 \f
401 TTYTYP: Semi-permanent stuff (per-TTY)
402
403 This variable may not be set, just read (but see ISPEED and OSPEED).
404
405         4.9     %TTLCL  Local tty (i.e. right near the PDP-10).
406         4.8     %TT340  Near the 340 or a 340 slave.
407         4.7     %TT3HP  High priority for grabbing 340.
408         4.3     %TTPAR  Tty needs a parity bit generated by software.
409         4.2     %TTDDI  Don't ding bell on excess input.
410         4.1     %TTIBM  Datel (2741) line.
411         3.8-3.5 $TTISP  Input speed code:
412                 0 = unknown             6 = 1800 baud           13 = 40K baud
413                 1 = 600 baud            7 = 2400 baud           14 = 50K baud
414                 2 = 110 baud           10 = 4800 baud           15 = 80K baud
415                 3 = 150 baud           11 = 9600 baud           16 unused
416                 4 = 300 baud           12 = 25K baud            17 unused
417                 5 = 1200 baud
418         3.4-3.1 $TTOSP  Output speed code, as above.
419         2.9     %TYDPK  Datapoint controller line.
420         2.8     %TYSTY  Alter ego to a STY.
421         2.7     %TYNVA  Nova tty (requiescat in pace).
422         2.6     %TYMTY  Morton controller line.
423         2.5     %TYDIL  Dial-up line.
424         2.4     %TY11T  PDP-11 TV tty.
425         2.3     %TYDL   DL-10 tty.
426         2.2     %TYOTY  KA-10 console tty.
427         2.1     %TYETY  DTE-20 tty.
428         1.9     %TYNTY  TK-10 tty.
429         1.8     %TYMDM  Dial-up line with modem control.
430         1.7     %TYKST  KS-10 console tty.
431         1.6     %TYDZT  DZ-11 tty on a KS-10.
432         1.5     %TYRLM  ROLM data switch tty.
433
434      This variable can be read with the CNSGET and TTYVAR system calls.
435 \f
436 WIDTH:  Screen width (per-TTY)
437
438      WIDTH contains the no. of usable print positions on a line for the
439 TTY.  It is usually one or two less than the actual no. of columns to allow
440 room for a "!" in the last column to indicate typeout being continued on
441 the next line (two columns are required when the terminal loses by
442 automatically performing a CRLF operation when a character is output to
443 the last column).
444
445      This variable can be read with the CNSGET, RSSIZE and TTYVAR system
446 calls and set with the CNSSET and TTYVAR system calls.