Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.terminals Subject: Re: What's wrong with flow control? Message-ID: <7362@utzoo.UUCP> Date: Sun, 30-Nov-86 03:51:34 EST Article-I.D.: utzoo.7362 Posted: Sun Nov 30 03:51:34 1986 Date-Received: Sun, 30-Nov-86 03:51:34 EST References: <3660001@nucsrl.UUCP> Organization: U of Toronto Zoology Lines: 48 > In one of the installation documentation files for GNU Emacs, Richard Stallman > expresses his displeasure (to put it mildly) with the way DEC's terminals use > control-S and control-Q (XON/XOFF) for flow control. He says its a > "brain-damaged" design. > > Could somebody tell me why that is the case? If that is the case? One can debate whether the brain damage is in the terminals, or in Emacs and its authors. ASCII defines characters below ' ', plus DEL, as *control* characters, with various well-defined purposes. Many of those purposes are incompatible with treatment as if they were ordinary data characters, to be transmitted unchanged by communications hardware. Unfortunately, back in the days when communications hardware was dumb and control characters seldom got special treatment, the custom grew up of using such characters as commands to software. There are a lot of programs, e.g. screen editors like Emacs, where it is *very* handy to have characters which are not valid text and are interpreted as commands. This depends on such characters being transmitted unaltered. Alas, as hardware got smarter, some of the control characters started being used for their original purpose, to the great displeasure of people (like Stallman) who had (mis)appropriated them for other uses and found it difficult to give them up. Use of XON/XOFF is nearly universal in the industry now, by the way. DEC catalyzed this development but was not fundamentally responsible for it; the original protocol was established by the venerable ASR33. There is no truly fundamental incompatibility here, since there is no law saying that holding down CTRL while hitting S must send an XOFF character; it could just as easily send a multi-character escape sequence that would avoid characters with special meaning to the hardware while still getting the message through to the software. Unfortunately, terminals generally don't provide this as an option. > What would > be a better synchronization method? The only decent method I can think of > would use hardware handshaking... Hardware handshaking is a bad idea because it doesn't transmit well over networks or modems. The real solution is a better terminal protocol, perhaps packet-oriented. XON/XOFF not only irritates Emacs users, it also is not really a very good handshaking system -- it loses big when there are long delays in the communications links. What's needed is a "give me N more characters" protocol rather than a "stop right away, I'm full" protocol. To really work well, it would have to be standardized so that all terminals spoke the same protocol. Don't hold your breath waiting. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,decvax,pyramid}!utzoo!henry