flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Change dynamicly macro params.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1701
Roman 11 Mar 2023, 07:14
Fasmw 1.73
Code:
macro pp a1=4,a2=8,a3=procA {
mov rcx, a1
mov rdx, a2
Call a3
}
;in code
pp
;equ or some how change in pp params
pp ;and set to default a1=88,a2=55,a3=procB

;or Something like this
def1 fix 8,3,procB
def2 fix 55,7,procE
pp def1  ;need fix! Now work
pp 
pp def2
    
Post 11 Mar 2023, 07:14
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20060
Location: In your JS exploiting you and your system
revolution 11 Mar 2023, 07:51
Just define a wrapper macro:
Code:
macro pp a1=4,a2=8,a3=procA {
mov rcx, a1
mov rdx, a2
Call a3
}
pp

macro pp a1=88,a2=55,a3=procB {
        pp a1,a2,a3     ; use pp from before with new values
}
pp    
Post 11 Mar 2023, 07:51
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.