What is the difference between EMM386.EXE and HIMEM.SYS?
What is the difference between EMM386.EXE and HIMEM.SYS? It seems like they achieve the same objective.
In another forum, it was explained like this:
Expanded memory is a type of memory that old computers used to have in the 80's - modern computers have extended memory instead.
Is that true? I know that EMM386.EXE allows DOS to access memory past 1MB by bank switching into the page frame in the UMA. Doesn't HIMEM.SYS do the same thing without the page frame?
In another forum, it was explained like this:
Expanded memory is a type of memory that old computers used to have in the 80's - modern computers have extended memory instead.
Is that true? I know that EMM386.EXE allows DOS to access memory past 1MB by bank switching into the page frame in the UMA. Doesn't HIMEM.SYS do the same thing without the page frame?
Comments
-
lazyart Member Posts: 483HIMEM.SYS allows memory beyond 1MB to become visible as expanded memory if you have a 386 chip. From there you get high memory (the first 64k or so of expanded memory-- but that goes a bit further).
If you had an 8088 or 286 processor, you still couldn't directly access the expanded memory. This is where EMM386.EXE steps in. If you understand swapfiles, then you can get this easily... but lets back up just a bit here.
The first meg of memory is divided into conventional and upper memory. Conventional is the first 640k of memory, where applications would go. Upper memory is the remaining portion of that first meg-- 384k. This is where device drivers would sit. This is also the limit of 8088 and 80286 processors.
Sooo, here comes HIMEM.SYS, making memory beyond this first meg visible (but not directly useful if you have the older processor). So, in steps EMM386.EXE.... when the processor needs that extra memory, EMM386 swaps out what is in upper memory (that 384k after conventional) with a chunk of expanded memory. When it's no longer needed, EMM386 swaps it back in.
Because of this, you need HIMEM.SYS before you can use EMM386.EXE. HIMEM makes it visible, EMM386 makes it usable to 8088 and 286s. If you can't see it, you can't use it, so HIMEM.SYS is first.
This process of swapping expanded memory in and out of upper memory is called paging (just like a swapfile). The term "extended memory" encapsulates using expanded memory as upper memory.
A picture is really worth a thousand words here.<-----640k-----><--384k--><--------EXPANDED--------???? <-CONVENTIONAL-><-UPPER--> Swap chunks of expanded with upper and you have extended.
HIMEM.SYS = key to expanded. Once expanded is open, EMM386.SYS = key to extended memory (paging). You can't swap with expanded memory until you can see expanded memory.I'm not a complete idiot... some parts are missing. -
lazyart Member Posts: 483Oh, and for the short answer... yes the in the end they accomplish the same thing. It all depended on the needs of your processor.I'm not a complete idiot... some parts are missing.