www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/27/13:12:47

Message-Id: <m0y8Ob3-000S2cC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: "Chris Bilson" <chrisb AT ms12 DOT hinet DOT net>, djgpp AT delorie DOT com
Date: Fri, 27 Feb 1998 15:18:55 +0000
MIME-Version: 1.0
Subject: Re: DLL in djgpp???
In-reply-to: <6cvneo$74q@netnews.hinet.net>

"Chris Bilson" <chrisb AT ms12 DOT hinet DOT net> wrote:

> I think the question here should be do we need to use DLLs in DOS. I think
> that the main reason DLLs were designed was that in Windows (or any other
> multitasking OS, really) you might have many different apps using the same
> functions and code. Instead of static linking everything, and having
> multiple copies of the same code in memory at any one time, we can put this
> stuff in DLLs and share it.

DJGPP can be benefited from DLLs. Think about it:

1) Disk space, the BIN directory can be reduced if libc is a DLL.
2) When you compile from RHIDE it calls gcc that calls cc1plus. The three 
programs have A LOT of libc functions.

But the problem is that real shared libraries (like .so files in Linux) are 
very hard to implement in DOS.
 
> In my experience the only kinds of fucntions (besides the kinds listed
> above) that I would really want to put into a DLL would be stuff that I
> might or might not use. Fo example, if I wrote two versions of a function,
> one for 486/Pentium CPUs, and one for MMX CPUs, and dertemine at run time
> which type of CPU I am running on, I don't bother to load the other
> function.
> 
> However, thes types of functions are usually fairly small (usually
> assembly), and the memory that is used by my code is usually not a major
> concern for my programs.

No 100% true, take a look to Allegro 3.0 and the Graphic drivers. And another 
advantage of DLLs is that you can send to a user a DLL for a new board instead 
of the whole EXE.
 
> Actually all Windows does is load the code into a code segment and give you
> the address. That shouldn't be that hard to implement by yourself, really.

Sure? and then this code can't call any other function outside the DLL or 
access to any variable. DLM aproach is more flexible (and more complex).

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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