On Wed, Mar 19, 2008 at 11:26 AM, Judah Milgram <[EMAIL PROTECTED]> wrote: > Is the reason hexdump gets it right even though I haven't told it whether > my machine is big or little endianed, is it that the underlying call to > printf takes care of it, and that's part of the libc built for that > particular machine?
Well, the processor takes care of it, really -- it puts those two bytes in memory, then looks at them as a 16-bit integer, then converts that quantity to a hex string. Hexdump, and everything on your system, was compiled for your particular architecture, and doesn't need to be told anything about endianness. It could have a feature that would *ignore* the system's endianness and print things in an endianness that you specify. Dustin -- Storage Software Engineer http://www.zmanda.com
