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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-15 14:09:43 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ada and pointers Date: Wed, 15 Aug 2001 17:00:25 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9lenta$joq$1@nh.pace.co.uk> References: <1ope7.5943$6R6.582900@news1.cableinet.net> <9ldto7$9pg$1@nh.pace.co.uk> <3B7A9D94.F34F65E@worldnet.att.net> <9leapp$f30$1@nh.pace.co.uk> <3B7AD379.5559D329@worldnet.att.net> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 997909226 20250 136.170.200.133 (15 Aug 2001 21:00:26 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 15 Aug 2001 21:00:26 GMT 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:11964 Date: 2001-08-15T21:00:26+00:00 List-Id: Well, I wasn't exactly making the claim that all segmented hardware can address linearly. I was making the claim that for purposes of conceptualizing memory that all memory could be viewed as a single dimensional array with an integer index. Obviously, different hardware architectures are going to treat it differently, and not all architectures with a segmented address can (at the hardware level) treat their memory as being linear. But for purposes of logical thought experiments, you can treat a segmented address space as linear just by (in your mind) concatenating the segment part and the offset part. It becomes (in your mind) one big integer. Clearly, Ada's abstraction of access types from any particular addressing scheme is a good thing. It looks the same from the software level no matter what the underlying hardware is like. For example, an architecture with a 32 bit segment and a 32 bit offset can be viewed identically to one with a 64 bit linear address because Ada is going to bookeep both under an access type (or System.Address) and provide every operation you need for working with the addresses without your having to know if the memory reference is kept in one or two parts. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "James Rogers" wrote in message news:3B7AD379.5559D329@worldnet.att.net... > > Sometimes this is correct. Some systems do have the ability to use > both linear addressing and segment-offset addressing. Some of the > older systems do not have any ability to support linear addressing. > This is one reason the type System.Address is implementation defined. > System.Address also has comparison functions, but is not an aritmetic > type. It does have addition, subtraction, and modulus operations > defined in System.Storage_Elements, but that does not make > System.Address a numeric type. > > Note that there is a type called > System.Storage_Elements.Integer_Address. > This type is not a System.Address, but does provide conversion > functions to and from System.Address. > > Ada provides, through these types, conversions between linear and > segmented memory models, even if those conversions are not directly > supported by the hardware memory model. >