[Info-vax] How much of VMS is still in MACRO-32?

Michael Moroney moroney at world.std.spaamtrap.com
Tue Jun 1 20:33:01 EDT 2021


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.



More information about the Info-vax mailing list