Research V4 development
[unix-history] / man / man2 / stty.2
CommitLineData
88d0a458
KT
1.th STTY II 8/5/73
2.sh NAME
3stty \*- set mode of typewriter
4.sh SYNOPSIS
5(stty = 31.)
6.br
7(file descriptor in r0)
8.br
9.ft B
10sys stty; arg
11.br
12.li
13...
14.br
15arg: speed; 0; mode
16.s3
17.nf
18stty(fildes, arg)
19int arg[3];
20.fi
21.ft R
22.s3
23.sh DESCRIPTION
24.it Stty
25sets mode bits and character speeds for the typewriter whose file descriptor
26is passed in r0 (resp. is the first argument to the call).
27First, the system delays until the typewriter is quiescent.
28Then the speed and general handling of the
29input side of the typewriter is set from
30the low byte of the first word of the
31.it arg,
32and the speed of the output side is set from the
33high byte of the first word of the
34.it arg.
35The speeds are selected from the following table.
36This table corresponds to the
37speeds supported by the DH-11 interface.
38The starred entries are those speeds actually supported
39by the DC-11 interfaces actually present;
40if a non-starred speed is selected, it will be ignored and
41the present speed left unchanged.
42.s3
43.lp +8 4
440 (turn off device)
45.lp +8 4
461 50 baud
47.lp +8 4
482 75 baud
49.lp +8 4
503 110 baud
51.lp +8 4
524* 134.5 baud
53.lp +8 4
545* 150 baud
55.lp +8 4
566 200 baud
57.lp +8 4
587* 300 baud
59.lp +8 4
608 600 baud
61.lp +8 4
629* 1200 baud
63.lp +8 4
6410 1800 baud
65.lp +8 4
6611 2400 baud
67.lp +8 4
6812 4800 baud
69.lp +8 4
7013 9600 baud
71.lp +8 4
7214 External A
73.lp +8 4
7415 External B
75.s3
76.i0
77In the current configuration,
78only 150 and 300 baud are really supported,
79in that the code conversion and line control required for
802741's (134.5 baud)
81must be implemented by the user's
82program,
83and the half-duplex line discipline
84required for the 202 dataset (1200 baud)
85is not supplied.
86.s3
87The
88second word of the
89.it arg
90is currently unused and is available for expansion.
91.s3
92The third word of the
93.it arg
94sets the
95.it mode.
96It
97contains several bits which determine the
98system's treatment of the typewriter:
99.s3
100.lp +12 5
10110000 no delays after tabs (e.g. TN 300)
102.lp +12 5
103200 even parity allowed on input (e. g. for M37s)
104.lp +12 5
105100 odd parity allowed on input
106.lp +12 5
107040 raw mode: wake up on all characters
108.lp +12 5
109020 map CR into LF; echo LF or CR as CR-LF
110.lp +12 5
111010 echo (full duplex)
112.lp +12 5
113004 map upper case to lower on input (e. g. M33)
114.lp +12 5
115002 echo and print tabs as spaces
116.lp +12 5
117001 inhibit all function delays (e. g. CRTs)
118.i0
119.s3
120Characters with the wrong parity, as determined by bits 200 and
121100, are ignored.
122.s3
123In raw mode, every character is passed back immediately
124to the program. No erase or kill processing is done;
125the end-of-file character (EOT), the interrupt character
126(DELETE) and the quit character (FS) are not treated specially.
127.s3
128Mode 020 causes input carriage returns to be turned into
129new-lines;
130input of either CR or LF causes LF-CR both to
131be echoed
132(used for GE TermiNet 300's and other terminals without the newline function).
133.sh "SEE ALSO"
134stty(I), gtty(II)
135.sh DIAGNOSTICS
136The error bit
137(c-bit) is set if the file descriptor does not refer to a type\ 6writer.
138From C, a negative value indicates an error.