www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/19/16:49:09

From: Tudor <tudor AT cam DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Size of EXE
Date: Sun, 19 Jan 1997 12:42:46 -0800
Organization: Communications Accesibles Montreal
Lines: 27
Message-ID: <32E28746.2941@cam.org>
References: <32dc427c DOT 81435113 AT news DOT mcgill DOT ca>
Reply-To: tudor AT cam DOT org
NNTP-Posting-Host: dynamicppp-139.hip.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

ya wrote:
> After writing and compiling a few simple programs with DJGPP, I've
> noticed that the EXE is rather large... 80k! I'm guessing that this is
> due the the compiler attaching all of the libraries and/or headers
> used. If so, shouldn't the compiler check to see what code the program
> actually needs, and only use that? This program is still quite small,
> but a similar program compiled in TP6.0 is just a few bytes. Why is
> this?
DJGPP is a 32 bit protected mode compiler.
So it attaches to the executable code for a dos extender&DPMI support
like CWSDPMI and it kiks your kode into protected mode.
This takes some kilos...
But for a "hello world" program you don't need DPMI or 32bit code or
protected mode or whatever advantage DJGPP has.so a "hello world"
program is best made via pascal or turbo C.
The advantages Of 32bit DPMI code will show up on *real* projects.
-- 
tudor 'at' cam 'dot' org
yoda69 'at' hotmail 'dot' com
http://www.cam.org/~tudor

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w---
O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++
h>++ r- y>+++++ 
------END GEEK CODE BLOCK------

- Raw text -


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