开发者

How to externalize a proc in assembly x86?

开发者 https://www.devze.com 2022-12-08 21:57 出处:网络
I am wondering how I wo开发者_如何学运维uld go about externalizing a proc (example below) so I can use it when compiling two separate file together

I am wondering how I wo开发者_如何学运维uld 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!


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.


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消