Self modifying code, lambda calculus - Re: ENIAC programming

Paul Koning paulkoning at
Thu Sep 17 20:13:46 CDT 2015

> On Sep 17, 2015, at 5:42 PM, dwight <dkelvey at> wrote:
> I am quite aware of the caching problem.
> What I don't understand is what problem they thought they
> were fixing by outlawing self modifying code.

Self modifying code in sense #4 from my earlier note (i.e., a program that scribbles on bits of itself) is a perfectly fine programming technique if you have an ISA that leaves you no choice, and a good choice in some other specialized cases.  Boot time customization of critical kernel paths is an example.

The issue is that such code is hard to maintain because the source does not directly reflect what is executed.  So even by the standards of assembly language programming, self-modifying code adds a level of pain.  If it's poorly documented, you're in real trouble.

For a nice example, read "Mel, the story of a Real Programmer".  :-)


More information about the cctalk mailing list