Mail Archives: djgpp/2000/03/06/11:39:01
Damian Yerrick <DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comsend DOT spam> wrote:
> On Sat, 4 Mar 2000 18:26:19 +0500, Prashant TR <prashant_tr AT yahoo DOT com>
> 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.
- Raw text -