Sorry if the answer to my question is really obvious, but im new to FASM.

Im trying to do the following:
Code a procedure and compile it into and obj file using FASM32 1.45
Include the object file in a MSVC++ 6.0 project
Call the procedure from C code.

The problem is that fasm gives me errors when i try to make a procedure, example code includes:

main proc
;code here
main endp

proc main
;code here

neither of this works, it gives me an error such as "Error, illegal instruction: proc main"

Is my syntax totally wrong or am i supposed to set up FASM somehow to make this work? Sorry again if this is a totaly newbie question.
Posted on 2003-03-01 17:57:24 by osushkov
Actually proc is not the FASM native construction but macro. The right is your second variant, but you must include in your source file. Read the fasm manual and take a look at the examples.

BTW: Actually 'proc' is not an instruction and the error message is true. :)
Posted on 2003-03-01 18:07:32 by JohnFound
Well, ok, that kinda worked, thanks, BUT... I still cant call the procedure from C... I link to the obj file, i declare:
extern void fun_name();

and then call it, but I get an error, saying that no such procedure exists. This might not really be Assembler related, but any help would be nice.
Posted on 2003-03-01 21:56:29 by osushkov