RISC Machine Data Structure Word Alignment Problems?
Ronald S H Khoo
ronald at robobar.co.uk
Mon Feb 12 22:13:09 AEST 1990
In article <17906 at rpp386.cactus.org> woody at rpp386.cactus.org (Woodrow Baker) writes:
>
> MS-DOS. I have to do things like reach out over the network, and read
> data structures out of the remote controllers. These structures for the
> most part, are a mix of byte and word fields. I then have to parse through
> them, and isolate the parts. Structures are the obvious way to do this.
> BUT, the @#$% compiler choses to pad byte or char values out to ints.
#ifdef MEDIUM_MADRAS
You don't think this is a hint that it would have been *so* much easier
if everything spoke *text* instead. Sure, there's the overhead of
binary->text->binary, but the advantages outweigh the cost, especially
if you ever have a mix of controllers with wildly differing internal
architectures.
Oh, you want to discourage that to lock your customers in? Excuse me.
#endif
--
Eunet: Ronald.Khoo at robobar.Co.Uk Phone: +44 1 991 1142 Fax: +44 1 998 8343
Paper: Robobar Ltd. 22 Wadsworth Road, Perivale, Middx., UB6 7JD ENGLAND.
$Header: /usr/ronald/.signature,v 1.2 90/01/26 15:17:15 ronald Exp $ :-)
More information about the Comp.lang.c
mailing list