8086 (was Re: more talking to the press.)

From: Eric Smith <eric_at_brouhaha.com>
Date: Fri Nov 14 07:45:44 2003

Hans wrote:
> to me it's the way the memory is handled
> that makes the 8086 the great CPU it is

I wrote:
> What, the 64K segments that alias on paragraph boundaries?
> Yecch! What a kludge! The PDP-11 had better memory management
> for a 64KB address space at least seven years earlier.

Hans wrote:
> Excuse me? The PDP-11 is a classic example for an external
> MMU, completely invisible to a user task. Nice if you just
> want to run old Software that expects a 28K addres space.
> But without expesive OS calls, and the MMUs equivalent of
> bank switching, it just allows to access said 28K (well,
> 32K since the IO may have been not mapped in).

Exactly. That's what's nice about it. You can map eight
arbitrary 8K byte areas into the process address space without
the process even needing to know about it. (Sixteen if you have
separate I&D). If the code needs access to more than that, it
can make requests to the OS.

With the 8086, if the code wants to address ANY discontiguous
regions of memory as data space, it HAS to deal with those damn
segment registers.

> (And BTW, IBM had it before :)

Huh?

> Now, still beeing a strict 16 Bit CPU, this little trick
> allows a 16 Bit user process to access up to 65K of 65K
> segments.

Not on the 8086, it doesn't. If you want independent 64K segments,
you get a maximum of 16 of them. It wasn't until the 286 that
they finally introduced proper segmentation.

> In fact, memory management on classic Macs was similar,

Not really. The Mac has a single flat address space. The software
chooses to carve it up into blocks called segments, but that's
similar to the x86 segments in name only.

> Basicly that's nothing else than using software to do
> exactly what the 8086 does in hardware.

No, there's not even any *similarity* between how the Mac Memory
Manager works and 8086 segmentation.

> The value of the segment has no meaning - why do people
> always waste their time in calculateing 'real' addresses?
> I don't care for that on a /370, nor on a PDP 11, so why
> should I do so on my PC?

Becaues sometimes you actually need to know whether two pointers
point to the same object, even when those pointers may have come
from different software that plays fast and loose with the segmentation
rules, which was not uncommon on the 8086.

Eric
Received on Fri Nov 14 2003 - 07:45:44 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:19 BST