flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > FASMW request: PUSH/POP pairing evenness |
Author |
|
JohnFound 06 May 2012, 21:17
You can write such utilities for Fresh and they will be included in the project. But I doubt there exists reliable enough algorithm for such checks.(except of course, code emulation).
|
|||
06 May 2012, 21:17 |
|
cod3b453 06 May 2012, 21:51
You can override the instructions with wrapper macros:
Code: __stack = 0 macro push [x] { forward push x __stack = __stack + 1 } macro pop [x] { forward pop x if __stack = 0 err Stack underflow end if __stack = __stack - 1 } macro ret { ret if __stack <> 0 err Stack imbalance end if } |
|||
06 May 2012, 21:51 |
|
typedef 07 May 2012, 01:16
@codebase thanks I found the damn error
Code: push edi ; string push dword _http.size ; number push eax ; format push ebx ;buffer call [_user32.wsprintfA] add esp, 4*3 ; <------------------------- LOL EDI would get stuck on the stack What a stupid bug. wasted my precious time. |
|||
07 May 2012, 01:16 |
|
revolution 07 May 2012, 02:20
typedef wrote: @codebase thanks I found the damn error |
|||
07 May 2012, 02:20 |
|
shutdownall 07 May 2012, 12:32
typedef wrote: Hi. I have another story to tell. I was compiling a program today(lots of code) and it kept crashing but I could not find the bug since it's too big to even debug. I don't think that it is very useful. Because you can not interprete stack content. What about the many used constructions with Quote:
or Quote:
So this is a very complex adventure and you never mind what a programmer wants to do with the stack. In the first example the sequence Quote:
is quite longer in code and execution and maybe you don't want to destroy ebp contents which have been changed in the code inbetween. So please do not try to generate warnings, this could be a never ending story. |
|||
07 May 2012, 12:32 |
|
AsmGuru62 07 May 2012, 14:33
I agree. Too much of an IDE means less freedom for a coder.
|
|||
07 May 2012, 14:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.