Does C depend on ASCII?

koved at umcp-cs.UUCP koved at umcp-cs.UUCP
Fri May 11 02:06:58 AEST 1984


There appear to be only 2 instructions which are EBCDIC dependent -
PACK and UNPACK.  These are used to convert EBCDIC digits to packed
form which is used for arithmetic, or can be further converted to binary.
Conversion from EBCDIC to ASCII and back is trivial...use a translate
table (256 bytes) for each direction, and a single instruction (TRanslate)
to convert up to 256 bytes at a time.

BTW, ASCII terminals are frequently attached to IBM Mainframes.
Two methods are possible.  The direct attach (or dial-up) is done,
and typically supports the IBM 3101 (an ASCII terminal) or other
types of TTY.  The other method is to attach to an external box
(typically the IBM Series/1) which does the conversion between
character sets.

I hope this clears up some of the confusion.

P.S.  The only devices which are character set dependent are the
display units (3270 type devices), and printers.  Some are EBCDIC,
and some are not.  Codes may be device dependent.
-- 
Spoken: Larry Koved
Arpa:   koved.umcp-cs at CSNet-relay
Uucp:...{allegra,seismo}!umcp-cs!koved



More information about the Comp.unix mailing list