I have this one...
Can anybody tell me why the output is "2 and 2"??Code:typedef long Function(); void test(int n1, int n2) { printf("%d and %d", n1, n2); } int main() { Function *p = (Function *)test; int a = 1; int b = 2; asm("push %0" : "r"(a)); asm("push %0" : "r"(b)); (*p)(); }
Is there something wrong?
I tried...
But it gave me the same result... T_T"Code:asm("push %0" : "a"(a)); asm("push %0" : "a"(b));