flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Need macro proc without stack restoration |
Author |
|
revolution 29 Dec 2007, 08:33
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. |
|||
29 Dec 2007, 08:33 |
|
twgt 29 Dec 2007, 08:36
Thanks!
|
|||
29 Dec 2007, 08:36 |
|
LocoDelAssembly 29 Dec 2007, 16:23
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. |
|||
29 Dec 2007, 16:23 |
|
twgt 30 Dec 2007, 10:44
Thanks LocoDelAssembly, I remember this advice.
|
|||
30 Dec 2007, 10:44 |
|
revolution 30 Dec 2007, 10:51
Be careful where you use what LocoDelAssembly suggested. Using it like that does not restore the stack from locals, the saved registers or ebp!
|
|||
30 Dec 2007, 10:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.