Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.