flat assembler
Message board for the users of flat assembler.

Index > Windows > Deciphering the interface macro

Author
Thread Post new topic Reply to topic
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
Code:
macro interface name,[proc]
 { common
    struc name \{
    match any, fields@struct \\{ fields@struct equ fields@struct,.,name, \\}
    match , fields@struct \\{ . dd ?
    virtual at 0
   forward
    .#proc dd ?
   common
    com.object.\#. = com.interface.#name
    end virtual \\} \}
    virtual at 0
   forward
     name#.#proc dd ?
   common
     com.interface.#name = $ shr 2
    end virtual }    


I think I grasp the general workings of this, but what do the match lines do?

_________________
This is a block of text that can be added to posts you make.
Post 26 Sep 2010, 02:25
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
match any, fields@struct ... checking if fields@struct is not blank

match , fields@struct ... checking if fields@struct is blank
Post 26 Sep 2010, 02:49
View user's profile Send private message Visit poster's website Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
Who is fields@struct, and what does he do?
Post 26 Sep 2010, 02:52
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
It is defined in another macro somewhere else.
Post 26 Sep 2010, 02:53
View user's profile Send private message Visit poster's website Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler
I guess it's part of fasm's error checking.

Perhaps this is enough?

Code:
macro interface name,[methods]
{
   common
      virtual at 0
      name:
   forward
      .#methods: dw ?
   common
      end virtual
}    

_________________
This is a block of text that can be added to posts you make.
Post 26 Sep 2010, 19:42
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number 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.

Powered by rwasa.