> I'm building a driver (for DOS)

:-) For what hardware ??

> means that the driver will have to do different things to get to the tables 
> depending
> on whether HIMEM, or EMM386, or both, or none of them are currently there.

NO. Just use XMS, it is still available even if EMM386 is additionally
present. Make a decision whether you want to support XMS 2 hosts also
or require XMS 3.0.
If no XMS host is present, 3 options:
- Refuse to run
- Hog the memory from BIOS (see FASM source) and use "raw" PM
- Use low memory only it it fits

> Also, if HIMEM only is there, this mode is already available and I can easily 
> access

NO. It "can" happen but you can't rely on it.

> If EMM386 is loaded, I know I can use the expanded memory functions

YES (also after NOEMS ???), but you still can and should use XMS.

> but then virtual-86 mode is set and I can no loger use 32bit real-mode 
> pointers!

IF you need PM from V86 there is VCPI.

> Yet, there has to be a way, because HIMEM works even though EMM386 is loaded.

As said, it uses INT $15 / AH=$87 then. That's also what you can use
to access
PCI memory mapped I/O (>= 2 GiB) from real mode code, even if EMM386 is there.

BTW, RBIL is wrong here, it says "linear address" but the call in fact eats
physical addresses, at least those above 1+1/16 MiB AKA $0011'0000.




-- 
~~~ wow ~~~

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to