delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/17/13:00:18

From: "M. Adam Davis" <adavis AT group10 DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: 16-bit small dos apps w/o dpmi?
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <3y_C6.7$Gz.1200@nntp0.chicago.il.ameritech.net>
Date: Tue, 17 Apr 2001 12:50:27 -0400
NNTP-Posting-Host: 206.141.213.4
X-Trace: nntp0.chicago.il.ameritech.net 987526399 206.141.213.4 (Tue, 17 Apr 2001 11:53:19 CDT)
NNTP-Posting-Date: Tue, 17 Apr 2001 11:53:19 CDT
Organization: Ameritech.Net www.ameritech.net Complaints: abuse AT ameritech DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I've built a very simple C++ program (reformats a text file into comma
delimited data) which is targetted for DOS 6.22 systems.  While cwsdpmi.exe
is only 20k, I'd prefer not to have to distribute it with my program.
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.

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).

Secondly, even hello world creates an exe which is nearly 200K in size after
removing debugging information.  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?  Are there size optimizations in GCC
that I'm unaware of?

I appreciate the help!

-Adam

(I have Borland C++ 3.0, but it doesn't have the string object, and I don't
want to change and debug it now that it works well as it is...)



- Raw text -


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