Pelles C forum
Assembly language => Assembly discussions => Topic started by: xteraco on July 06, 2013, 04:57:06 PM
-
I found this swap macro function on stackoverflow that is written in assembly. When I try to compile with it I get 3 errors that say "[asm] Expression with multiple C symbols is not allowed."
Any idea how I can get this code to work?
#define exchange(a,b) __asm mov eax, a \
__asm xchg eax, b \
__asm mov a, eax
Thanks! :)
-
#define exchange(a,b) __asm { __asm mov eax, a \
__asm xchg eax, b \
__asm mov a, eax }