flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
itsnobody
What's wrong here?
If I do something like: Code: proc someProc locals someStr db "What?",0 endl lea eax,[someStr] ret endp It will return just a blank string...why? |
|||
![]() |
|
itsnobody
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
|
|||
![]() |
|
edfed
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. |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
itsnobody
ok I see, thanks
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.