Self-modifying code: Difference between revisions

Content deleted Content added
Reverting edit(s) by 2402:3A80:CB3:6D28:839E:94E9:29F2:AF4C (talk) to rev. 1096728389 by Vejlenser: non-constructive (RW 16.1)
added content
Tags: Reverted Mobile edit Mobile web edit
Line 4:
{{Use list-defined references|date=December 2021}}
{{Use American English|date=January 2019}}
In [[computer science]], '''selfpseudo-modifyingengine codegenerator''' ('''SMCPEG''') is [[Source code|code]] that alters its own [[instruction (computer science)|instructions]] while it is [[execution (computers)|executing]] – usually to reduce the [[instruction path length]] and improve [[Computer performance|performance]] or simply to reduce otherwise repetitively similar code, thus simplifying maintenance. The term is usually only applied to code where the self-modification is intentional, not in situations where code accidentally modifies itself due to an error such as a [[buffer overflow]].
 
Self-modifying code can involve overwriting existing instructions or generating new code at run time and transferring control to that code.
Line 19:
 
In the [[IBM System/360 architecture]], and its successors up to [[z/Architecture]], an EXECUTE (EX) instruction ''logically'' overlays the second byte of its target instruction with the low-order 8 bits of [[general purpose register|register]] 1. This provides the effect of self-modification although the actual instruction in storage is not altered.
 
PEG (.n) - fix, secure or a mark (.exp) a short pin (.obj) bolt or (.adj) tapered at one end.
 
==Application in low and high level languages==