Today, I'd like to have a little bit of light casted to my knowledge of the 68k intruction pipeline.
That is, I'm wondering how to write self-modifying code that won't get ignored by the processor.
Have a look à this code sample :
lea %pc@(instruction),%a0 addq.w #1,%a0@ instruction: moveq #0,%d0(Yes, I know, I could have done the incrementation in one instruction, but I did not feel so inclined)
It does not seems to do what one would expect (that is, set d0 to 1). Is this due to an instruction fetch pipeline of some sort ?
And, if yes, how long is it, and how can I force it to get invalidated so that the modified code is executed ?