avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Simple endianess question


From: David Kelly
Subject: Re: [avr-chat] Simple endianess question
Date: Sun, 16 Apr 2006 18:50:47 -0500


On Apr 16, 2006, at 2:02 AM, Rick Mann wrote:

On Apr 15, 2006, at 23:53 , Russell Shaw wrote:

it is the same as foo & 4095. If endian mattered, you'd have to change every
number in your program to compile it on a different endian machine.

Yes, of course. It makes sense, I just needed the sanity check.

Endian does matter and you have to compensate for every machine you target. Look for macros for "network byte order", these are big- endian and when used on a big-endian machine the data falls thru and nothing is done, but on a little-endian machine the bytes get re- ordered.

Just off hand I don't find any endian macros in avr-gcc.

--
David Kelly N4HHE, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]