perhaps I should use win32 object output instead of coff?
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Interface-with-NASM-tp2838671p2844618.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
_
> Check that this puts a 32 bit value on the stack rather than an 8 bit
> or 16 bit one. You may need "push dword 65" or something like that.
I've tried that. Even a (stupid) trick like this:
section .data
charA db 'A'
section .text
global tes
tes:
push ebp
mov ebp,esp
mov eax,charA
On Thu, Sep 16, 2010 at 11:10 AM, leledumbo wrote:
> Just by changing to ATT syntax? Weird...
No, I removed the function header:
push ebp
mov ebp,esp
And function footer:
leave
ret
Because FPC automatically adds them, putting another header was the
cause of the crash in my code. But this
> It crashes inside printc apparently when getting the parameter
That's it! That's exactly what happened.
> Maybe disassembling what nasm produces could show
> something, but I don't know which GNU tool could be used for that...
ndisasm from nasm package, or objdump can also do that.
> The fol