Hacker News new | ask | show | jobs
by adrian_b 63 days ago
The early computers that did not have index registers realized the equivalent of indexed addressing by modifying the address fields of the instructions before they were executed, e.g. during a loop.

In the early computers with non-pipelined execution and without cache memories, and also without security concerns, modifying the executable program during execution did not have disadvantages.

Nonetheless, pipelined execution became widely used and also cache memories appeared soon, and such performance-enhancing techniques could not work well with self-modifying programs, so index registers became absolutely necessary in fast CPUs.