Overlay (programming): Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Alter: template type, pages. Add: hdl. Formatted dashes. | Use this bot. Report bugs. | Suggested by AManWithNoPlan | Linked from User:AManWithNoPlan/sandbox4 | #UCB_webform_linked 415/1831
Reverting edit(s) by Kikisriwijaya07 (talk) to rev. 1265527531 by The Midnite Wolf: non-constructive (RW 16.1)
 
(4 intermediate revisions by 3 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 '''overlays''' or '''links''', generally laid out in a [[tree structure]].{{efn|In [[OS/360 and successors]], there may be multiple ''regions''{{efn|This has nothing to do with the term ''region'' in [[OS/360 and successors#MVT|MVT]] storage management.}} each containing a complete overlay tree.}} ''Sibling'' segments, those at the same depth level, share the same memory, called ''overlay region''{{efn|The nomenclature varies depending on the system, e.g., in [[OS/360]] ''region'' refers to an entire overlay tree.}} or ''destination region''. An overlay manager, either part of the [[operating system]] or part of the overlay program, loads the required overlay from [[Auxiliary memory|external memory]] into its destination region when it is needed; this may be automatic or via explicit code. Often [[Linker (computing)|linker]]s provide support for overlays.<ref name="GNULink_2008"/>
 
==Example==
Line 66 ⟶ 67:
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- facto standard extensions '''.OVL'''<ref name="Elliot_2012"/> or '''.OVR'''<ref name="Dohmen_1990"/> (but also used numerical file extensions like '''.000''', '''.001''', etc. for subsequent files<ref name="Gavin"/>). This file type was used among others by [[WordStar]]<ref name="Mabett_1985"/> (consisting of the main executable <code>WS.COM</code> and the overlay modules <code>WSMSGS.OVR</code>, <code>WSOVLY1.OVR</code>, <code>MAILMERGE.OVR</code> and <code>SPELSTAR.OVR</code>, where the "[[fat binary|fat]]" overlay files were even binary identical in their ports for [[CP/M-86]] and MS-DOS<ref name="Necasek_2018_WordStar"/>), [[dBase]],<ref name="Sidnam-Wright-Stevens_1990"/> and the ''[[Enable (office suite)|Enable]]'' DOS office automation software package from [[Enable Software (company)|Enable Software]]. [[Borland]]'s [[Turbo Pascal]]<ref name="Herschel-Dieterich_2000"/><ref name="Eßer_2009"/> and the [[GFA BASIC]] compiler were able to produce .OVL files.
 
== See also ==