Mail Archives: djgpp/2012/05/05/23:30:13

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: System()
Date: Sat, 5 May 2012 20:10:52 -0700 (PDT)
Lines: 36
Message-ID: <>
References: <92c86f75-e970-4998-94c6-56d6fbf885fe AT e15g2000vba DOT googlegroups DOT com>
Mime-Version: 1.0
X-Trace: 1336273852 10876 (6 May 2012 03:10:52 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sun, 6 May 2012 03:10:52 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info:; posting-host=; 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: 2730
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by id q463U2cD002494
Reply-To: djgpp AT delorie DOT com


On May 5, 9:52am, 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.

There may have been a really old port of it, but I never found or used
it. Though you can instead try Ytree (has DJGPP support), but IIRC
even it doesn't fully work (reading archives fails due to fork()

> When I select an executable file on the screen I would like to execute
> that. However, e.g. system("") will take quite a chunk of
> the available memory in real mode.

I believe you can just do system(""); and it will work. (Not sure if
you're shelling out yet another shell unnecessarily or not.) Assuming
you're using an XMS_Swap variant of FreeCOM and EMM386 and LH CWSDPMI,
it shouldn't be too much used. But you could also try using "HDPMI32 -
r" instead. I don't know which is leaner, and perhaps CWSDPMI uses
more low RAM due to page tables. BTW, you could also used "stubedit"
to shrink your transfer buffer to save a few kb.

> What could be done to execute the selected program with as much memory
> as possible? And return to the commander when this program terminates?

Dunno. I think most shells and file managers have a very very
tiny .ASM stub file that runs the main program, exits that when
something external is run, and somehow jumps back to the tiny .ASM
starter. See Doszip sources (not DJGPP-based, though) if you're

- Raw text -

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