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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,826cd690cb6a7585 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!news.glorb.com!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Address and bit mask Date: Mon, 29 Aug 2011 19:47:22 +0200 Organization: cbb software GmbH Message-ID: <1g1ukvu32qav9.p0daj93ws4s6.dlg@40tude.net> References: <71159ccc-bf20-4fcf-a7f1-3b90629c1ecb@l4g2000vbv.googlegroups.com> <4b8745d2-11fa-4cd4-bfc3-127501bef0aa@eb1g2000vbb.googlegroups.com> <80d7ce1b-8621-47aa-8d03-4d168fd52b30@o9g2000vbo.googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: OZUE+nrGuh2amZ0z2SIIvw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:21691 Date: 2011-08-29T19:47:22+02:00 List-Id: On Mon, 29 Aug 2011 09:33:29 -0700 (PDT), milouz wrote: >> To start with, check out package System.Storage_Elements. It at least >> has To_Address/To_Integer subprograms. > > As far as I understand, your solution is to convert the address in > address_integer, manipulating it, and then converting it in address. > And all that stuff is because Address type is defined as private. > Am I right ? There is Storage_Offset type in System.Storage_Elements. Address arithmetic is most likely to be done on the offsets to some definite address, for example, alignment computations. Bit-wise operations are either meaningless or machine-specific. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de