Self-modifying Code - Application in Low and High Level Languages

Application in Low and High Level Languages

Self-modification can be accomplished in a variety of ways depending upon the programming language and its support for pointers and/or access to dynamic compiler or interpreter 'engines':-

  • overlay of existing instructions (or parts of instructions such as opcode, register, flags or address) or
  • direct creation of whole instructions or sequences of instructions in memory
  • creating or modification of source code statements followed by a 'mini compile' or a dynamic interpretation (see eval statement)
  • creating an entire program dynamically and then executing it

Read more about this topic:  Self-modifying Code

Famous quotes containing the words application, high, level and/or languages:

    If you would be a favourite of your king, address yourself to his weaknesses. An application to his reason will seldom prove very successful.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    Nature never rhymes her children, nor makes two men alike. When we see a great man, we fancy a resemblance to some historical person, and predict the sequel of his character and fortune, a result which he is sure to disappoint. None will ever solve the problem of his character according to our prejudice, but only in his high unprecedented way.
    Ralph Waldo Emerson (1803–1882)

    The effort to understand the universe is one of the very few things that lifts human life a little above the level of farce, and gives it some of the grace of tragedy.
    Steven Weinberg (b. 1933)

    No doubt, to a man of sense, travel offers advantages. As many languages as he has, as many friends, as many arts and trades, so many times is he a man. A foreign country is a point of comparison, wherefrom to judge his own.
    Ralph Waldo Emerson (1803–1882)