Huh, I didn’t realize the 8086 only had a 20 pin address bus. Makes everything seem a bit more sane, although why make the segments overlap? I can’t see the benefit and it makes expanding the address space that much harder.
I guess one (tiny) benefit of having segments overlap every 16 bytes is that a malloc() implementation could return pointers of XXXX:0000 format, i.e. only concern itself with segments? And then, if you want to index into such an array, you can put the array element’s index/offset in a register without having to add a base address offset, since the array always starts at 0000 (within the given segment).
Overlapping has a lot of sense if you take into account that non-trivial amount of programs only ever needed one segment, so you could use “near” pointers and shorter jump instructions that only deal with offsets.
I remember those old Dos extenders (namely DOS/4G) as well as having a startup menu to chose my boot configuration (EMS, XMS, other settings to maximize the amount of base ram for some games).
I think Falcon and Wing Commander II were the most difficult as they needed a lot of base ram. My cousin ended up going through the EMS command line options and ended up overlapping two ranges to get the right amount of space. I was just a kid; wish I still had those .bat files so I could see what he did. They’re long gone though.
Huh, I didn’t realize the 8086 only had a 20 pin address bus. Makes everything seem a bit more sane, although why make the segments overlap? I can’t see the benefit and it makes expanding the address space that much harder.
I guess one (tiny) benefit of having segments overlap every 16 bytes is that a malloc() implementation could return pointers of XXXX:0000 format, i.e. only concern itself with segments? And then, if you want to index into such an array, you can put the array element’s index/offset in a register without having to add a base address offset, since the array always starts at 0000 (within the given segment).
Overlapping has a lot of sense if you take into account that non-trivial amount of programs only ever needed one segment, so you could use “near” pointers and shorter jump instructions that only deal with offsets.
More silly trivia: All wintel PCs boot with line 20 disabled, in order to default to 8086 mode. And if you turn it on, you talk to the keyboard controller. Some quick googling led me to an example here: https://github.com/Clann24/jos/blob/master/lab2/code/obj/boot/boot.asm#L29
Of course these days all these devices exist on-die, but back in the day they would have been discrete ASICs.
What a great retrospective. All those hours of fiddling, frustration, and guesswork back in the early 1990s – now I kind of understand why.
I remember those old Dos extenders (namely DOS/4G) as well as having a startup menu to chose my boot configuration (EMS, XMS, other settings to maximize the amount of base ram for some games).
I think Falcon and Wing Commander II were the most difficult as they needed a lot of base ram. My cousin ended up going through the EMS command line options and ended up overlapping two ranges to get the right amount of space. I was just a kid; wish I still had those .bat files so I could see what he did. They’re long gone though.