emrath (02/12/83)
#R:unm-ivax:-13100:uiucdcs:13700022:000:953 uiucdcs!emrath Feb 11 18:28:00 1983 I have gotten around this problem by throwing software at it in my pdp-11 (non-unix). My user level program disables ^S/^Q in my tty driver (input side only) and handles it this way: When I get a ^S from unix (*followed* by the echoed char which would normally turn my tty driver back on), I set a flag but keep sending the rest of the line. When I send the CR, if the flag is set I stop sending and wait for a ^Q. (I also count the echo and stop sending if I get too far ahead, in order to prevent *my* input buffer from overrunning.) It works fine as long as lines are shorter than TTYHOG/2 (127?). The fix mentioned by swatt looks good and should let my tty driver handle the ^S/^Q business (if I add a LDECCTQ type option) as well as let lines up to TTYHOG or so get thru reliably. Using cooked mode allows one program to talk to a number of systems, in this case: vax/unix, vax/vms, cyber/nos and TOPS-20. ...!pur-ee!uiucdcs!emrath (Univ of IL)
chris.umcp-cs@Udel-Relay (03/22/83)
From: Chris Torek <chris.umcp-cs@Udel-Relay> Speaking of which: has anyone noticed the tp->t_char field of the tty guys? It's called "character temporary" which doesn't mean much. I can't see what it's used for. In any case, another problem with TANDEM mode is that when it sends ^S or ^Q, it places them at the END of the outgoing queue! It would be much better if it placed them at the beginning. Could tp->t_char be used to hold a ^S? If not, then perhaps another entry should be added that could. Of course, adding this would be a big pain in the (uhhh...) drivers. The other alternative is to move all of the queued characters back to make room for a ^S at the front, which would be ridiculous for large out queue lengths.
guy (04/09/83)
The way the System III driver handles it (it's been renamed IXOFF, but it's the same thing) is to set a flag in the driver saying "send out an XOFF" or "send out an XON". If an "output complete" interrupt occurs from the device (at the end of the current character for non-DMA devices or at the end of the current block of characters), before it starts transmitting the next character or block it spits out the XON or XOFF. This way, it transmits the XOFF/XON as soon as possible. Guy Harris RLG Corporation {seismo,mcnc,we13}!rlgvax!guy