Does C depend on ASCII?

Gordon Moffett gam at proper.UUCP
Tue May 22 13:57:03 AEST 1984


#
Virtually ALL the application programs on UTS written in C assume
that ASCII is the base character set.  In fact, many of the
programs you are familiar with on other architectures are just
the same on UTS.  (but -- see below about type ``char'').

The ``virtually'' refers to two cases (that I know of) where EBCDIC
is used: in device drivers for EBCDIC-based devices (like 3270's
(ibm tubes)), and programs that read/write volume lables on tapes
or disks.  The drivers are doing EBCDIC <--> ASCII translations, and the
volume labels are artifacts of an Amdahl-compatable environment.

The applications (and for the most part systems) programmer need
never be aware of EBCDIC on UTS.

Oh, by the way, the type ``char'' is unsigned in UTS/370-architecture,
so for all you people who've been writing:

	char c;
	while ((c = getc()) != EOF) ...

... you have frustrated my work very much ....


UTS is a registered trademark of Amdahl Corporation.



More information about the Comp.lang.c mailing list