> What was the difference between extended memory and expanded memory?
10yo me never did figure out why Kings Quest would play with one and not the other.
> What was the difference between extended memory and expanded memory?
10yo me never did figure out why Kings Quest would play with one and not the other.
Expanded memory bank switched the additional memory into an area of high memory below 1MB.
Basically, with DOS, a program had to be designed and the system configured for one or the other.
Or, on the 386 and later, permanently, running DOS as a vm86 task instead. EMM386 and similar did that. It was very transparent, so you usually wouldn't notice, and even for programs that would like to drive protected mode themselves, there was an interface called DPMI (earlier VCPI) with which they could wrestle protected mode away from the memory manager (being the exception to "permanent").
DOS4/GW, which most probably know from DOOM and other games, used that interface.
For software that did not use DPMI/VCPI, you usually got a message like "CPU already in protected mode" and had to disable your memory manager (usually by rebooting).
It's extra confusing because initially expanded memory was done with add-on cards and later extended memory drivers (on 286 and up) could emulate expanded.
There were a lot of essentially kludges in the latter days of DOS that weren't really made unnecessary until Windows 3.0 (or other OSs with a protected mode) and the 80386 and later processors.
Extended Memory/XMS was pretty much a DOS thing, though. Anything using protected mode would not need it, and be able to just access the memory directly.
> that weren't really made unnecessary until Windows 3.0 (or other OSs with a protected mode)
Windows 3.0 was "sort of" a protected mode OS. The actual Windows part ran as a 16bit task, similar to DOS in EMM386. That changed, again "sort of", with Windows 3.1. There was a thing called "Win32s" to run 32bit Windows applications, but most of Windows was still a single 16bit task.
Windows NT was the real deal, though, shedding off its real mode roots with essentially a reimplementation. It only became part of the "mainstream" Windows versions with Windows XP (Windows 2000 was based on NT already, but still marketed alongside the "legacy" Windows 95/98/ME).
The first kind of further memory expansion was classic bank-switching. Within that 1 megabyte address space, you insert a window, say 32 kilobytes, which can be set to some 32 KB section of the extra memory. Same way more than 64 KB was added to systems like the Apple II, which could only address 64 KB. It's a pain to program for this kind of arrangement.
Later, when running in protected mode, the Intel 286 would be able to directly address up to 16 megabytes of RAM, and the Intel 386 up to 4 gigabytes. Memory managers running in protected mode that could access this memory directly were created, which would handle memory for DOS applications.
Those two approaches for > 1 MB are XMS and EMS. Though I can't remember which is which!
Expanded memory (EMS) is bank switched RAM that stays inside the 640K barrier.
Yes, but to be super pedantic, it stayed within the 1MB barrier[1] that real mode could "officially" address. It was perfectly okay to have your EMS window above the A000h segment in memory, i.e. above 640k, if no device was using it.
[1] Plus some change known as the "high memory area" (HMA), an artifact of how linear addresses are calculated from segment and offset.