pointers to freshly minted functions.
Dave Lukes
dave at inset.UUCP
Tue Mar 18 07:06:11 AEST 1986
In article <2277 at phri.UUCP> roy at phri.UUCP (Roy Smith) writes:
>In article <204 at dg_rtp.UUCP> throopw at dg_rtp.UUCP writes:
>[In an ongoing discussion about self-modifying code]
>> Consider a C
>> function which creates an instruction stream, and returns a pointer to a
>> function which when invoked will execute this instruction stream. [...]
>> It must *always* be possible to implement this function, otherwise
>> compilers would not be possible, since compilers are simply programs that
>> treat code as data ...
WHAAAATTT???
Uh-uh: you mean LOAD-AND-GO compilers aren't possible:
most compilers generate a file of code which is read into the I space by the OS.
^^^^
> The Buroughs B5700 had (in addition to the strangest subroutine
>linkage I've ever seen) a tagged architecture. Each memory word had a
>(3-bit?) tag which defined the value stored there as integer, real,
>pointer, instruction, etc. This tag was not directly accessible by a
^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^
>programmer which made it kind of hard to implement a compiler. Presumably
^^^^^^^^^^
Wrong: there is/was (at least on the B6700) a ``set tag'' instruction
(I don't rememeber what it was called) which overwrote the tags in the
operand.
Anyways: there are plenty other reasons why implementing a compiler on
those beasts is strange: the major one being the total lack of protection.
>(I never actually used a B5700) there was some magic way the OS used to
>convert data into code, but I never ran accross any reference to it.
Again (see above), the code was generated in a file usually, then run by the OS.
> One of the other oddities about the 5700 was a lack of conventional
>assembler -- you did systems programming in an Algol derivitive.
Sure, it was an Algol derivative (ESPOL: Executive Systems PrOgraming
Language it was called), but totally machine oriented.
BTW: tou HAD to program in a high level language: assembler was forbidden
due to the lack of protection (which was all provided by the compilers ...)
>--
>Roy Smith, {allegra,philabs}!phri!roy
>System Administrator, Public Health Research Institute
>455 First Avenue, New York, NY 10016
P.S. BTW: Burroughs called their OS MCP (Master Contol Program) long before
Disney did TRON. Does anyone know if Burroughs sued?
--
Dave Lukes. (...!inset!dave)
All opinions, philosophies, dogmas and idiosyncrasies expressed in this article
INCLUDING THIS DISCLAIMER, are solely those of the author.
More information about the Comp.lang.c
mailing list