Does C depend on ASCII?

Guy Harris guy at rlgvax.UUCP
Sun May 20 05:25:10 AEST 1984


> 	"I don't agree that the IBM machine is really geared toward
> 	EBCDIC."

> A program running on an 370-architecture machine can convert a binary
> number to an EBCDIC string in two instructions.  There is no
> corresponding conversion to ASCII, though there was an "ASCII mode" bit
> in the Program Status Word on the 360 line, dropped in the 370 line.

A binary number can, however, be converted to ASCII in three instructions on a
370-architecture machine; "CVD", "UNPACK" or "EDIT" or "EDMK", and "TR".  This
counts as a bit of a kludge in my book, though, because it requires an
intermediate result (the EBCDIC string) which is thrown out after translation
to ASCII; this wouldn't have been necessary with an ASCII mode.

Somebody brought up the point (in one of these discussions) that "EDIT" and
"EDMK" use three codes in the edit pattern string for special purposes, and
that those codes correspond to ASCII space <SP> and two other printable
characters.  Anybody out there with a System/*360* Principles of Operation
(I think we have a 370 PrincOps in house, but it wouldn't help) know what
"EDIT" and "EDMK" did about this in ASCII mode?

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix mailing list