Guys,

   I'm building a driver (for DOS) that's supposed to have several functions 
hooked at an interrupt. When applications call these functions, the driver 
should load and unload some tables or activate/deactivate them somehow. Because 
these tables are big, I don't want to keep them in conventional memory with the 
driver code altogether, but instead prefer them to by dynamic.
   The problem is as follows. If I want to have the tables in files, then 
loading them in and unloading them from conventional memory will cause several 
problems, which include slowdowns, risk of instability because of hard-drive 
access and a big amount of conventional memory still occupied while the tables 
are in use. I want, therefore, have the tables permanently loaded in high, 
extended or expanded memory while the driver is running. But.... this 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.
   I am really not very experienced with high memory, but I understand that, 
even without HIMEM or EMM386, I can access high memory by setting up real-flat 
mode. Also, if HIMEM only is there, this mode is already available and I can 
easily access the tables without having to move memory (that is, using 32bit 
pointers in real mode instead of calling HIMEM functions to copy data). If 
EMM386 is loaded, I know I can use the expanded memory functions, but then 
virtual-86 mode is set and I can no loger use 32bit real-mode pointers!  Yet, 
there has to be a way, because HIMEM works even though EMM386 is loaded. This 
clearly shows me that there is a big deal of things I don't know about these 
two drivers!
   I need help understanding how these two drivers work, as well as what 
happens in real-flat and virtual-86 modes. I also need to know how I can make 
my interrupt functions flexible enough so that they can work no matter which 
HIMEM/EMM386 is currently working and, if possible, I would like my functions 
to also be compatible with protected mode (DPMI) applications calling them, 
because the functions have to access memory and return pointers and therefore, 
might not work by using real-mode-interrupt calling functions of the DPMI.
   Can anybody help me with all this, please?  :)

                Lucas



      
------------------------------------------------------------------------------
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
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to