Hacker News new | past | comments | ask | show | jobs | submit login

As I recall: you could only access XMS memory by copying. So you had to _copy_ a memory block from above the 1MB barrier to the lower 1MB addressable space to read, and copy back up again to write.

EMS was pageable. You could had up to four 16 KB pages below 1MB that were fully accessible, but you had to select which address above 1MB each of those four pages had to point to.

So in short, XMS was inefficient, because you had to copy, and EMS was more efficient because you simply decided which part of the extended memory you wanted to map to lower memory.

I think, EMS was emulated in real mode on the 80386 chip by using its virtual 8086 mode. This was not possible on the 80286, so the 80286 could only use XMS in real mode.

I briefly developed using both EMS and XMS, and as I recall, XMS was somehow less painful to get up and running and generally work with, but the performance conscience part of me obviously favored EMS's paging mechanism.

Fortunately, 32-bit memory came along quickly both in the form of Windows and DOS protected mode.




EMS was originally for the 286. It wasn't emulated by the CPU like you could on the 386. You bought an add-in board that contained the extra memory and handled memory requests on the bus for the bank switched area and accepted commands to change what areas the banked switched areas pointed to.

When the 386 came out, it was common to have more than 1MB on the motherboard, but the motherboard (typically?) didn't natively emulate the EMS bank switching scheme, probably because at about that time, everyone figured that people were going to stop using DOS and switch to OS/2, and be running 32 bit code that could natively address higher than 1MB.

When that didn't happen right away, Quarterdeck came out with QEMM/386, which used the Virtual 8086 features of the 386 to emulate EMS in software. Microsoft then shipped a not quite as good clone of QEMM as EMM386 with DOS 5.0.


On the other hand, I seem to recall EMS in virtual86 mode being critized because the virtual86 mode caused a lot of very slow traps for that emulation. Not sure if true, but if the emulation was inefficient then I could see XMS being faster even if it means copying memory around.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: