Article View: net.micro.pc
Article #7396Re: Segment Registers -- 8086/80286
From: David Dyer-Bennet
Date: Thu, 24 Jul 1986 04:12
Date: Thu, 24 Jul 1986 04:12
36 lines
2274 bytes
2274 bytes
> >>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. ... > > >Not likely. The 286 is a genuine segmented architecture (as opposed to the > >8086 which is an unsatisfactory approximation.) The operating system > >controls where each segment is mapped. Unless you have a strange > >operating system, you can assume that the contents of different segments are > >disjoint, so that if two pointers point into different segments, they're not > >pointing at the same thing. > > Ummm, if you ask DOS to allocate memory for you, it returns a *segment* > address, and you are to assume zero offset (see DOS function calls 48 and > 49). Now, unless you are allocating in 64K-sized chunks, the segments > won't likely be disjoint. I am no great fan of DOS, but I'm not sure I'd > call it *strange* in net.micro.pc... > > -- > \tom haapanen looking glass software ltd. > syncro@looking.UUCP waterloo, ontario, canada > watmath!looking!syncro (519) 884-7473 If you're running DOS, the 286 is running in real mode and its differences are irrelevant. If you're running Xenix V2, then it's in virtual mode. Segments have a length associated with them, so again you have non-overlapping segments (many smaller than 64k). There's no hardware to prevent you from having segments pointing at the same place, but it doesn't happen naturally to a user program. -- David Dyer-Bennet Usenet: ...ihnp4!umn-cs!starfire!ddb Fido: sysop of fido 14/341, (612) 721-8967 Telephone: (612) 721-8800 USmail: 4242 Minnehaha Ave S Mpls, MN 55406
Technical Details
Message-ID:
<256@starfire.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!meccts!dicome!mmm!umn-cs!ncs-med!starfire!ddbReferences:
<165@sci.UUCP> <146@apr.UUCP> <494@ubvax.UUCP> <1851@gitpyr.UUCP> <140@ima.UUCP> <592@looking.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!meccts!dicome!mmm!umn-cs!ncs-med!starfire!ddb From: ddb@starfire.UUCP (David Dyer-Bennet) Newsgroups: net.micro.pc Subject: Re: Segment Registers -- 8086/80286 Message-ID: <256@starfire.UUCP> Date: Thu, 24-Jul-86 00:12:58 EDT Article-I.D.: starfire.256 Posted: Thu Jul 24 00:12:58 1986 Date-Received: Fri, 25-Jul-86 00:11:08 EDT References: <165@sci.UUCP> <146@apr.UUCP> <494@ubvax.UUCP> <1851@gitpyr.UUCP> <140@ima.UUCP> <592@looking.UUCP> Organization: Terrabit Software Lines: 36