flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Macroinstructions > fasmg as preprocessor

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
emil



Joined: 16 Dec 2003
Posts: 70
Location: egypt
ok , i got it.
Post 22 Feb 2017, 17:22
View user's profile Send private message Reply with quote
emil



Joined: 16 Dec 2003
Posts: 70
Location: egypt
Hi all ,

may any one explain the next macro , i have tried to got it but .....

Code:

macro x86.parse_operand_value ns,op    
        local buffer,is_name,auto_extrn   
        define buffer op:    
        while 1    
                match sym tailbuffer    
                        define buffer tail    
                        load is_name:1 from Name_XLAT:`sym and 0FFh    
                        if is_name   
                                if defined auto_extrn.sym & (auto_extrn.sym | ~ defined sym)  
                                        extrn sym   
                                        auto_extrn.sym := 1  
                                else if ~ defined sym   
                                        auto_extrn.sym := 0  
                                end if   
                        end if    
                else    
                        break    
                end match    
        end while    
        x86.parse_operand_value ns,op    
end macro  




So
1- what this line means

Code:

       define buffer op:  
      


2- what is the "sym" here and where it declared

Code:

     match sym tailbuffer  

     load is_name:1 from Name_XLAT:`sym and 0FFh     
     


3- also if each lined commented so that i can got it.

excuse my newbee.

thanks for any help.
Post 24 Feb 2017, 10:02
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14462
Location: Eta Argus
1 > "buffer" is defined as "op" with a colon (:) appended.

2 > match will define "sym" as the first symbol from "buffer", and "tail" as the all of the remaining symbols from "buffer"

3 > Not sure what you question is here?
Post 24 Feb 2017, 10:15
View user's profile Send private message Visit poster's website Reply with quote
emil



Joined: 16 Dec 2003
Posts: 70
Location: egypt
thanks you

may you kindly explain each line in the macro !!
Post 24 Feb 2017, 10:43
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6179
Location: Kraków, Poland
As I mentioned earlier, this macro is especially tricky. I'd suggest you first take some time to get accustomed with the simpler ones, including the operation of MATCH. You can start with reading the section on MATCH in the manual and then the increasingly complex examples in my introduction to fasmg.
Post 24 Feb 2017, 17:01
View user's profile Send private message Visit poster's website Reply with quote
emil



Joined: 16 Dec 2003
Posts: 70
Location: egypt
any way i have deleted my last two posts ,

thank you all for your help.
Post 26 Feb 2017, 05:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.