Path: utzoo!attcan!uunet!spool.mu.edu!samsung!cs.utexas.edu!sun-barr!newstop!exodus!jdn From: jdn@misc.Eng.Sun.COM (Jeff Nisewanger) Newsgroups: comp.arch Subject: Re: new word order? Message-ID: <8999@exodus.Eng.Sun.COM> Date: 2 Mar 91 20:49:31 GMT References: <606@mtndew.Tustin.CA.US> <1991Mar1.095745.13399@siesoft.co.uk> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mt. View, Ca. Lines: 25 In article <1991Mar1.095745.13399@siesoft.co.uk> imw@siesoft.co.uk (Ian Wild) writes: >Didn't Microsoft provide a switch for this in their Xenix cc? > >Bytes in a long: > >68xxx: 1 2 3 4 >80x86 (normally): 4 3 2 1 >80x86 (+ cc -Mb): 2 1 4 3 > >My question is WHY? I *think* that 2143 was the byte ordering of longs on the PDP-11. I don't know if this was done specifically for compatibility with the PDP but my guess is that an early C compiler implementation on the '86 may have used the PDP-11 byte ordering since the PDP Unix C compiler was the primary 16-bit reference implementation of the time. Jeff -- Jeff Nisewanger ARPA: jdn@Eng.Sun.COM Window Systems Group UUCP: ...!sun!jdn Sun Microsystems, Inc. 415/336-5743