From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 25 May 93 22:44:38 GMT From: scf16!bashford@ford-wdl1.arpa (Dave Bashford) Subject: Re: Packed BIT fields -- any help?? Message-ID: <1993May25.224438.2164@scf.loral.com> List-Id: In article <1993May25.141235.14712@mksol.dseg.ti.com> ddessert@dseg.ti.com writ es: >I've run up against an "age-old" problem and hope that maybe someone can >shed some light on a "simple" solution. > >We are trying to pass data memory-to-memory between two machines - a Sun SPARC >using SunAda (Verdix) and a TI TMX320C30 using Tartan Ada. Much of the data i s >packed into bit fields. The problem is that the two comilers have chosen >opposite orders for bit numbering -- Tartan uses LSB = 0, Verdix uses MSB = 0. >We would like to use the same source code for defining types on both machines >be have been unable to invent a method for specifying the bits (using constant s, etc) >that will compile to the same pattern on both machines. Using "pragma PACK" d oesn't >help either -- the compilers re-arrange and pack differently, too. > >We can't be the first folks to run up against this -- has anybody already got >an elegant (or, at least, workable) way to avoid maintaining two sets of sourc e >code, or two sets of type names?? > I asked this same question several months ago and will send you what I got if you'll send me your address (ddesert@lobby.ti.com and ddessert@dseg.ti.com failed). -- db bashford@srs.loral.com (Dave Bashford, Sunnyvale, CA)