Thanks for the reply! Well basically I got the SMC code working, only problem is that the .text section of the executable file is default read/execute only. Using the linker with Visual C++ I can set the parameter /section:.text RWE but I can't find the equivalent for gcc. Right now I got to use a PE editor to manually set the Write flag which is a tad troublesome. --- "Meissner, Michael" <michael.meissner@xxxxxxx> wrote: > It depends on the operating system you are using as > well as the linker. > If you are using the GNU linker, you can do what you > want by using > linker scripts, but these are very arcane..... > > I have worked on platforms where it was impossible > to write self > modifying code in any fashion, and on many other > systems where you had > to go through various hoops to make sure all of the > caches are flushed > properly (the trampoline code within the compiler > generates self > modifying code). > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com