Mail Archives: djgpp/2012/05/08/00:45:11
Hi,
On May 6, 3:54 pm, Georg <dos DOT DOT DOT AT googlemail DOT com> wrote:
>> I wonder if it would be possible to write something like
>> Norton/Volkov/Midnight commander in djgpp.
>
> #include <stdio.h>
> main(int argc,char **argv)
> { system("mem.exe /d >memn.tmp"); }
>
> When I run this on Windows XP it tells me that 572 kb are available
> for a program.
WinXP is more efficient, that's all (though it has other bugs).
> When I run this program in real mode with DOS 7.0 it tells me that 366
> kb are available for a program.
Correct, similar to what I saw on this machine.
> Maybe one can load high CWSDPMI. But why are there 162k for
> testsys.exe's data while it is just 1936 bytes in Windows XP?
Like CWS says, the page tables via CWSDPMI are in low (conventional)
RAM and hard to move out without breaking something.
Long story short, you have several problems here, even beyond what
you've noticed:
1). CWSDPMI eats a lot of low RAM
2). Various DOS extenders (and DPMI hosts) don't always play well
together (or detect all memory situations or machines correctly)
3). (I think??) you cannot (easily) mix 16-bit and 32-bit DPMI apps in
a subprocess without (rare) DPMI 1.0
So, long story short, CWSDPMI r7 is pretty darn stable and actually
better (more bug-free and efficient) than "most" extenders and DPMI
hosts. It has a few minor nits, but overall it works fine.
There is nothing wrong with writing a shell / file manager with DJGPP,
esp. if you only intend to run DJGPP apps. But it gets hairy when you
start mixing OpenWatcom .EXEs or BP7 or whatever because of
incompatibilities. Try running Doom (DOS/4GW) under CWSDPMI, it won't
work. Similarly for WDOSX or some other extenders. CWSDPMI is a 32-bit
"pure" DPMI host only, no non-standardized extensions that some
(most?) OpenWatcom apps require.
The best overall "solution" seems to be to load something like HDPMI32
("-r") resident first before you start your host shell. It seems
pretty widely compatible and is more efficient (leaner conv. mem.
footprint) than any of the others I tried, getting over 530 kb free.
It might actually be "safer" to write a shell or file manager in real
mode only code, but I guess that depends on what you want to do.
- Raw text -