flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > can't make 'irps' work with 'reverse' :evil:

Author
Thread Post new topic Reply to topic
ramguru



Joined: 26 Feb 2005
Posts: 19
Location: who cares...
ramguru 22 Jul 2009, 09:15
It seems there should be a way, but I can't figure out how, I'm always getting items in normal order instead of reverse.
Code:
;--macro definition
macro pushpush reglist
{
  irps reg, reglist
  \{
    reverse
    push reg
  \}
}
;-- macro in action
pushpush <rsi rdi r10>
;-- disassembly
blaOFFSET+0 push rsi
blaOFFSET+1 push rdi
blaOFFSET+2 push r10
    


Anyone has any ideas how to make it work the right way Rolling Eyes ?
Post 22 Jul 2009, 09:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8361
Location: Kraków, Poland
Tomasz Grysztar 22 Jul 2009, 09:21
You forgot to escape the "reverse" keyword here, so it applies to the outer macro ("macro pushpush"), not the inner one ("irps"). The correct code should be:
Code:
macro pushpush reglist
{ 
  irps reg, reglist 
  \{ 
    \reverse
    push reg 
  \} 
}    
Post 22 Jul 2009, 09:21
View user's profile Send private message Visit poster's website Reply with quote
ramguru



Joined: 26 Feb 2005
Posts: 19
Location: who cares...
ramguru 22 Jul 2009, 09:26
thank you for fast reply Very Happy
actually I didn't forget, I didn't know,
thought '\' only applies to '{}' symbols Surprised
Post 22 Jul 2009, 09:26
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.