Quote:
:_MyFunc
pushl %ebp
movl %ebp, %esp
movl %eax, [%ebp + 8]
movl %edx, [%ebp + 12]
addl %eax, %edx
popl %ebp
retThen to call this in assembly to calculate 1+2 you would go:
Code:
pushl $2
pushl $3
call _MyFunc
addl $8, %esp
None of that will work for MSVC, Borland, or Intel compilers be it inline or pure asm files. That is AT&T syntax and most popular compilers use Intel syntax, not AT&T. The only one I know of that uses AT&T is DJGPP and maybe Watcom although I've not heard about it in a very long time. I don't know what Dev-C uses since I stay as far away as possible from that compiler.