Yuval Karmi
Yuval Karmi

Reputation: 26713

How to externalize a proc in assembly x86?

I am wondering how I would go about externalizing a proc (example below) so I can use it when compiling two separate file together

FOOBAR PROC
    ;do something
    RET
FOOBAR ENDP

Thanks!

Upvotes: 0

Views: 987

Answers (2)

user205036
user205036

Reputation:

if you want to export it in stdcall format you need to call it in proper format:

_ProcedureName@0 (VOID procedure) _ProcedureName@16 (16 = 4x DWORD parameters)

Upvotes: 0

Jerry Coffin
Jerry Coffin

Reputation: 490028

extern foobar:proc

There's also a 'proto' directive to do an extern definition of a procedure that includes parameters so you can use 'invoke' to pass parameters to it.

Upvotes: 1

Related Questions