home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man2 / stty.2 < prev    next >
Encoding:
Text File  |  1975-06-26  |  4.5 KB  |  181 lines

  1. .th STTY II 12/15/74
  2. .sh NAME
  3. stty \*- set mode of typewriter
  4. .sh SYNOPSIS
  5. (stty = 31.)
  6. .br
  7. (file descriptor in r0)
  8. .br
  9. .ft B
  10. sys stty; arg
  11. .br
  12. .li
  13. ...
  14. .br
  15. arg:  .byte ispeed, ospeed; .byte erase, kill; mode
  16. .s3
  17. .nf
  18. stty(fildes, arg)
  19. struct {
  20.     char    ispeed, ospeed;
  21.     char    erase, kill;
  22.     int     mode;
  23. } *arg;
  24. .fi
  25. .ft R
  26. .s3
  27. .sh DESCRIPTION
  28. .it Stty
  29. sets mode bits and character speeds for the typewriter whose file descriptor
  30. is passed in r0 (resp. is the first argument to the call).
  31. First, the system delays until the typewriter is quiescent.
  32. The input and output speeds are set from the first two bytes
  33. of the argument structure
  34. as indicated by the following table,
  35. which corresponds to the
  36. speeds supported by the DH-11 interface.
  37. If DC-11, DL-11 or KL-11 interfaces are used,
  38. impossible speed changes are ignored.
  39. .s3
  40. .lp +8 4
  41. 0    (hang up dataphone)
  42. .lp +8 4
  43. 1    50 baud
  44. .lp +8 4
  45. 2    75 baud
  46. .lp +8 4
  47. 3    110 baud
  48. .lp +8 4
  49. 4    134.5 baud
  50. .lp +8 4
  51. 5    150 baud
  52. .lp +8 4
  53. 6    200 baud
  54. .lp +8 4
  55. 7    300 baud
  56. .lp +8 4
  57. 8    600 baud
  58. .lp +8 4
  59. 9    1200 baud
  60. .lp +8 4
  61. 10    1800 baud
  62. .lp +8 4
  63. 11    2400 baud
  64. .lp +8 4
  65. 12    4800 baud
  66. .lp +8 4
  67. 13    9600 baud
  68. .lp +8 4
  69. 14    External A
  70. .lp +8 4
  71. 15    External B
  72. .s3
  73. .i0
  74. In the current configuration,
  75. only 110, 150 and 300 baud are really supported on dial-up lines,
  76. in that the code conversion and line control required for
  77. IBM 2741's (134.5 baud)
  78. must be implemented by the user's
  79. program,
  80. and the half-duplex line discipline
  81. required for the 202 dataset (1200 baud)
  82. is not supplied.
  83. .s3
  84. The next two characters of the argument structure
  85. specify the erase and kill characters respectively.
  86. (Defaults are # and @.)
  87. .s3
  88. The
  89. .it mode
  90. contains several bits which determine the
  91. system's treatment of the typewriter:
  92. .s3
  93. .lp +12 7
  94. 100000    Select one of two algorithms for backspace delays
  95. .lp +12 7
  96. 040000    Select one of two algorithms for form-feed and vertical-tab delays
  97. .lp +12 7
  98. 030000    Select one of four algorithms for carriage-return delays
  99. .lp +12 7
  100. 006000    Select one of four algorithms for tab delays
  101. .lp +12 7
  102. 001400    Select one of four algorithms for new-line delays
  103. .lp +12 7
  104. 000200    even parity allowed on input (e. g. for M37s)
  105. .lp +12 7
  106. 000100    odd parity allowed on input
  107. .lp +12 7
  108. 000040    raw mode: wake up on all characters
  109. .lp +12 7
  110. 000020    map CR into LF; echo LF or CR as CR-LF
  111. .lp +12 7
  112. 000010    echo (full duplex)
  113. .lp +12 7
  114. 000004    map upper case to lower on input (e. g. M33)
  115. .lp +12 7
  116. 000002    echo and print tabs as spaces
  117. .lp +12 7
  118. 000001    hang up (remove `data terminal ready,' lead CD) after last close
  119. .i0
  120. .s3
  121. The delay bits specify how long
  122. transmission stops to allow for mechanical or other movement
  123. when certain characters are sent to the terminal.
  124. In all cases a value of 0 indicates no delay.
  125. .s3
  126. Backspace delays are currently ignored but will
  127. be used for Terminet 300's.
  128. .s3
  129. If a form-feed/vertical tab delay is specified,
  130. it lasts for about 2 seconds.
  131. .s3
  132. Carriage-return delay type 1 lasts about .08 seconds
  133. and is suitable for the Terminet 300.
  134. Delay type 2 lasts about .16 seconds and is suitable
  135. for the VT05 and the TI 700.
  136. Delay type 3 is unimplemented and is 0.
  137. .s3
  138. New-line delay type 1 is dependent on the current column
  139. and is tuned for Teletype model 37's.
  140. Type 2 is useful for the VT05 and is about .10 seconds.
  141. Type 3 is unimplemented and is 0.
  142. .s3
  143. Tab delay type 1 is dependent on the amount of movement
  144. and is tuned to the Teletype model
  145. 37.
  146. Other types are unimplemented and are 0.
  147. .s3
  148. Characters with the wrong parity, as determined by bits 200 and
  149. 100, are ignored.
  150. .s3
  151. In raw mode, every character is passed immediately
  152. to the program without waiting until a full line has been typed.
  153. No erase or kill processing is done;
  154. the end-of-file character (EOT), the interrupt character
  155. (DEL) and the quit character (FS) are not treated specially.
  156. .s3
  157. Mode 020 causes input carriage returns to be turned into
  158. new-lines;
  159. input of either CR or LF causes LF-CR both to
  160. be echoed
  161. (used for GE TermiNet 300's and other terminals without the newline function).
  162. .s3
  163. The hangup mode 01
  164. causes the line to be disconnected
  165. when the last process with the line open closes it or terminates.
  166. It is useful when a port is to be used for some special
  167. purpose;
  168. for example, if it is associated
  169. with an ACU used to place outgoing calls.
  170. .s3
  171. This system call is also used with certain special
  172. files other than typewriters,
  173. but since none of them are part of the standard system
  174. the specifications will not be given.
  175. .sh "SEE ALSO"
  176. stty (I), gtty (II)
  177. .sh DIAGNOSTICS
  178. The error bit
  179. (c-bit) is set if the file descriptor does not refer to a typewriter.
  180. From C, a negative value indicates an error.
  181.