Hacker News new | ask | show | jobs
by rwmj 313 days ago
What you say is true, but I'd also like to ask (people in general) if you have to design a memory map for MS-DOS that doesn't have the 640K limit, what would you do? Your constraints are:

- The total address space is 1MB, and that's a CPU architectural limit (which is only "broken" many years later, and in a rather unsatisfying way).

- You need somewhere to map the RAM, and because of CP/M quasi-compatibility, that needs to start at address 0.

- The CPU starts executing code at 1MB minus a few bytes, so your system ROM must go right at the top of address space.

- You need memory windows for the system ROM, options ROMs and 2x framebuffers.

- Bank switching adds extra complexity and 74xx logic chips on a motherboard which is already very busy.

Given these constraints, the 640K limit for RAM, with framebuffers and ROMs mapped at 0xA0000, is the only thing that makes sense.

3 comments

For those too young to remember that "unsatisfying way" of breaking the 1MB limit:

https://en.wikipedia.org/wiki/Expanded_memory#Expanded_Memor...

(And IIR, Bill Gates had plenty of company in denouncing EMS while announcing official support for it.)

I was actually thinking of the A20 line, but LIM EMS was another unsatisfying way! https://en.wikipedia.org/wiki/A20_line
The 640 limit complaints aren't really about DOS; they're about Intel's segmented memory architecture (again, which had its reasons and greatly increased the ability of the chip at the price-point).

Most people first experienced it long after it was seen as a crippled chip, which is not what it originally was.

The address space didn't have to start at 0. In fact, address 0 contains interrupt vectors. I suspect most of the CP/M compatibility was about starting at specific addresses within a given segment (isn't that why .COM executables are placed at 0x100?)

I blame Intel by having the boot address at FFFF0. That guarantees you need ROM at the top of memory rather than loading boot code and sticking frame buffers in low memory, and starting user RAM at like 0x20000.