comp.lang.ada
 help / color / mirror / Atom feed
* Rep Specs
@ 1996-10-07  0:00 Doug Shipler
  1996-10-08  0:00 ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Shipler @ 1996-10-07  0:00 UTC (permalink / raw)



I am using SunAda83 version 1.1k on a SunOS Sparc 5.  I have a record
that is rep speced into 32 bit long words.  One of the words is
split up into several fields, one is a 16 bit integer, and the
others are bit flags.  The interesting part is that when I try to
access one of the bit flags, the compiler fetches the wrong bit, it
gets a bit from the 16 bit integer field.  

In this example, Flag3 accesses a bit inside Value.

for My_Record_Typ use
     record at mod 32;
          Value at 0 * 4 range 16 .. 31;
          Flag1 at 0 * 4 range 15 .. 15;
          Flag2 at 0 * 4 range 13 .. 14;
          Unused1 at 0 * 4 range 10 .. 12;
          Flag3 at 0 * 4 range 9 .. 9;
          Flag4 at 0 * 4 range 8 .. 8;
          Unused2 at 0 * 4 range 4 .. 7;
          OtherVal at 0 * 4 range 0 .. 3;
          ........

Any ideas are greatly appreciated!




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1996-10-13  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-07  0:00 Rep Specs Doug Shipler
1996-10-08  0:00 ` Stephen Leake
1996-10-09  0:00   ` Rep Specs,endian,ncohen Peter Hermann
1996-10-10  0:00     ` Norman H. Cohen
1996-10-11  0:00       ` Stephen Leake
1996-10-13  0:00   ` Rep Specs Robert Dewar

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