Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site looking.UUCP Path: utzoo!watmath!looking!syncro From: syncro@looking.UUCP (Tom Haapanen) Newsgroups: net.micro.pc Subject: Re: Segment Registers -- 8086/80286 Message-ID: <592@looking.UUCP> Date: Sat, 28-Jun-86 20:19:22 EDT Article-I.D.: looking.592 Posted: Sat Jun 28 20:19:22 1986 Date-Received: Sun, 29-Jun-86 07:22:07 EDT References: <165@sci.UUCP> <146@apr.UUCP> <494@ubvax.UUCP> <1851@gitpyr.UUCP> <140@ima.UUCP> Reply-To: @looking.UUCP (Tom Haapanen) Organization: Looking Glass Software Ltd. Waterloo, Ontario Lines: 26 Keywords: 286 segment registers In article <140@ima.UUCP> johnl@ima.UUCP (John R. Levine) writes: >>> ... and if you ever plan on writing programs for the i80286, don't >>> "normalize" pointers. >>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 "These opinions are solely mine, although even I would like to deny them..."