What happens to registers when you manipulate them using asm code in C++?
问题 Some code: int x = 1; for(int i = 1; i < 10; i++) { x *= i; __asm { mov eax, x }; } If this program uses eax in order to increase the value of i , what will happen when I manipulate eax ? Will the compiler save registers from before the __asm call and use them after the asm code was executed or will it ignore that eax was manipulated and continue producing some sort of strange behavior? What happens to eax internally? EDIT: Even if my code only works with Visual C++ I want to know what