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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86ec22e070e319c0 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: How do I get this to work?? Date: 1999/01/10 Message-ID: <77abdp$d5e$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 430858384 References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> <36926c54.2583014@news.pacbell.net> <76uvjt$o0f$1@nnrp1.dejanews.com> <369308b4.42620270@news.pacbell.net> <771ash$rr3$1@nnrp1.dejanews.com> <36943353.31256483@news.pacbell.net> <7798bs$i9f$1@nnrp1.dejanews.com> <369850a6.31871728@news.pacbell.net> X-Http-Proxy: 1.0 x6.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Jan 10 13:54:01 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-10T00:00:00+00:00 List-Id: In article <369850a6.31871728@news.pacbell.net>, tmoran@bix.com (Tom Moran) wrote: > Sorry, I was trying to correct your apparent impression > that segmented architectures started with the 286. The > closest to an Ada compiler I ever had for a Burroughs > machine was a simple little toy one I wrote in the early > 80's on a B6700, but the B5500 of course had segments > over 15 years earlier. See the book by Elliot Organick > for more info. Tom, just so you know, I am a reasonable expert on processor architecture, and have of course worked with the B5500 (I wrote some large applications for this machine for the banking industry). Yes, of course, the 8086 did not invent segmentation per se, but assuming *you* know the 5500 architecture well (most people do not, seeing as it was only programmed in high level languages, and there was no assembler), then you will know that the model of segmentation in the 5500 is completely different from that of the 8086. The real point here though is that the thread was about the representation of System.Address and access types in Ada. Your comments about segmentation in this context were, I assumed, and I think correctly, related specifically to the 80286, and are therefore probably irrelevant at this stage. Yes, segmentation is present in the PII, for compatibility purposes, and used in some limited manners in the operating system kernel, but it would be *very* surprising to find an Ada compiler that used 48-bit representations for addresses. Even if you did want your Ada compiler to handle segmentation, this is not the way you would do it! So my original point is valid, and should not be obfuscated by concerns about segmentation on the 286! Namely that the representation of both Address and access types to simple C-compatible objects will in practice be the same as C pointers in virtually all implementations. Remember after all that in C itself, there is no guarantee that a pointer value looks like a machine pointer. Indeed from a semantic point of view in C, a pointer is a two element structure, consisting of a base address in an allocated object and an offset. One can imagine a checking compiler (or a C-specific architecture) that represents pointers that way, but it is very unlikely. It is in fact interesting to note that C does NOT provide a linear view of the address space, so general address arithmetic is not possible in C. Yes, your C compiler may provide such a capability in practice but you are using undefined operations. In contrast, Ada 95 *does* provide a linear address model via the Integer_Address type in System.Storage_Elements. You can for example in Ada, but not in C, create fully conforming portable code that provides hashing of addresses of objects, this is not possible in strict C. For more details on the segmentation mechanism in the x86, and in particular the interesting history of how it came about, read chapters 2-3 in my Microprocessors book (Microprocessors: A Programmer's View, McGraw Hill 1990). Interestingly, although this book is quite old now, most of it is still quite up to date. It is really only the EPIC introduction that will make it out of date :-) Robert Dewar -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own