flat assembler
Message board for the users of flat assembler.
Index
> Windows > 18 byte dynamic retn |
Author |
|
f0dder 28 Jan 2005, 09:46
You shouldn't use this approach for stuff where speed matters, as P4 architecture (perhaps other as well) has a CALL/RET optimization...
|
|||
28 Jan 2005, 09:46 |
|
Frank 28 Jan 2005, 13:03
Simpler:
Code: Start: push 1 push 1 push 1 push 1 push 1 push 1 push 6 ;# of arguments, excluding this one call dynamicreturn push 0 call [ExitProcess] dynamicreturn: pop edx pop ecx ; code goes here, ESP points to parameters, ECX and EDX must not be changed lea esp, [esp + ecx*4] push edx ret |
|||
28 Jan 2005, 13:03 |
|
r22 28 Jan 2005, 20:53
its just an amusing peice of code, that's pretty much it
|
|||
28 Jan 2005, 20:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.