I've never seen a compiler that supported 8 bit chars that couldn't address each of them individually. The processor may not address them individually, but you should be able to access each char independently at the higher level. That's what higher level languages do - hide the details of the hardware.
Access to individual char values on a word-based bus may result in the compiler generating a read+shift or read+mask, but you still can typically load/store even and odd addressed characters at the 'C' level. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kieran Mansley Sent: Thursday, November 08, 2007 6:27 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] alignment problems On Thu, 2007-11-08 at 11:08 +0000, Jonathan Larmour wrote: > I'm concerned that you say that "two addresses" are only used with > long, and one for both char and int. Does this mean that for: > char foo[4]; > that: &foo[0] == &foo[1] ? > > If that is the case, I think you may have an uphill struggle. Yeah, that confused me. Sounds like it would be sensible to think of it as having 16-bit bytes rather than worrying about the word size. If that's the case I think there may be problems for you in lwIP where we've confused bytes with octets (i.e. 8 bits). Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
