On Thu, 7 Sep 2000, John Summerfield wrote:

>> Uh, you realize that for some architectures it isn't 1-2-3-4 if you
>> store 0x01020304 into a double-word.  It might be 2-1-4-3 o
>> something else perverse.
>
>In 30 years, I've only seen two orders of arranging bytes in ints.
>
>There other representations of ints; storing -1 into on can
>have the low-order byte =1.

In 7 years I've seen proof of more than 2 ways of arranging bytes
into ints.

01020304
04030201
02010403

I'll bet there are more as well.  There are also architectures
that arrange the bit order inside the bytes differently for what
it is worth.

These odd architectures may be rare, but they exist.  There is no
guarantee an int is 32 bits either.  There are arch's where it is
48, and likely other oddballs too like 36 or 12 or something..

Again, not common, but if we're talking about _complete_ code
portability, those oddballs exist.  And chances are someone is
porting linux to them.  ;o)



--
Mike A. Harris  |  Computer Consultant  |  Capslock Consulting
Linux Advocate  |  Open Source Advocate |  Red Hat Linux Fanatic
Red Hat Linux:  http://www.redhat.com
Download for free:  ftp://ftp.redhat.com/pub/redhat/redhat-6.2/



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to