It would be nice if the OP could tell us what application he is developing. He now only tells us he wants to put some code somewhere. Please tell us "I want to reach city A which is 200 miles from here" instead of "can someone tell me how to drive a car"
I never was a good cracker
... my last attempts were with DOS programs where I rerouted the code so it would circumvent the check for key floppy disks or dongles. I can also tell you that some programs copied a piece of data into memory (which actually were instructions) and jumped to it to to execute dongle checks. In that way you were not able to find the instruction in the data file, and if you found them in the running code, it was no use to change them there. Unless you understood the trick and changed the original data.
But...
This sounds not too difficult. All you have to to is write relocatable code. That is, use no absolute addresses. In 6800 we had branches which were relative instead of jumps which were absolute. In 68000 you could jump relative to a data or address register. I think the i386 assembler can jump relative to BP or so (I never liked the x86 assembly!) So as long as you code makes just relative jumps, and you address memory relative to SP, what can be the problem?
Except of course you have to find the address where you want to copy your code to so it can be excuted. But that could be done with a pointer to a function which contains the NOPs to be replaced.
jlinkels