Content deleted Content added
Matthiaspaul (talk | contribs) CE, added ref |
Reverting edit(s) by Kikisriwijaya07 (talk) to rev. 1265527531 by The Midnite Wolf: non-constructive (RW 16.1) |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 1:
{{Short description|Programming method}}
{{Distinguish|Overload (programming)|Exec (system call)|Overlapping code|Shared code}}
{{Use dmy dates|date=July 2019|cs1-dates=y}}
Line 6 ⟶ 7:
==Usage==
Constructing an overlay program involves manually dividing a program into self-contained [[object code]] blocks called
==Example==
The following example shows the control statements that instruct the [[OS/360]] [[Linkage Editor]] to link an overlay program containing a single region, indented to show structure (segment names are arbitrary):
<pre>
INCLUDE SYSLIB(MOD1)
Line 59 ⟶ 60:
and the new link replaced all of the old link's storage except for the Fortran COMMON area.
IBM introduced more general overlay handling<ref name="IBM_1963_IBJOB"/> in [[IBSYS]]/[[IBJOB]], including a tree structure and automatic loading of links as part of CALL processing.
In OS/360, IBM extended the overlay facility of [[IBLDR]] by allowing an overlay program to have independent overlay regions, each with its own overlay tree. OS/360 also had a simpler overlay system for transient [[Supervisor call|SVC]] routines, using 1024-byte SVC transient areas.
<!-- Need information on other vendors here. -->
In the [[home computer]] era overlays were popular because the operating system and many of the computer systems it ran on lacked virtual memory and had very little RAM by current standards: the original [[IBM PC]] had between 16K and 64K, depending on configuration. Overlays were a popular technique in [[Commodore BASIC]] to load graphics screens.<ref name="Butterfield_1986"/>
"Several [[DOS]] linkers in the 1980s supported [overlays] in a form nearly identical to that used 25 years earlier on mainframe computers."<ref name="Levine_2000"/><ref name="Elliot_2012"/> [[Binary file]]s containing memory overlays had de
== See also ==
Line 81 ⟶ 82:
==References==
{{reflist|refs=
<ref name="OED_2015">{{cite web |title=Oxford Dictionaries |date=2015-11-26 |url=https://www.oxforddictionaries.com/definition/american_english/overlay |access-date=2022-07-10 |url-status=
<ref name="Butterfield_1986">{{cite book |title=Loading And Linking Commodore Programs |chapter=Part 4: Overlaying |issue=73 |date=June 1986 |page=74 |magazine=[[Compute!]] |editor-first=James "Jim" |editor-last=Butterfield |editor-link=Jim Butterfield |url=http://www.atarimagazines.com/compute/issue73/loading_and_linking.php |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220710211439/https://www.atarimagazines.com/compute/issue73/loading_and_linking.php |archive-date=2022-07-10 |quote=This lets you run programs which are, in effect, much larger than the amount of memory in your computer.}}</ref>
<ref name="GNULink_2008">{{cite web |title=The GNU Linker documentation: Overlay Description |date=2008-06-03 |url=http://sourceware.org/binutils/docs/ld/Overlay-Description.html |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220623060507/https://sourceware.org/binutils/docs/ld/Overlay-Description.html |archive-date=2022-06-23}} [https://web.archive.org/web/20080319060220/http://www.gnu.org:80/software/binutils/manual/ld-2.9.1/html_node/ld_22.html]</ref>
<ref name="Levine_2000">{{cite book |title=Linkers & Loaders |author-last=Levine |author-first=John R. |author-link=John R. Levine |date=2000 |publisher=[[Morgan Kaufmann Publishers]] |isbn=1-55860-496-0 |page=177 |url=http://linker.iecc.com/ |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220406090302/https://linker.iecc.com/ |archive-date=2022-04-06}} [http://www.iecc.com/linker/<!-- https://web.archive.org/web/20220705125042/https://www.iecc.com/linker/ -->]</ref>
<ref name="NRC_1993">{{cite
<ref name="IBM_1963_FORTRAN">{{cite manual |title=IBM 7090/7094 Programming Systems – FORTRAN II Programming |id=Form C28-6054-4 File No. 7090-25 |date=August 1963 |work=Systems Reference Library |publisher=[[IBM Corporation]] |publication-place=Poughkeepsie, New York, USA |pages=34–35 |section=Chapter 12: The Chain Job |section-url=http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf#page=34 |url=http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220315144942/http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf |archive-date=2022-03-15}} (52 pages)</ref>
<ref name="IBM_1963_IBJOB">{{cite manual |title=IBM 7090/7094 Programming Systems – IBJOB Processor – Overlay feature of IBLDR |id=Form C28-6331 File No. 7090-27 |edition=1 |date=May 1963 |work=Systems Reference Library |publisher=[[IBM Corporation]] |publication-place=Poughkeepsie, New York, USA |url=http://bitsavers.org/pdf/ibm/7090/C28-6331_IBLDR_overlay_1963.pdf |access-date=2021-12-26 |url-status=live |archive-url=https://web.archive.org/web/20220315161341/http://bitsavers.org/pdf/ibm/7090/C28-6331_IBLDR_overlay_1963.pdf |archive-date=2022-03-15}} (8 pages)</ref>
Line 93 ⟶ 94:
<ref name="Eßer_2009">{{cite book |title=Betriebssysteme I |chapter=Chapter 6. Speicherverwaltung und Dateisysteme - Teil 5: Nicht-zusammenhängende Speicherzuordnung |language=de |author-first=Hans-Georg |author-last=Eßer |date=June 2009 |publisher=Hochschule München |___location=Munich, Germany |url=http://hm.hgesser.de/bs-ss2009/folien/bs-ss2009-esser-06e-4up.pdf |access-date=2014-02-13 |url-status=live |archive-url=https://web.archive.org/web/20220508155626/http://hm.hgesser.de/bs-ss2009/folien/bs-ss2009-esser-06e-4up.pdf |archive-date=2022-05-08}} (9 pages)</ref>
<ref name="Elliot_2012">{{cite web |author-first=John C. |author-last=Elliott |title=PRL file format |date=2012-06-05 |orig-date=2000-01-02 |website=seasip.info |url=https://www.seasip.info/Cpm/prl.html |access-date=2020-01-26 |url-status=live |archive-url=https://web.archive.org/web/20200126182027/https://www.seasip.info/Cpm/prl.html |archive-date=2020-01-26 |quote=[…] A PRL file is a [[relocation (computing)|relocatable]] binary file, used by [[MP/M]] and [[CP/M Plus]] for various modules other than [[.COM file]]s. The file format is also used for FID files on the [[Amstrad PCW]]. There are several file formats which use versions of PRL: SPR (System PRL), RSP (Resident System Process). LINK-80 can also produce OVL (overlay) files, which have a PRL header but are not relocatable. [[Graphics System Extension|GSX]] drivers are in PRL format; so are [[Resident System Extension]]s (.RSX). […]}} [https://www.seasip.info/Cpm/amsfid.html#PRL%20file%20format]</ref>
<ref name="Dohmen_1990">{{cite magazine |title=Platz schaffen durch Überlagern - Overlay-Strukturen in Turbo Pascal |language=de |author-first=Norbert |author-last=Dohmen |magazine=[[mc (magazine)|mc]] |issn= |publisher= |issue=12 |volume=90 |date=1990 |pages=
<ref name="Gavin">{{cite book |chapter=Create Program Overlays |title=Turbo Pascal - Norton Guide |version=v3 |author-first=Bruce |author-last=Gavin |editor-first=Dave |editor-last=Pearson |page=149 |url=http://www.x-hacker.org/ng/pascal/ng19519.html |access-date=2022-08-04 |url-status=live |archive-url=https://web.archive.org/web/20220804163703/http://www.x-hacker.org/ng/pascal/ng19519.html |archive-date=2022-08-04}}</ref>
<ref name="Necasek_2018_WordStar">{{cite web |title=WordStar Again |date=2018-01-30 |orig-date=2018-01-28, 2018-01-26 |author-first=Michal |author-last=Necasek |work=OS/2 Museum |url=http://www.os2museum.com/wp/wordstar-again/comment-page-1/ |access-date=2019-07-28 |url-status=live |archive-url=https://web.archive.org/web/20190728011415/http://www.os2museum.com/wp/wordstar-again/comment-page-1/ |archive-date=2019-07-28 |quote=[…] The reason to suspect such difference is that version 3.2x also supported [[CP/M-86]] (the overlays are identical between [[DOS]] and CP/M-86, only the main executable is different) […] the .OVR files are 100% identical between DOS and CP/M-86, with a flag (clearly shown in the [[WordStar 3.20]] manual) switching between them at [[runtime (program lifecycle phase)|runtime]] […] the OS interface in WordStar is quite narrow and well abstracted […] the WordStar 3.2x overlays are 100% identical between the DOS and CP/M-86 versions. There is a runtime switch which chooses between calling INT 21h (DOS) and INT E0h (CP/M-86). WS.COM is not the same between DOS and CP/M-86, although it's probably not very different either. […]}}</ref>
|