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,39f75d16f934f719 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-07 05:02:03 PST Path: swrinde!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Type t is MOD c??? Date: 7 Feb 1995 06:56:30 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3h7n5e$p95@gnat.cs.nyu.edu> References: <3h5bei$npp@nyheter.chalmers.se> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1995-02-07T06:56:30-05:00 List-Id: Magnus Hakansson asks: This probably a very simple question when you know the answer, but it is causing me some troubble. In "system.ads" there is a declaraton: type Address is mod Memory_Size; and I want to know how to assign a specific address to a pointer. How do I do? What is the syntax for an "address"? Is there any hidden packages avilable for accessing certain bytes of the memory of my PC, or is there any other tricks I don't know? Can anyone help me on this subject? Magnus, clearly you are using Ada 95 (probably GNAT, though you did not say). Assigning an address to a pointer can be done, but is usually not the best way of doing things instead use: for x'address use expr; where x is a variable, and expr is an address. For how to construct an address, see the type Integer_Address and associated routines in the package System.Storage_Elements. If you really need to convert an address to a pointer, see package System.Address_To_Access_Conversions.