comp.lang.ada
 help / color / mirror / Atom feed
From: dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!zaphod.mps.o
Subject: Packed BIT fields -- any help??
Date: 25 May 93 14:12:35 GMT	[thread overview]
Message-ID: <1993May25.141235.14712@mksol.dseg.ti.com> (raw)

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 is
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 constants
, etc)
that will compile to the same pattern on both machines.  Using "pragma PACK" do
esn'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 source
code, or two sets of type names??

             reply	other threads:[~1993-05-25 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-25 14:12 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!zaphod.mps.o [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-25 22:44 Packed BIT fields -- any help?? Dave Bashford
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox