flat assembler
Message board for the users of flat assembler.

Index > Windows > defining data without a structure name

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 05 Mar 2006, 14:28
I was wondering a feature can be added to fasm to allow defining data without the stucture name, example:

Code:
mypoint POINT 5,6
        POINT 10,10
        POINT 11,11    
Post 05 Mar 2006, 14:28
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
Tomasz Grysztar 05 Mar 2006, 14:38
You mean extending the "struct" macro?

Maybe try to replace this last line of "define@struct" macro:
Code:
   common \\\} \\} \} }    

with:
Code:
   common \\\} \\} \}
    match values, list \{
    macro name value \\{
   forward
     match , value \\\{ type def \\\}
     match any, value \\\{ \\\local ..field
                           ..field:
                           type value
                           if ~ field eq .
                            rb sizeof.#name#field - ($-..field)
                           end if \\\}
   common \\} \} }    
Post 05 Mar 2006, 14:38
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 05 Mar 2006, 19:09
All right, thanks. Everything else would work normally right?
Post 05 Mar 2006, 19:09
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 05 Mar 2006, 19:58
I'll answer my own question, yep!, thanks tomasz!
Post 05 Mar 2006, 19:58
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.