.th STTY II 8/5/73 .sh NAME stty \*- set mode of typewriter .sh SYNOPSIS (stty = 31.) .br (file descriptor in r0) .br .ft B sys stty; arg .br .li ... .br arg: speed; 0; mode .s3 .nf stty(fildes, arg) int arg[3]; .fi .ft R .s3 .sh DESCRIPTION .it 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 .it arg, and the speed of the output side is set from the high byte of the first word of the .it arg. The speeds are selected from the following table. This table corresponds to the speeds supported by the DH-11 interface. The starred entries are those speeds actually supported by the DC-11 interfaces actually present; if a non-starred speed is selected, it will be ignored and the present speed left unchanged. .s3 .lp +8 4 0 (turn off device) .lp +8 4 1 50 baud .lp +8 4 2 75 baud .lp +8 4 3 110 baud .lp +8 4 4* 134.5 baud .lp +8 4 5* 150 baud .lp +8 4 6 200 baud .lp +8 4 7* 300 baud .lp +8 4 8 600 baud .lp +8 4 9* 1200 baud .lp +8 4 10 1800 baud .lp +8 4 11 2400 baud .lp +8 4 12 4800 baud .lp +8 4 13 9600 baud .lp +8 4 14 External A .lp +8 4 15 External B .s3 .i0 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. .s3 The second word of the .it arg is currently unused and is available for expansion. .s3 The third word of the .it arg sets the .it mode. It contains several bits which determine the system's treatment of the typewriter: .s3 .lp +12 5 10000 no delays after tabs (e.g. TN 300) .lp +12 5 200 even parity allowed on input (e. g. for M37s) .lp +12 5 100 odd parity allowed on input .lp +12 5 040 raw mode: wake up on all characters .lp +12 5 020 map CR into LF; echo LF or CR as CR-LF .lp +12 5 010 echo (full duplex) .lp +12 5 004 map upper case to lower on input (e. g. M33) .lp +12 5 002 echo and print tabs as spaces .lp +12 5 001 inhibit all function delays (e. g. CRTs) .i0 .s3 Characters with the wrong parity, as determined by bits 200 and 100, are ignored. .s3 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. .s3 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). .sh "SEE ALSO" stty(I), gtty(II) .sh 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.