The only real technical reason that I've ever seen for byte ordering is:
#define htonl(x) (x)
of course you can just wire the part up back'ards too...
D. Jeff Dionne wrote:
> On Tue, 12 Dec 2000, Tom Walsh wrote:
>> market to the detriment of the low-end. The only time we get cool
>> embedded stuff to use is when they sell a U.S. automobile manufacturer
>> on using that chip, after the chip is no longer needed by the auto
>> people, it usually gets dropped. The only chip that they ever really
>> kept around was the 68HC11 due to the suprising popularity of the device
>> in the embedded space (to Motorola's surprise). IMHO, Motorola does not
>> understand the embedded market, they bumble along and eventually produce
>> something interesting to the rest of us (DragonBall, 683XX cores).
> Interesting, that's exactly how I've always thought of Intel! Mot has
> always known exactly how/what/where and Intel just bumbles along getting
> lucky. Just goes to show that there is no agreement on this subject at
> all, just advocates for both.
> As for little/big endin, seems to me that the reason ppl like big endin is
> it's right reading in memory. People like little endin because this (and
> it's equiv. in other languages and of course assembler) work naturally...
> long i = 0x1234;
> short *p = &i;
> Big endin machines print 0x0, little endin machines print 0x1234. IMHO,
> bad code should produce bad results, not hide them so it breaks
> later. BTW, if you have trouble with the `more` utility shipped with some
> uClinux CDs, it's caused by exactly this bug. uC-src more was originally
> written for ELKS, Linux for 8086, which is a little endin machine and
> effectively hid the bug.
> D. Jeff Dionne
>> Tom Walsh - WN3L - Embedded Systems Consultant
>> 'www.openhardware.net', 'www.cyberiansoftware.com'
>> "Windows? No thanks, I have work to do..."
>> This message resent by the firstname.lastname@example.org list server http://www.uClinux.com/
> This message resent by the email@example.com list server http://www.uClinux.com/
-- Joe deBlaquiere Red Hat, Inc. 307 Wynn Drive Huntsville AL, 35805 voice : (256)-704-9200 fax : (256)-837-3839
This message resent by the firstname.lastname@example.org list server http://www.uClinux.com/
This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:39 EST