Mail Archives: djgpp/1996/05/28/14:13:07
Richard Philp (philpri AT ee2 DOT ee DOT cit DOT ac DOT nz) wrote:
: Hi all,
: Just a simple question. I've got some assembler that I've assembled and
: then use o2c to convert it to COFF. The thing is I can't get the assembler
: to pass the correct value back to the program.
: Are the output from a program passed in the registers? If so which one(s)?
: Or
: Are they passed on the stack? And if so how?
Well, the easiest way to solve this problem is to compile same sample C code
with -S -O and look at the resulting .s file.
int results are returned in eax, I'm not sure how floats, longlongs and
structs are handled, but this should be obvious with the compiler asm output.
bye, Alexander
--
Alexander Lehmann, | "On the Internet,
alex AT hal DOT rhein-main DOT de (plain, MIME, NeXT) | nobody knows
lehmann AT mathematik DOT th-darmstadt DOT de (plain) | you're a dog."
!!CHANGED!! <URL:http://www.mathematik.th-darmstadt.de/~lehmann/>
- Raw text -