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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d5008a5$0$6879$9b4e6d93@newsspool2.arcor-online.net> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d51169e$0$7657$9b4e6d93@newsspool1.arcor-online.net> <1bnp0pw1c8r5b$.guxc48qweiwe.dlg@40tude.net> <4d51a1c0$0$19486$882e7ee2@usenet-news.net> <87411ec5-c197-4143-8ef1-ab9ddb20bcc6@q40g2000prh.googlegroups.com> <505a0855-ed01-4819-9d8e-025ad8d5cb51@y12g2000prf.googlegroups.com> Date: Fri, 11 Feb 2011 02:19:08 -0500 Message-ID: <82k4h7avir.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:tkTSw/EZ7wHxFCQaS08Q4FMl2tE= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 7231b4d54e2eee029e66112929 Xref: g2news2.google.com comp.lang.ada:18204 Date: 2011-02-11T02:19:08-05:00 List-Id: "Vinzent Hoefler" <0439279208b62c95f1880bf0f8776eeb@t-domaingrabbing.de> writes: > Adam Beneschan wrote: > >> In Ada, we'd express this with a >> representation clause that looks (in part) something like >> >> Second_Field at 0 range 5..9; >> >> If we did things the way you think is the "right" way, the second >> field would occupy bits 2, 1, 0, 15, and 14. > > That just means, we cannot have a declaration that will do on both > machines, regardless of what bit-order you specify: Not true! That's what 'Bit_Order is for; you tell the compiler what convention for bit numbers your source code is using, and it does the right thing for the target hardware. -- -- Stephe