I made a little test today in order to understand how to implement some ASM code inside a C++ program. It works as expected. However I notice that at end I have as a final output code : 1 instead of 0. There is something wrong here. I missed something so as to quit properly this process?
For an unknown reason, my previous code (without leave ret) works as expected without any bad output code. I don't know what it means. Sometimes...
Strange. Thank you for your help ++
I think unless the function is declared with __attribute__((naked)), the compiler generates the "prologue" and "epilogue" for you. By returning from in-line assembly, wouldn't you skip the "epilogue"?