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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: How do I get this to work?? Date: 1999/01/06 Message-ID: <1999Jan6.074153.1@eisner>#1/1 X-Deja-AN: 429394031 X-Nntp-Posting-Host: eisner.decus.org References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> <36926c54.2583014@news.pacbell.net> <76uvjt$o0f$1@nnrp1.dejanews.com> X-Trace: news.decus.org 915626518 16434 KILGALLEN [192.67.173.2] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1999-01-06T00:00:00+00:00 List-Id: In article <76uvjt$o0f$1@nnrp1.dejanews.com>, robert_dewar@my-dejanews.com writes: > In article <36926c54.2583014@news.pacbell.net>, > tmoran@bix.com (Tom Moran) wrote: >> NO. 'address is non-portable. For instance, one of the >> compilers I use regularly uses the full Intel >> segment:offset form, all 32 bits, for 'address, vs 32 >> bits with (Win32's) implied segment for 'access. > > First, I assume you mean full 48 bits for the > segment:offset form, since that is what it is in 32-bit > mode, and surely you are talking about 32-bit mode here. > > If so, that is an extraordinarily bad choice for a compiler > to make. Why? Because there is loads of legacy code around > that assumes that an Address value can be passed to C as > a pointer. A compiler that does not allow this usage is in > my opinion badly flawed if you want to interface to C using > it. For the sake of portability, a compiler should at least flag all such usages that are not guaranteed to work by the standard against which it is written. Not working on the development platform is a very large hammer, but perhaps it is justified for Ada 95 where there is a supported mechanism for calling to some of the other standardized languages. Also, representation of addresses can vary even on a single platform, so sometimes you have to know how the other language code (or portion thereof) was compiled to know how big _it_ thinks an address is. It would not do to have the C code stuff a 64 bit address into your 32 bit address variable. Larry Kilgallen