Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site apr.UUCP Path: utzoo!watmath!clyde!cbosgd!apr!las From: las@apr.UUCP (Larry Shurr) Newsgroups: net.micro.pc Subject: Re: Segment Registers -- 8086/80286 Message-ID: <154@apr.UUCP> Date: Tue, 10-Jun-86 15:54:34 EDT Article-I.D.: apr.154 Posted: Tue Jun 10 15:54:34 1986 Date-Received: Sat, 14-Jun-86 00:45:50 EDT References: <165@sci.UUCP> <146@apr.UUCP> <494@ubvax.UUCP> <1851@gitpyr.UUCP> Reply-To: las@apr.UUCP (Larry Shurr) Organization: Advanced Programming Resources, Columbus OH Lines: 45 Keywords: 286 segment registers In article <1851@gitpyr.UUCP> kpk@gitpyr.UUCP (Kevin P. Kleinfelter) writes: >In article <494@ubvax.UUCP>, skip@ubvax.UUCP writes: >> In article <146@apr.UUCP> las@apr.UUCP (Larry Shurr) writes: >> > ... >> ... and if you ever plan on writing programs for the i80286, don't >> "normalize" pointers. To paraphrase some Microsoft documentation: >> >> ...There is NO relation between >> segment N and segment N+1 (ie N+1:0 != N:10h). >> >So how will one compare pointers? If you can't normalize them, two pointers >could reference the same address, but not contain the same values... Presumably, you would have to assure that you never set up a mapping which creates overlapping segments. I believe that this is an assumption made by Intel (at least in their assumptions about how virtual memory -- i.e., paging -- works). Of course this brings on the dreaded "64K addressing horizon" problem which limits in-memory objects to a maximum size of 64K. Normalization of pointers was introduced to extend the addressing horizon using a software solution, but it is probably not consistant with Intel's intentions. It also limits pointer arithmetic to addressing within a segment. One could also imagine setting up a funky mapping in the segment table so that arithmetic on segment:offset pairs was meaningful, but the results would be very arcane and complicated. Operating system and language implementors would probably not want to introduce this sort of software fix for the addressing horizon problem, especially with the 386 on the way (though who knows what problems that will create?). Regards, Larry -- ------------------------------------------------------------------------------ BRITANNUS (shocked): Caesar, this is not proper. THEODOTUS (outraged): How? CAESAR (recovering his self-possession): Pardon him Theodotus: he is a barbarian, and thinks that the customs of his tribe and island are the laws of nature. (_Caesar and Cleopatra_, Act II - G. B. Shaw) Larry A. Shurr (osu-eddie!apr!las || 137c South Towne Ln; Delaware, OH 43015)