flat assembler
Message board for the users of flat assembler.
Index
> Windows > wsprintf messes up ESP |
Author |
|
JohnFound 11 Aug 2004, 06:52
wsprintf have C calling convention. That means that you have to fix the stack pointer yourself after return. Actually "add esp, sizeOfArguments" is the standard method of doing so. Also in FASM there is "ccall" macro that counts the arguments passed and fixes the stack pointer for you. See it in "include/macro/ccall.inc" from fasmw package.
Regards. |
|||
11 Aug 2004, 06:52 |
|
Madis731 11 Aug 2004, 08:23
Maybe this is what I should do with *my* problem:
http://board.flatassembler.net/topic.php?t=2026 Could stdcall, comcall, ccall,... help instead of invoke? |
|||
11 Aug 2004, 08:23 |
|
proveren 11 Aug 2004, 08:44
Yes, thanks John, I understood many things just by looking at the included macros.
|
|||
11 Aug 2004, 08:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.