VOGONS


First post, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Hi all,

On a 286 or newer machine, the HMA provides just under 64kB of memory accessible from real mode, starting at 1MB. Although any program can make use of this for storage, only one is allowed at a time and usually it is DOS.

However apparently DOS doesn't use the whole HMA - I've read some articles suggesting that it only uses 45kB, which would leave close to 20kB spare. Since my 286 uses a HT12 chipset and this chipset does not seem to provide UMBs in hardware (all shadow RAM is write-protected), being able to allocate this extra memory as a UMB that I could load drivers into could be quite useful.

Has anyone tried to do this? Is it even possible?

Reply 1 of 3, by alexanrs

User metadata
Rank l33t
Rank
l33t

Doubtful. Without 386's memory remapping features I don't see a way to make that happen. HMA is trickier to access because you have to toggle the gate A20 to turn off the address wrapping in real mode, but DOS can't intercept those calls to make this transparently to the program. That being said, a TSR can be coded to use the remaining free HMA, I know UIDE/XHDD can do that. The other thing you can do is to tweak all DOS parameters (LASTDRIVE, BUFFERS, etc.) to make sure everything fits in HMA.

Reply 2 of 3, by idspispopd

User metadata
Rank Oldbie
Rank
Oldbie

I think the biggest problem is that you can only access the HMA with a segment value of FFFF. If you have a UMB in D000-DFFF, the following addresses refer to the same physical address: D000:FFFF,DF00:0FFF,DFF0:000F (and several others). The HMA starts at FFFF:0000, and while there are aliases for the lower addresses, FFFF:FFFF can't be represented any other way.
The German Wikipedia entry on the HMA contains some more details, especially why it's hard to load TSRs/drivers into the HMA. It seems that DR-DOS (depending on the version) is able some of its TSRs/drivers into the HMA. I don't know if that would be an option here. (The Google translated version of the German article is quite readable.)

Reply 3 of 3, by Jolaes76

User metadata
Rank Oldbie
Rank
Oldbie

The Last Byte Memory Manager should work and reclaim at least 64 kb UMBs. Then you can load at least some of your TSRs up.
As pointed out above, expect no good from messing with the HMA. It is best left for DOS.

"Ita in vita ut in lusu alae pessima iactura arte corrigenda est."