From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Creating Libraries Date: 6 Mar 2000 15:27:18 GMT Organization: Aachen University of Technology (RWTH) Lines: 45 Distribution: world Message-ID: <8a0iom$dio$1@nets3.rz.RWTH-Aachen.DE> References: <89m8i7$2eb$1 AT news DOT maltanet DOT net> <200003041326 DOT SAA00765 AT midpec DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 952356438 13912 137.226.32.75 (6 Mar 2000 15:27:18 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 6 Mar 2000 15:27:18 GMT User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586)) Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick wrote: > On Sat, 4 Mar 2000 18:26:19 +0500, Prashant TR > wrote: >>> I am new to DJGPP. In pascal wwe used to create overlays so one large >>> program was split into smaller ones. How can I do the same in DJGPP. >> >>There's no need to create overlay files in DJGPP. In Turbo Pascal, [...] > But isn't DLX an overlaying package for when third parties need to > supply overlays? Not really. Overlaying is not equivalent to dynamically loaded object files. There's quite a bit more to it, mainly background machinery, and the ability to call any function of an overlayed program, from every other one, regardless of wether they were in an overlay or not (no direct calls from one overlay to the other, though, IIRC). DLX or DLM, after quite some extension, would be usable as a basis to implement overlaying on top of, but that's about it. The full story: --------------- The idea behind an overlayed program, back in the days of Borland's 16bit compilers (both Pascal and C), was that you just told the compiler and linker by setting a flag you wished to create the executable as an overlayed one. I.e. no(!) source code modification at all. It would then find suitably large, yet independent sections of the executable, isolate functions needed by all or many of them, and automatically split up the whole program into a central part, and a series of overlays. The real advantage over dynamically loaded objects was that you did *not* have to bother about the organization of when to load another overlay, in the program. The runtime library did that, automatically, behind the scenes. If not for the existence of overlays, ports of Unix programs like 'gnuplot' (500K of executable size) to PCs might have been outright impossible, or at least a whole lot harder to do than they were, using them. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.