flat assembler
Message board for the users of flat assembler.

Index > Windows > Strings and integer probelm

Author
Thread Post new topic Reply to topic
lilljocke



Joined: 28 Dec 2004
Posts: 34
Location: Sweden
lilljocke 28 Dec 2004, 21:02
Hi i'm new at FASM and i have a probelm with strings and integers. When i debug my program in the debuger OllyDbg i can see that the strings is too tight together it is no space beteen them so when i do invoke SetDlgItemTextA,[hwnd],101,Text,256 it sets wrong text this probelmn is only when i have more then one "db ?" .

MousePos POINT
Window dd ?
Text db ?,0

is this worng
Post 28 Dec 2004, 21:02
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 28 Dec 2004, 21:40
lilljocke wrote:
Text db ?,0


If you want to allocate buffer for strings, you have to use "rb" directive:
Code:
Text rb 1024   ; allocates (reserve) 1024 bytes for string processing.
    


Also, you have to put the terminating zeros at the end of the strings you create with the program.
Of course if you need only string constants, you can define them using "db":
Code:
TextConst  db  'Some text", 0
    


Regards
Post 28 Dec 2004, 21:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
lilljocke



Joined: 28 Dec 2004
Posts: 34
Location: Sweden
lilljocke 28 Dec 2004, 22:57
this problem is only sometimes so it mabye works, thanks a lot
Post 28 Dec 2004, 22:57
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.