Linked by Thom Holwerda on Sun 10th Jun 2018 23:37 UTC
OSNews, Generic OSes

At the beginning of the '90s, the PC platform was often mocked by its rivals. Of course, PCs were much more powerful than, say, an Amiga 500. But the Amiga offered a flat memory address, while a DOS program could only access memory using cumbersome 64 KiB segments. And to add insult to injury, there was this strange 640 KiB memory limitation. No matter how much physical memory you had in your box, the utter most important Conventional Memory was limited to 640 KiB!

The Legend teaches us that Bill Gates once declared that "640 KB ought to be enough for anybody", then designed MS-DOS to enforce this limitation.

The truth is of course a little more complicated than that.

This article brings back so many confusing childhood memories of MS-DOS and memory management - memories I wouldn't wish on my biggest enemies. All kidding aside, this is a great insight into how memory is organised in MS-DOS.

Thread beginning with comment 658259
To read all comments associated with this story, please click here.
gilboa
Member since:
2005-07-06

Nothing beats switching 64KB code and data segments back and forth from EMS.
... Grrrr.

I don't miss it. Not for a second.

- Gilboa

Reply Score: 2

ssokolow Member since:
2010-01-21

Nothing beats switching 64KB code and data segments back and forth from EMS.
... Grrrr.

I don't miss it. Not for a second.

- Gilboa


Thankfully, I'm a little too young to have experienced that... though it was also partly that BASIC was all I had learning materials for, so my father's Microsoft C/C++ 7.0 and Windows 3.1 SDK floppies and reference manuals were cool but effectively useless toys and what I pined for was QuickBasic 4.5's compiler.

Of course, now, I have even less patience for antiquated tools when the utilities I want to write for my retro-PC are just a means to an end, so I'm glad Free Pascal can target DOS (and Win16 in trunk) and OpenWatcom still has its Win386 "DPMI extender for Win16" and effortless support for cross-compilation.

Reply Parent Score: 3

gilboa Member since:
2005-07-06

A couple of months ago, I actually looked at some code I write in the mid 90's. I was amazed how simple and effective it was.

... Man I'm old ;)

Reply Parent Score: 2

kuiash Member since:
2018-05-21

It was hell. Everything about the early PC was hell. I guess the passage of time of made people inquisitive about it. Maybe it's even grown a little "cooler".

It was CRAP! Fiddling jumpers on sound cards so they didn't conflict with the VSYNC signal of some ancient video card. Busses so slow that you couldn't even clear the display. CPU registers that have different timing characteristics. Every memory location aliased 4096 times in a segment model that nobody could love (I never quite understood the point of it TBH).

Everything started with writing your drivers for video, audio, mouse, keyboard. The BIOS was garbage and couldn't push the serial or parallel IO at any decent speed (code your own and it'll go as fast as the hardware).

AND it was expensive!

Then, just to make it more fun, they added paging. Everything was a hack and a kludge.

I can't believe it beat good clean 68K machines with good frame buffer and a fast bus... but that failure is another story.

I still have near, far, huge pointers and all their variants burnt into my memory!

Reply Parent Score: 1

ssokolow Member since:
2010-01-21

I can't believe it beat good clean 68K machines with good frame buffer and a fast bus... but that failure is another story.


Never underestimate the power of making it easy for an ecosystem of clones to be built using off-the-shelf components.

It worked for the IBM PC and it worked for Android.

Reply Parent Score: 2

gilboa Member since:
2005-07-06

... But on the up side, it forced programmers to write *efficient* code.
I still find it amazing that many C++ programmers don't really comprehend the difference between passing structures by pointer and passing them by value (effectively making a copy of it), simply because the hardware is so damn powerful, they don't feel the difference.

Back in the DOS days, you have to use clever tricks simply to avoid using the dog-slow imul multiplication command.

- Gilboa

Edited 2018-06-13 10:09 UTC

Reply Parent Score: 1