NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on September 16, 2009, 03:16:35 AM
-
I use NASM under Windows,and in my asm I want to call C runtime function printf, like this
'push msg
call _printf
add esp, 4`
But when program run, it does not call printf function but another fuction.If code like this:
push msg
mov eax, _printf
call eax
add esp, 4
It works well.Why?
Thanks!
-
Dunno. Doesn't seem possible. What function does it call besides _printf?
Best,
Frank
-
The function is not confirmed.But it is not printf.
BTW,my NASM is 2.04.
Thanks!
-
Odd. Well, put it in eax, if that works. Shouldn't make any difference. Are you using "-f obj"? If so, "call [_printf]" may work...
Best,
Frank