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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98e311935a219163 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 12:08:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.airnews.net!cabal11.airnews.net!cabal2.airnews.net!news-f.iadfw.net!usenet From: "John R. Strohm" Newsgroups: comp.lang.ada Subject: Re: Help with Copying Shared Memory to Local Date: Fri, 24 May 2002 13:43:09 -0700 Organization: Airnews.net! at Internet America Message-ID: X-Orig-Message-ID: References: <3CED51CF.39E26FC6@acm.org> <3CEDA095.61BE6EF6@acm.org> <478AE9B914ED6844.5DEC7C5E64D6473E.909AD32BDF37CFA7@lp.airnews.net> Abuse-Reports-To: abuse at airmail.net to report improper postings NNTP-Proxy-Relay: library2.airnews.net NNTP-Posting-Time: Fri May 24 14:08:05 2002 NNTP-Posting-Host: !^KR-1k-Y'J2XRP (Encoded at Airnews!) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:24671 Date: 2002-05-24T13:43:09-07:00 List-Id: type x is record csr: byte; dr: byte; end record; for x use record at mod 2; for x'size use 16; Or something of that nature. Admittedly, it has been a number of years since I last looked at Ada rep specs. The thing I remember most painfully was laying out the registers for a Signetics 2681 DUART, and then writing a reusable device driver as a set of four generics. "Stephen Leake" wrote in message news:ulma9mqnj.fsf@gsfc.nasa.gov... > "John R. Strohm" writes: > > > Ada representation specifications provide a clean way to > > tell the compiler what kind of access to use, > > This is _not_ what rep spec say. They say how to lay out the bits in > memory, not how to access them. > > > and most compilers were good about following the programmer's > > wishes. > > Some compilers do "what you want", but there is _no_ guarrantee in the > language for this. > > If you need a 16 bit access, use assembly code. Wrap it up in a > low-level Ada subprogram, to make it easy to use. > > Yes, it feels inefficient and inelegant, but it is the best approach. > > -- > -- Stephe