flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
Use this:
Code: proc My_exported_func c param1, param2
...
ret
endp The 'c' in there tells it that you a making a cdecl complying proc. |
|||
![]() |
|
twgt
Thanks!
|
|||
![]() |
|
LocoDelAssembly
Quote:
Apart of revolution's solution that suits better to your needs you can use retn to skip the automatic generation of leave/retn args*4. This is because proc macro defines a macro called "ret" that produces the aforementioned instructions sequence, that is why ret does not map to retn when you are inside a proc. Note that since the macros are case sensitive using "Ret", "rEt", "RET", etc, also skips the "ret" macro. |
|||
![]() |
|
twgt
Thanks LocoDelAssembly, I remember this advice.
|
|||
![]() |
|
revolution
Be careful where you use what LocoDelAssembly suggested. Using it like that does not restore the stack from locals, the saved registers or ebp!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.