Why doesn\'t this code set temp to 1? How do I actually do that?
temp
int temp; __asm__( \".intel_syntax;\" \"mov %0, eax;\" \"mov eax, %
You want temp to be an output, not an input, I think. Try:
__asm__( ".intel_syntax;" "mov eax, %1;" "mov %0, eax;" ".att_syntax;" : "=r"(temp) : "r"(1) : "eax");