How do I get *8* data bits *no* parity?
Guy Harris
guy at auspex.UUCP
Sun Nov 13 07:34:27 AEST 1988
>As the character-width (unfortunately) still is only 8 bits in UNIX
It's not just a question of UNIX, it's a question of hardware. In the
case of asynchronous serial ports, the hardware ultimately controls how
many bits the system is willing to accept between the start and stop
bits.
Some asynchronous serial port hardware (most such hardware, I suspect)
is capable of framing characters with a start bit, 9 other bits, and a
stop bit; such hardware will treat 8 of those bits as data bits and the
9th as a parity bit.
Not all software that controls that hardware will put it in this mode,
however. Systems with a full System V-style tty driver interface will
do so; just set CS8 and PARENB. This should include the system in
question (it also includes SunOS 4.0 and later, and will probably
include the next BSD release, since it will at least support a
POSIX-style tty driver interface, and that permits 8 bits plus parity).
Systems with a V7-style tty driver interface, such as current BSD
systems, won't put the hardware in that mode; the software running
inside some terminals may not do so either, in which case setting the
host up to support this doesn't help you any.
>> ...If I succeed in switching to 8 data bits will
>> there be any unwanted side effects I should beware of?
>
>Yes ! dont use TAB3, it means "expand tabs to spaces"; normally that would
>be wrong (VERY wrong sometimes) for uucp-traffic.
If the guy wants 8-bit support for a user's terminal, rather than UUCP
or some other software that wants an 8-bit "pass-through" binary data
path, there should be no problem with setting TAB3; if the guy wants
8-bit support for a "pass-through" binary data path, the proper advice
is "don't use OPOST", not "don't use TAB3", because *any* tty driver
transformation of data on output - or input, for that matter - will be
wrong.
More information about the Comp.unix.wizards
mailing list