grt@twitch.UUCP ( G.R.Tomasevich) (04/08/86)
> > 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, > > Richard Harter, SMDS Inc. > > As an old PDP-11 hacker, I can't agree with the condemnation of the > DEC engineering decision. > Griff Smith AT&T (Bell Laboratories), Murray Hill I agree with Harter's complaint but for a different reason. The machine instruction ASHC, arithmetic shift combined, when given an even-numbered register, does a 32-bit shift, in which the lower-numbered register has the high-order bits. Who ordered that??? This seems to have led the C compiler writer to store longs with the shorts in big-endian order, even though the bytes of a short are stored in little-endian order. I see no reason for that convention being more convenient than strictly little-endian order, since there are no long move instructions. In other words, the byte order is 2,3,0,1 if you number from LSB. -- George Tomasevich, ihnp4!twitch!grt AT&T Bell Laboratories, Holmdel, NJ