From: Andrew Crabtree Message-Id: <199704291653.AA297362818@typhoon.rose.hp.com> Subject: Re: nasm To: p DOT steele AT ic DOT ac DOT uk (Peter Steele) Date: Tue, 29 Apr 1997 9:53:37 PDT Cc: djgpp AT delorie DOT com In-Reply-To: <3365B836.146235B9@ic.ac.uk>; from "Peter Steele" at Apr 29, 97 9:58 am Precedence: bulk > > Can some please tell me how to functions that have been compiled in asm > language with nasm so I can use them in my c code. If your using C then remember to prepend your functions with an underscore C printf becomes ASM _printf If you are using C++ then you will need to follow the name mangling rules (I think). Arguments are passed to functions from left to right on the stack, so in NASM (assuming int args) [ESP+4] = first arg. [ESP+8] = 2nd arg on entry to your function. Most return values go in EAX. Floats probably go in ST(0) but I'm not sure. Andrew