[Info-vax] How much of VMS is still in MACRO-32?
Arne Vajhøj
arne at vajhoej.dk
Tue Jun 1 20:37:26 EDT 2021
On 6/1/2021 8:33 PM, Michael Moroney wrote:
> On 5/31/2021 9:07 AM, Simon Clubley wrote:
>
>> Is there any self-modifying code in VMS ? (I hope the answer to that
>> is no, BTW. :-))
>
> There's self-modifying code on the CDC 6x00 systems -- IN THE HARDWARE.
> You see, the procedure call instruction (RJ nnn) jumps to address nnn+1
> (60 bits) and writes a branch to the instruction after the RJ
> instruction at address nnn. To return from the procedure, branch to the
> entry point nnn and execute the (branch) instruction written by the RJ
> instruction.
>
> Obviously this prevents recursive code or anything like that.
>
> If I recall correctly, a register save/restore procedure (ab)used the RJ
> instruction to write a bunch of self-modifying code.
I remember that.
Pascal could do recursion.
Fortran could not.
Unless one wrote two small Compass routines to get and set the
saved address and managed that in a small array.
Arne
More information about the Info-vax
mailing list