2 ms·
Banked or segmented memory was a common CPU feature of the time. It's look back upon with a disdain that simply didn't exist at the time.
by timewizard 2y ago
Banked or segmented memory was a common CPU feature of the time. It's look back upon with a disdain that simply didn't exist at the time.
- qingcharles 2y agoI agree. I don't particularly remember any disdain at the time. It was just a thing that you worked with. Sure, it made things more complicated. Sure, it was easier with a flat address space. But there were way bigger problems in day-to-day development than segmented memory.
- drmpeg 2y agoOn 8086, the assembler managed the segmentation. All you had to do was load the DS (and possibly ES) register with an assembler defined symbol at the beginning of your function. I never worked with the 80286, I pivoted to the i960 around 1992.
- pjc50 2y agoSegmented memory isn't that weird. What was weird was that, instead of the obvious way of concatenating two sixteen-bit registers to produce a 32-bit address, they added them together to produce a 20-bit address. In addition to which there was some hardware nonsense with the top address bit ("gate A20"). This system seemed practically designed to generate pointer aliasing, and it also permanently limited the architecture to one megabyte of addressable memory. Whereas the concatenation system could have been extended by simply exposing more bits of the address bus on CPU pins. The shenanigans to get DOS machines to use more than 640k (which the application had to share with the OS and drivers!) are stuck in my memory.
- kjs3 2y agoGate A20 and 640k memory limits are because of the design of the IBM PC and M$ DOS, not the 8086. Better hardware and software didn't have these limits (they had others).
- timewizard 2y ago> This system seemed practically designed to generate pointer aliasing, We did not care about that then. Primarily because SMP and threads were simply not a thing. You might also note that any implementation of mmap(2) provides the exact same facility. > permanently limited the architecture to one megabyte of addressable memory It limited the generation. The architecture has obviously moved well past that. Now you can complain that though you have 64 bits only 48 are routed out to pins on your board. > The shenanigans to get DOS machines to use more than 640k (which the application had to share with the OS and drivers!) are stuck in my memory. hah. Program on a mainframe in 24bit mode sometime. That's a real treat.