Check out Julio Merino’s article on real mode memory allocation:

From 0 to 1 MB in DOS

https://blogsystem5.substack.com/p/from-0-to-1-mb-in-dos

I’m looking forward to how the series progresses, even DJ has dropped on in on the article!

So much trauma, 64kb segments, wrapping around, a20 gates, and overlaid virtual machines. And that’s not even really going into extenders. Looking forward to segmentation vs paging, interrupt reflection, and bi-modal handlers! Don’t cross the ISA 16Mbit DMA boundary!

5 thoughts on “Check out Julio Merino’s article on real mode memory allocation:

  1. I keep hearing people complain about how terrible the original x86 architecture was, with its segments, 64k limits and 1meg-wraparound.

    But compared to today’s architectures it is rather easy and elegant. Yes, segmentation stuff might confuse some people atr first, but even in today’s world we have different selectors for memory that we have to juggle around. But back then there was no TLB, no 5-level-deep page translation tables, no virtual memory (that you had to worry about), no IOAPIC.

    Following a few segment values (that were trivially converted to linear addresses) around was not as terrible as people like to make it look like IMHO

    • I think the larger issue is that there wasn’t enough fo them, and the 286’s protected mode basically broke everything until Gordon Letwin had his methods of soft resetting the CPU back into real mode. 286 Dos Extenders were expensive, and had royalty fees. At least for me, back in the early 90’s, QuickC for Windows & Turbo C++ for Windows were the absolutely cheapest compiler + dos extender available.

      OS/2 compilers were just so expensive, as it was all so professional corporate, and us kids were effectively barred from the platform. Not to mention they were so expensive none of them ever made it to retail, at least where I lived, and I doubt I’d have paid as much for a used car for an OS/2 compiler until the time Watcom 10 on CD-ROM was a thing.

    • “Following a few segment values (that were trivially converted to linear addresses)….”

      I never got the problem, when people complained about segmenting. If you’re programming stuff you really need to know about shifting and bit operations. This is stuff one will learn within 2 hours. All of them, all operations.

Leave a Reply