flat assembler
Message board for the users of flat assembler.

Index > Windows > sizeof ???

Author
Thread Post new topic Reply to topic
xyblack



Joined: 20 Mar 2008
Posts: 19
xyblack
Good evening (*^__^*)

I would like to ask a question on the "sizeof" 。 fasm Do not support "sizeof" ?? If there is no , Whether have macro Substitute ..
Post 04 Apr 2008, 10:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17475
Location: In your JS exploiting you and your system
revolution
The macro "struct" will initialise the sizeof field.

But make sure you use the dot (.)
Code:
...
mov eax,sizeof.RECT
...    
Post 04 Apr 2008, 10:44
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
depends on how you declare structure. If you use builtin "struc", then you can declare it by hand:

Code:
struc MYSTR
{
.a dd ?
.b dd ?
}
virtual at 0
  MYSTR MYSTR
  sizeof.MYSTR:
end virtual
    


if you use struct macro, then it declares "sizeof." automatically, as revolution told.
Post 04 Apr 2008, 10:48
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
xyblack



Joined: 20 Mar 2008
Posts: 19
xyblack
Thank you very much
Post 04 Apr 2008, 10:53
View user's profile Send private message 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.