Byte order (retitled)
David DiGiacomo
david at sun.uucp
Tue Apr 8 05:58:58 AEST 1986
In article <7046 at cca.UUCP> g-rh at cca.UUCP (Richard Harter) writes:
> Well, no, little-endian came about because the engineers at DEC
>who designed the PDP-11 made an arbitrary decision that was not well
>thought out. I will not essay to defend the sanity of DEC engineers,
>and cannot recommend that any one else do so (:-)). It was a bad
>decision.
You are not considering the context of the decision. A little-endian
architecture is highly desirable in an environment which uses
call-by-reference exclusively (e.g. PDP-11 Fortran). It allows any size
value to be passed to a subroutine expecting a parameter of that size or
smaller. In a predominantly call-by-value environment (e.g. C) this is
not particularly important, but there are plenty of programmers who have
been burned by { int c = 0; read(fd, &c, 1); }.
--
David DiGiacomo {decvax, ihnp4, ucbvax}!sun!david david at sun.com
Sun Microsystems, Mt. View, CA (415) 960-7495
More information about the Comp.lang.c
mailing list