comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Johnson <mark_h_johnson@raytheon.com>
Subject: Re: Minimum Record Size?  LONG
Date: Fri, 25 Apr 2003 12:36:34 -0500
Date: 2003-04-25T12:36:34-05:00	[thread overview]
Message-ID: <3EA97222.35376FF7@raytheon.com> (raw)
In-Reply-To: Hrdqa.9680$io.307974@iad-read.news.verio.net

Dr Nancy's Sweetie wrote:
> 
> I'm working on a program which has to take four six-bit hunks of data
> and regroup them into three eight-bit hunks.
[snip - long explanation]

> If I put in C3zY, which map to 28, 55, 25, and 50, I see this:
> 
>     Put in:       28     55     25     50
>               011100 110111 011001 110010
                aaaaaa bbbbbb cccccc dddddd
> 
>     Expect:      115      118      114
>             01110011 01110110 01110010
> 
>     Actual:      220      157      201
>             11011100 10011101 11001001
              bbaaaaaa ccccbbbb ddddddcc
> 
> I can't see where the resulting bits that actually come out are from.
> They don't seem to bear any relation to the bits that went in.
> 
The bits look good to me - they just don't match what you expected. The
packing I see is shown in line with your original message.

You don't mention the machine you are using and you don't post the
actual code you are using. Both would be a greater help in analyzing the
specific problem and solution.

This may also be a big / little endian problem. You have to read very
carefully the ARM when it talks about placement of bits in fields and so
on. You could also try using representation specifications (section 13)
to place each field precisely where you want it. You may find that some
of the combinations you are attempting to do are "not contiguous" and
have to be handled in a special way.

  --Mark



  parent reply	other threads:[~2003-04-25 17:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25 16:33 Minimum Record Size? LONG Dr Nancy's Sweetie
2003-04-25 17:35 ` Stephen Leake
2003-04-25 17:36 ` Mark Johnson [this message]
2003-04-25 21:54   ` tmoran
2003-04-25 18:51 ` David C. Hoos
2003-04-25 21:51   ` tmoran
2003-04-26  3:00     ` David C. Hoos
2003-04-26  2:12 ` Steve
2003-04-27  1:57   ` Rick Stikkers
2003-04-27 12:06   ` David C. Hoos
2003-04-27 14:17     ` Steve
2003-04-27 20:25       ` David C. Hoos
2003-04-28  5:04         ` Steve
replies disabled

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