That macro was defined for PNO ARM code which has 32-bit ints.  68K has 2-byte 
alignment requirements... I just write my own macro or use MemMove.

-- 
from Ben's Palm Tungsten C

-----Original Message-----
From: "Dr. Vesselin Bontchev" <[EMAIL PROTECTED]>
Sent: Fri, 13 May 2005 11:45:44 GMT
Subject: re: Data alignment problem

Yeah, and a typecast before the 8-bit shift is needed too:

#define Read68KUnaligned32(addr)        (((unsigned long) ((((unsigned char *) 
(addr)) [0])) << 24) |    ((unsigned long) ((((unsigned char *) (addr)) [1])) 
<< 16) |    ((unsigned long) ((((unsigned char *) (addr)) [2])) <<  8) |    
((((unsigned char *) (addr)) [3])))

Regards,
Vesselin
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to