This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: data alignment issues



Trenton,

> Why not send structures if it works?  After all, if I've tested it and

Oops, this is where I hit the send button too fast. What I meant is that you should not do this right away
but first check what happens (as you did). I am used to have a seperate versions of structs for file/network
I/O and internal use, the same program on a different platform will only need the I/O one - plus functions
to populate - to be changed.

Depending on the compiler used (both are gcc I think) you could use a packed structure by using the
"__attribute__ ((packed))" on the struct definition. When you are using lots of chars and shorts this will
really make some impact on the size of the struct.

> I didn't mean I couldn't read a float in hex.  I mean I don't know how
> it's stored in binary.  As in 00001000.10000000 would be 8.5, but I

Thanks, you got me scared for a minute :-) I wrote a MC68000 floating point library in assembly and
this is not something you want to remember too long ...

Regards,

Rob Jansen

Software Engineer
Competence Center Platforms
BU Mobile Communications
Meijhorst 60-10, 6537 KT Nijmegen, The Netherlands
Tel: +31-24-353-6329
Fax: +31-24-353-3613
mailto:Rob.WJ.Jansen@philips.com




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]