Self modifying code, lambda calculus - Re: ENIAC programming
Johnny Billquist
bqt at update.uu.se
Mon Sep 21 04:24:41 CDT 2015
On 2015-09-20 19:46, Chuck Guzis wrote:
> On 09/20/2015 09:00 AM, Peter Coghlan wrote:
>
>> CHAIN <filename> is roughly equivelant to LOAD <filename> followed by
>> RUN. Unlike LOAD, CHAIN can be issued from a program so it can be
>> used for a kind of overlay where one program is run and then replaced
>> by another program when it completes. However, like LOAD (and RUN),
>> CHAIN also clears most variables so the amount of initialisation that
>> can be done in the first program is quite limited.
>
> Some BASICs implement a type of COMMON (to borrow from FORTRAN) which
> contains variables for communication between CHAINed program units. In
> that respect, CHAINed programs behave much more like overlays, albeit
> all as level (0,0). I'm not certain that any BASICs implement the
> FORTRAN-style overlay hierarchy.
CHAIN is in no way similar to overlays. COMMONs, if available, is a nice
way to preserve some data between different programs running.
CHAIN is (like someone said), about the same as a LOAD followed by a RUN.
So, how is this different than overlays? Well, with overlays, you only
replace parts of your code. Some other parts stay around, as well as all
volatile data. So, you can still call code that is in the resident part
of memory, and which is not replaced by a different overlay.
And yes, there are BASICs that can work with overlays. See DECs BASIC+2.
Has both commons, overlays and CHAIN. And if run under RSTS/E if also
have a core common block, which can be used to pass data between
programs when CHAINing.
I wonder what FORTRAN-style overlay hierarchy means. I know of overlays,
and on DEC OSes, it is a common technique, provided by the linker, and
is not tied to a specific language. So, you can use it with FORTRAN, but
there is nothing FORTRAN-specific about it.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the cctalk
mailing list