Confused re: endianness
2005-10-18 by rtstofer
I have a pointer to an unsigned 32 bit value in an array[512] of unsigned chars (actually the partition table of a CF). When I point to the value using GCC, it seems that the code is assuming I am pointing at the high word and that the low word precedes the high word in memory. I think I am pointing at the low word and the high word should follow. The byte order within the two 16 bit words is correct. Any thoughts about what I am doing wrong. I can see the sector dump and I can see the results of extracting values and the results are wrong. Bytes work and 16 bit words work but 32 bit words do not. Richard