Self-modifying code: Difference between revisions

Content deleted Content added
Notes: Fix link
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
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-modification although the actual instruction in storage is not altered.modific
 
==Application in low and high level languages==