I am looking for a few lines long example demonstrating a self-modifying code in x86 assembler for educational purpose (does not need to do something meaningful but needs to clearly write his own code and then execute it when you read the code itself).
I did browse a bit the Web, but all the examples are either way too complex or just not really self-explanatory. I might have missed the right place to go, so feel free to suggest links or code.