From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c66d4d7fbddd805a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-11 21:07:13 PST Newsgroups: comp.lang.ada Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!sgiblab!sgigate!sgi!wdl1!scf16!bashford From: bashford@srs.loral.com (Dave Bashford) Subject: Intel Bit/Byte Order Conversion for Alsys Ada ? Message-ID: <1993Mar12.044450.7494@scf.loral.com> Keywords: Alsys Intel Little-Endian Sender: bashford@scf.loral.com (Dave Bashford) Organization: Loral Space & Range Systems Date: Fri, 12 Mar 1993 04:44:50 GMT Date: 1993-03-12T04:44:50+00:00 List-Id: We are having a major problem sending data between an Intel processor and a Motorola processor both running Alsys compiled Ada. A simple bit-packed message gets completely garbled by the compiler on the Intel side even though it was completely rep-spec'd. Example: type Message is record Field_1: Some_11_Bit_Type; Field_2: Some_02_Bit_Type; Field_3: Some_01_Bit_Type; Field_4: Some_15_Bit_Type; end record; for Message use record Field_1 at 0 range 0..10; Field_2 at 0 range 11..12; Field_3 at 0 range 13..13; Field_4 at 0 range 14..28; end record; When this message is sent across to the Motorola processor the bit stream looks like this: Least-Significant 8 Bits of Field_1, Least-Significant 2 Bits of Field_4, Field_3, Field_2, Most-Significant 3 Bits of Field_1, middle 8 bits of Field_4, Bits 29..31, Most-Significant 5 Bits of Field_4 This seems pretty screwy to me, but we have to find a solution ! We obviously have a space problem - otherwise we wouldn't bit-pack. But we also have very tight time requirements. Does anyone have a solution to this ? I would also be interested in editorial comments. Please e-mail your replys and I will summarize for the network. (I won't be able to read the news before it expires.) Thanks, in advance from a _very_ frustrated engineer. -- db bashford@srs.loral.com (Dave Bashford, Sunnyvale, CA)