woodelf wrote:
I thought the x86 was great for programming, as long
as you have 64k
data and code space. Still for simple programing a PDP-8 with 4K
of memory can't be beat.
Yes, that's the problem. What they tried to do is akin to taking a 2D
being from flatland (limited to 64K) and placing it into a 3D world. To
do this, they created multiple planes (segments). So you basically
still have a 16 bit processor, but it can access a lot more memory - 1MB
instead of 64KB.
But it also gets expensive to do so. You now have to track the segment
number for each 64K chunk of memory, and your data structures are
limited to 64K, so your code suffers, or gets more complex. Worse yet,
you're wasting a bunch of useful registers from being used as general
purpose registers. So now you have a bunch of special registers just
for segments.
A far cleaner approach would be to use 32 bit registers to begin with.
Then, you're not limited to 16 bit segments, nor do you have to worry
about segments. See the 68000.
Yes, being able to access 1MB is a huge increase over 64KB, but IBM
decided to put ROM and Video I/O addresses right smack above 640KB,
which made sense, this was 10x bigger than the current 64KB machines of
the day, hence "640KB ought to be enough for anybody."
But it turned out to be a problem after all, one that was solved in and
old way - bank switching. This was driven by Lotus 123 mainly, which
formed the LIM (Lotus, Intel, Microsoft) standard for extended memory.
Ugly, but it worked for a little while. Of course, 386's came out, and
guess what, we were still stuck with 640KB of memory, even though the
386 was a 32 bit processor. And even though Windows 3.1 had a win32s
API, it was still painful to access memory properly - at least if you
weren't using Windows NT or OS/2. And that 640K of RAM was a big problem
too as you loaded more and more TSR's and device drivers in memory.
Turns out there were some holes in the memory above 640KB so you could
remap some of that for TSR's and device drivers, hence the LOADHI stuff.
The fun part was getting "out of memory" errors even when your machine
had 8MB of RAM.
Over all, the "segmented" way of doing things turned out to an ugly
nasty hack. It turned out, it wasn't so good for programming after
all. Think about how many hours lots of people wasted on configuring
their config.sys, configuring things like EMM386, and QEMM and so
forth. Many countless hours, or human lifetimes even, wasted because of
a very poor design decision - one that still affects modern machines to
this day to some extent - at least at power on.