Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Self Modifying Code

Name: Anonymous 2008-01-18 5:43

A technique so advanced and powerful that only the very best of the best EXPERT PROGRAMMERS can understand and only partially exploit its power. It is so powerful, infinitely more so than goto, that Dijkstra would turn over in his grave at the very mention of it. To use an old analogy, self-modifying code not only makes it easy for you to shoot yourself in the foot, but also end the universe along with it. It is in the realm of the programming gods, for with it one may even be able to write programs that achieve sentience.

Discuss.

Name: Anonymous 2008-01-18 13:38

Self-modifying code was commonplace with the 6502. It was generally cheaper to store a memory address in the immediate indexed mode instruction (e.g. lda $ffd4,x) that used it rather than on the zero page and using zero page indirect with index addressing (e.g. lda ($cc),x). Saved at least one cycle, there... though if you wanted to use the same address with multiple instructions going through the zero page was generally more winlike.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List