Mail Archives: djgpp/1997/06/03/16:27:10
> little problem. I used to write:
> void func(int a, char b){
> asm{
> ...
> }
> }
>
> How do I get the parameters when using 100% nasm instead of inline
> asm? And how do I return structs? I need to return 3 values (chars)...
The easiest way to see how the compiler expect things to work is
to write C code, and then compile with the -S option and look
at the assembly listing given. GCC passes parameters on the stack,
from right to left. So, at entry to your function, [ESP+4] = left most
argument. Normally, return values go in EAX. Floats are different of
course. Sorry I can't help with returning structs, check the assembly
output
> And what is a coff file?
Common Object File Format
- Raw text -