NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: zev on December 25, 2012, 07:32:48 AM

Title: linker to C
Post by: zev on December 25, 2012, 07:32:48 AM
Has anyone used the NASM compiler at ideone.com? How do you link to gcc in order to use C functions such as printf?
Title: Re: linker to C
Post by: Keith Kanios on December 25, 2012, 05:15:10 PM
Example from external site: http://www.csee.umbc.edu/portal/help/nasm/sample.shtml#printf1 (http://www.csee.umbc.edu/portal/help/nasm/sample.shtml#printf1)

Google search term to find this example: nasm gcc
Title: Re: linker to C
Post by: Frank Kotler on December 25, 2012, 08:38:37 PM
As I understand it, Zev wants to use this http://ideone.com/ creature. Seems very cryptic to me. They have a Nasm example but I couldn't figure out how to "do" anything with it (or "why"). I think you're going to have to ask around over there, Zed. I don't think we're going to be able to help you much. Post the answer if/when you find it so that we can all learn!

Best,
Frank

Title: Re: linker to C
Post by: Mathi on December 26, 2012, 03:15:35 AM
I tried that by choosing the Assembler language in the language listbox. It seems it doesn't try linking with c libraries.
And, there is no way to specify that too. But just int 0x80 calls work.
But the other Assembler option (which uses GAS) , can link to c library , so it uses printf, scanf etc.

Yes.. send a mail to their support team- contact@ideone.com

Thanks,
Mathi.