An intriguing question about DOS memory

Getting old DOS games working on modern hardware. (DOSBox topics belong in DOSBox areas below, not here).

An intriguing question about DOS memory

Postby aries-mu » 2018-8-01 @ 16:53

Hi guys,

I recently realized something very weird happened about 26 years ago with a PC.

Being it a 286, I could not use EMM386, but I could and did use HIMEM.SYS (MS-DOS 5.0).

Now, we all know that the HMA consists in the first 64 KB of RAM above the first 1024 KB of memory. Which means it is the space located between 1024 KB and 1088 KB, that is between 1 MB and 1.0625 MB.

At the boot, somewhere (I can't recall if it was some bios screen or DOS/Himem screen) the computer mentioned the high memory (which is the HMA).
Mainly, when I added the string DOS=HIGH to the Config.sys, it worked! Most of the DOS kernel was loaded in the HMA rather than the conventional memory, which was freed a little bit!

Now, the question is:
My 286 only had 1 MB RAM! Where/how could it "use" the 1024 to 1088 KB segment if it's above 1024???

Any clue?

Thanks!
They said therefore to him: Who are you?
Jesus said to them: The beginning, who also speak unto you
aries-mu
Member
 
Posts: 421
Joined: 2016-7-11 @ 00:23

Re: An intriguing question about DOS memory

Postby VileRancour » 2018-8-01 @ 18:07

That 1 megabyte isn't mapped to the CPU's addressing space in a linear fashion, but I guess the exact mapping depends on the chipset. As far as the addressing space goes, the area between the 640K and 1024K boundaries is for hardware devices and ROM, never RAM (unless shadowing is enabled); so typically the "excess" 384K of RAM is mapped above the 1024K boundary.
web  /   blog   /   tube
User avatar
VileRancour
Oldbie
 
Posts: 1723
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: An intriguing question about DOS memory

Postby aries-mu » 2018-8-01 @ 23:32

VileRancour wrote:That 1 megabyte isn't mapped to the CPU's addressing space in a linear fashion, but I guess the exact mapping depends on the chipset. As far as the addressing space goes, the area between the 640K and 1024K boundaries is for hardware devices and ROM, never RAM (unless shadowing is enabled); so typically the "excess" 384K of RAM is mapped above the 1024K boundary.


Thanks so much for your explanation!
They said therefore to him: Who are you?
Jesus said to them: The beginning, who also speak unto you
aries-mu
Member
 
Posts: 421
Joined: 2016-7-11 @ 00:23

Re: An intriguing question about DOS memory

Postby Matth79 » 2018-8-04 @ 01:09

With 1MB, there is usually a BIOS choice as to how to use the extra 384k
1. shadowing the ROM (usually forced if more than 1MB is fitted)
2. Extended memory (for HIMEM / HMA)
3. If supported, chipset based EMS (driver required)

I remember a 286 with 1MB that had been brought in to demo, in the Win 3.1 days, so I had the job of setting up 3.1 to test.
"it'll only be real mode", to which I answered "no, Standard mode", and accessed the BIOS to flip the extra from shadow to extended - the guy didn't know it could do that
Matth79
Oldbie
 
Posts: 503
Joined: 2014-5-19 @ 14:24


Return to DOS

Who is online

Users browsing this forum: MSN [Bot] and 1 guest