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,c9b0085ab7be4455,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-13 08:11:52 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: Pointers Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <3jki04$9bj@theopolis.orl.mmc.com> Date: Mon, 13 Mar 1995 15:54:54 GMT Date: 1995-03-13T15:54:54+00:00 List-Id: Bob Gilbert (rgilbert@orl.mmc.com) wrote: : In article 2er@gnat.cs.nyu.edu, dewar@cs.nyu.edu (Robert Dewar) writes: : ->Jon, we have to ask why a simple address clause : -> : -> for x use at ... : -> : ->does not work for you, since this is the obvious way of reading a specific : ->memory address. You have to consult your implementor on how to represent : ->address values, since this is obviously target dependent. : Not to answer for Jon, but..... : In my experience I have found several cases where the simple "for x use at .." : will not work. One problem is that with most comilers which support the : address clause, will perform a write to the memory location (initialization : I suppose) during elaboration. This can cause problems with "read only" : addresses. In Ada 95, you can specify "pragma Import(Ada, );" which indicates that *no* default initialization is to be performed by the compiler-generated code. This is generally desirable when using an address clause to associate a name with a machine register of some sort. Also, in Ada 95 there are language-defined functions for converting integers to addresses. Finally, the preferred syntax for specifying the address of an object uses "for ...'Address use ...", such as: for Console_Status_Register'Address use System.Storage_Elements.To_Address(16#FFC0#); The "for ... use at ..." syntax is still retained for upward compatibility reasons. : -Bob -Tucker Taft stt@inmet.com Intermetrics, Inc.