flat assembler
Message board for the users of flat assembler.
Index
> Main > LOcal Strings in Procs... |
Author |
|
edfed 01 Apr 2008, 00:30
i never use proc (too much Ma$m for me), but is it possible that the problem is the string is before the code.
then, the SomeProc word is used as entry in the proc. then, it will not execute correctly. Code: procedure: somestring db 'what?',0 lea eax,[somestring] ret there, in this exemple, we see the problem. don't know if it is the same for proc directive. |
|||
01 Apr 2008, 00:30 |
|
itsnobody 01 Apr 2008, 01:25
I don't think FASM does the local variables like that, if it did then the code wouldn't work I would get one of those Windows Error things
|
|||
01 Apr 2008, 01:25 |
|
edfed 01 Apr 2008, 01:31
then, this kind of coding is all but asm and in my opinion is a fake feature of this great compiler.
the main philosophy of assembly is the output is a mirror of the input. |
|||
01 Apr 2008, 01:31 |
|
revolution 01 Apr 2008, 01:56
itsnobody: The local string is on the stack and is dynamically allocated. Each time the function is called the string uninitialised. Any data must but put there by your code.
The best solution is to put your fixed strings in the data section of your program. |
|||
01 Apr 2008, 01:56 |
|
itsnobody 01 Apr 2008, 02:13
ok I see, thanks
|
|||
01 Apr 2008, 02:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.