Self-modifying code: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
Reverting edit(s) by 2402:3A80:CB3:6D28:839E:94E9:29F2:AF4C (talk) to rev. 1096728389 by Vejlenser: non-constructive (RW 16.1)
Line 18:
In either case, the modifications may be performed directly to the [[machine code]] instructions themselves, by [[overlapping instructions|overlaying]] new instructions over the existing ones (for example: altering a compare and branch to an [[unconditional branch]] or alternatively a '[[NOP (code)|NOP]]').
 
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-modificmodification although the actual instruction in storage is not altered.
 
==Application in low and high level languages==