STTY(II) 8/5/73 STTY(II)
NAME
stty - set mode of typewriter
SYNOPSIS
(stty = 31.)
(file descriptor in r0)
sys stty; arg
...
arg: speed; 0; mode
stty(fildes, arg)
int arg[3];
DESCRIPTION
Stty sets mode bits and character speeds for the typewriter
whose file descriptor is passed in r0 (resp. is the first
argument to the call). First, the system delays until the
typewriter is quiescent. Then the speed and general
handling of the input side of the typewriter is set from the
low byte of the first word of the arg, and the speed of the
output side is set from the high byte of the first word of
the arg. The speeds are selected from the following table.
This table corresponds to the speeds supported by the DH-11
interface. If DC-11, DL-11 or KL-11 interfaces are used,
impossible speed changes are ignored.
0 (turn off device)
1 50 baud
2 75 baud
3 110 baud
4 134.5 baud
5 150 baud
6 200 baud
7 300 baud
8 600 baud
9 1200 baud
10 1800 baud
11 2400 baud
12 4800 baud
13 9600 baud
14 External A
15 External B
In the current configuration, only 150 and 300 baud are
really supported, in that the code conversion and line
control required for 2741's (134.5 baud) must be implemented
by the user's program, and the half-duplex line discipline
required for the 202 dataset (1200 baud) is not supplied.
The second word of the arg is currently unused and is
available for expansion.
The third word of the arg sets the mode. It contains
several bits which determine the system's treatment of the
typewriter:
10000 no delays after tabs (e.g. TN 300)
200 even parity allowed on input (e. g. for M37s)
100 odd parity allowed on input
040 raw mode: wake up on all characters
020 map CR into LF; echo LF or CR as CR-LF
010 echo (full duplex)
004 map upper case to lower on input (e. g. M33)
002 echo and print tabs as spaces
001 inhibit all function delays (e. g. CRTs)
Characters with the wrong parity, as determined by bits 200
and 100, are ignored.
In raw mode, every character is passed back immediately to
the program. No erase or kill processing is done; the end-
of-file character (EOT), the interrupt character (DELETE)
and the quit character (FS) are not treated specially.
Mode 020 causes input carriage returns to be turned into
new-lines; input of either CR or LF causes LF-CR both to be
echoed (used for GE TermiNet 300's and other terminals
without the newline function).
SEE ALSO
stty (I), gtty (II)
DIAGNOSTICS
The error bit (c-bit) is set if the file descriptor does not
refer to a typewriter. From C, a negative value indicates
an error.