Pure code

From Computer History Wiki
Revision as of 14:46, 12 June 2021 by Jnc (talk | contribs) (This term is apparently no longer used, but...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Pure code is a object code which is not self-modifying. While the latter was very common in the earliest days, it is now effectively extinct, for a variety of reasons (including not interacting well with a number of CPU optimizations), so essentially all object code is now pure code.

The original motivation for pure code was to allow a number of processes in a time-sharing system which were running the same program to share a single copy of that object code in main memory. This also required the instructions to be segregated (in the address space) from the data, since the latter would presumably differ among the instances of the program.

Later on, when use of ROM for program storage became common (e.g. in embedded systems), it was obviously necessary for the code in the ROM to be pure code.