delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/05/08/00:45:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: System()
Date: Mon, 7 May 2012 21:03:10 -0700 (PDT)
Organization: http://groups.google.com
Lines: 54
Message-ID: <9e4eebca-6004-4c60-990a-a02d0c251ec7@h19g2000yqj.googlegroups.com>
References: <92c86f75-e970-4998-94c6-56d6fbf885fe AT e15g2000vba DOT googlegroups DOT com>
<1c38ca22-52f5-470e-813f-1af6ed5f21d4 AT m16g2000yqc DOT googlegroups DOT com> <fea067ab-ee56-4b9e-bb73-ed3365fb9d59 AT ee2g2000vbb DOT googlegroups DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1336451509 19896 127.0.0.1 (8 May 2012 04:31:49 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Tue, 8 May 2012 04:31:49 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: h19g2000yqj.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16
(KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe)
Bytes: 3582
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q484j1SC008475
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019