flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Repeat last macro operation.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1850
Roman 16 Mar 2023, 12:52
Fasmw 1.73
Using for mlast equ or fix in macro Get?
Code:
macro Get v, line {
  match =1, line \{ mov v, eax
Inc eax
Call p1
\}
  match =2, line \{ dec eax
mov v, 11
Add v, eax
 \}
}    

 Get edx, 1
 mlast  ;as get edx, 1
 Get ecx, 2
 mlast ;as get ecx, 2
    
Post 16 Mar 2023, 12:52
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1043
Location: Russia
macomics 16 Mar 2023, 13:17
Code:
macro mlast { err }
macro Get v, line {
  purge mlast
  macro mlast \{ Get v, line \}
  match =1, line \{ mov v, eax
Inc eax
Call p1
\}
  match =2, line \{ dec eax
mov v, 11
Add v, eax
 \}
}    

 Get edx, 1
 mlast  ;as get edx, 1
 Get ecx, 2
 mlast ;as get ecx, 2    
Post 16 Mar 2023, 13:17
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1850
Roman 16 Mar 2023, 13:30
Thanks.
Post 16 Mar 2023, 13:30
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.