flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > equ & match

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1939
Roman 03 May 2025, 05:47
I want do this:
Code:
k1 equ 10:ebx:5
k2 equ edx:ebx:5:8:ecx

macro a [k] { add eax,k } ;this macro using match

;in code
a k1 ;get add eax,10; add eax,ebx ; add eax,5
a k2 ;get add eax,edx; add eax,ebx ; add eax,5; add eax,8; add eax,ecx
    


This variant work with k1,but not work with k2
Code:
macro k@cmp key { match a1:b1:c1,key \{
                     mov eax,a1
                     cmp eax,[b1]
                     jnz @f
                     mov eax,c1
             @@:
                     \}
}    
Post 03 May 2025, 05:47
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1939
Roman 03 May 2025, 07:34
match for many arguments from equ.
https://board.flatassembler.net/topic.php?t=23623
Post 03 May 2025, 07:34
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.