Date: Tue, 17 Apr 2001 23:15:40 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "M. Adam Davis" Message-Id: <9743-Tue17Apr2001231540+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: <3y_C6.7$Gz.1200@nntp0.chicago.il.ameritech.net> (adavis AT group10 DOT net) Subject: Re: 16-bit small dos apps w/o dpmi? References: <3y_C6.7$Gz DOT 1200 AT nntp0 DOT chicago DOT il DOT ameritech DOT net> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "M. Adam Davis" > Newsgroups: comp.os.msdos.djgpp > NNTP-Posting-Date: Tue, 17 Apr 2001 11:53:19 CDT > > Ideally I could make a plain vanilla 16-bit dos application that would run > on any dos system down to a 386 without any memory managers whatsoever. You could rewrite your program in assembly and build it with djasm, which can create 16-bit real-mode programs. > At minimum how do I go about eliminating the need for the seperate dpmi > (either by changing the compile options, or embedding the dpmi into my exe). This is possible with CWSDPMI, see the docs which comes with csdpmi5b.zip. > Secondly, even hello world creates an exe which is nearly 200K in size after > removing debugging information. Perhaps a C++ program; a minimal C program should be about 31KB, see section 8.14 of the DJGPP FAQ for details. > While I realize that the compiler won't > create the 20 byte com program one could make to do the same thing, I wonder > what is making my program so large? The FAQ explains that. > Are there size optimizations in GCC that I'm unaware of? Yes.