flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > ccall?

Author
Thread Post new topic Reply to topic
Patrick_



Joined: 11 Mar 2006
Posts: 53
Location: 127.0.0.1
Patrick_
Maybe I'm just looking in all of the wrong places, but where is the macro 'ccall' defined? Reading other posts, it seems to be in 'cdecl.inc'. If so, where can I find that file? I've looked everywhere to no avail.
Post 15 Apr 2006, 17:59
View user's profile Send private message Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
cinvoke

_________________
:: The Dutch Cracker ::
Post 15 Apr 2006, 18:00
View user's profile Send private message Reply with quote
Patrick_



Joined: 11 Mar 2006
Posts: 53
Location: 127.0.0.1
Patrick_
I get 'illegal instruction'. I didn't include anything, by the way.

And just so you know, I'm using Linux.
Post 15 Apr 2006, 18:03
View user's profile Send private message Reply with quote
Patrick_



Joined: 11 Mar 2006
Posts: 53
Location: 127.0.0.1
Patrick_
Alright, I included the include files from fasmw, but I get an error:

Quote:
func.inc [280]:
cinvoke socket, PF_INET, SOCK_STREAM, 0
include/macro/proc32.inc [45] cinvoke [8]:
call [proc]
error: undefined symbol.


I probably don't need this macro, but I'd like to have it. How would I call C functions without it? Would I push each argument, or move them to eax, ebx, ecx... ?
Post 15 Apr 2006, 18:14
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
uuuh.. it seems that `socket' doesn't exists. maybe you should define it somewhere... Razz
Post 15 Apr 2006, 22:01
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
You'll have to include the INCLUDE/APIA/WSOCK32.INC in your imports section, also include INCLUDE/EQUATES/WSOCK32.INC at the start of your program. look at the examples programs to see where and how to do this.
Post 15 Apr 2006, 22:54
View user's profile Send private message Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL
you can also do this

Code:
include 'win32ax.inc'
    


then do this:

Code:
.code
program:

;your code here

end program
    


Then the program automatically makes the import table for you and you don't have to define the API 'socket' Wink

_________________
:: The Dutch Cracker ::
Post 19 Apr 2006, 19:52
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.