Wasted Neurons Wednesday - RAM and the IBM Compatible PC

The IBM PC was powered by an Intel 8088 processor.

That processor could address 1Mb of memory. Yes, a whole luxurious megabyte! Trust me, that was a big figure in 1981.

However, you didn't get the whole megabyte. Oh no. Things like video cards and the built-in BASIC need some RAM to use, so IBM reserved the upper 384Kb of RAM for that purpose. That gave the machine 640Kb of RAM to play with.

In 1981, that was actually pretty amazing. Remember, the first IBM PC (Model 5150) could only have a maximum of 256Kb fitted into it. The minimum RAM to be fitted was 64Kb. So at the time, these probably seemed like fairly generous limits...


So, the IBM PC was cloned, and became effectively an industry of its own. Its originally generous architecture lasted some 21 years longer than I think IBM would have wanted...

So some fairly nasty hacks had to be performed to get more RAM under MS-DOS.

The first was Expanded Memory. That required a special memory card, and a driver to be loaded. It was also a horrifically ugly bank-switching affair.

For those that aren't aware, "bank switching" meant that you didn't get access to all the memory you had on that card. You got access to the memory in 16Kb pages - and only a maximum of four of them. So basically you got 64Kb at a time.

And yet this was better than no memory, so people persevered.


Then, with the Intel 80286, we got Extended Memory. That allowed flat access - no bank switching - to all the memory above 1Mb.

(Provided the processor was in protected mode, that is.)


And it gets no better. There is also the High Memory Area, which is a best described as a godawful hack.
Technically described, it's the first 64Kb (almost) of the Extended Memory area. Due to some trickery involving - believe it or not - the keyboard handling interrupt, that small sliver of memory at the start of the Extended Memory area can be accessed by real mode programs.

Truly, the High Memory Area is a hack which makes Expanded Memory look graceful by comparison.


Basically, RAM on an IBM (Compatible) PC was a mess. An unruly, damnable mess. And we wrestled with it using the tools that MS-DOS provided (HIMEM.SYS, EMM386.EXE, DOS=HIGH) or with third party programs (QEMM, 386MAX).

All to gain a few extra bytes in that precious 640Kb area that PCs were originally so generously given.

It was no wonder that when Windows 95 came along, so many people were happy to be free of these kinds of ugly hacks!


And I remember all of this and more. All of it, in these days of technological luxury, just so many wasted neurons...