flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Problem with EQU how fix this?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1251
Roman
Code:
Lb1:
.Buf:
.Dat:

Lb2:
.Buf:
Mov eax, Lb1.Buf ;ok

T EQU Lb1

Mov eax, T ;ok
Mov eax, T.Buf ;error not defined. I expected T.Buf = Lb1.Buf
    
Post 30 Jun 2022, 09:41
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8028
Location: Kraków, Poland
Tomasz Grysztar
Use MATCH to extract the EQU value for further preprocessing:
Code:
match T, T {
        Mov eax, T
        Mov eax, T#.Buf
}    
The concatenation is needed there, because "." is not a separate token in fasm 1, it is just a part of the name. With fasmg you could do:
Code:
match T, T
        Mov eax, T
        Mov eax, T.Buf
end match    
Post 30 Jun 2022, 10:39
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.