flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > <> embracing in macroses

Author
Thread Post new topic Reply to topic
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 05 Aug 2004, 00:11
Here is an example:
Code:
some_macro 1,2,3,<mov eax,4>    

How can I determine that 4th argument is embraced with <>, i mean is there some form like that:
Code:
macro some_macro a1,a2,a3,a4 {
  if a4 eqtype <>
    ...
  else
    ...
  end if
}    
Post 05 Aug 2004, 00:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
VitalOne



Joined: 29 Jul 2003
Posts: 54
Location: USA
VitalOne 05 Aug 2004, 03:15
mike.dld wrote:
Here is an example:
Code:
some_macro 1,2,3,<mov eax,4>    

How can I determine that 4th argument is embraced with <>, i mean is there some form like that:
Code:
macro some_macro a1,a2,a3,a4 {
  if a4 eqtype <>
    ...
  else
    ...
  end if
}    


In fasm, the a4 argument with <> would be read as mov eax,4 , without the < and > , so the if statement would be read as if mov eax,4 eqtype <> .
Post 05 Aug 2004, 03:15
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
S.T.A.S. 06 Aug 2004, 12:01
This should work for <mov eax,4>, <sub edx,5>, <6,7>, etc,
but not for <mov eax 4> :
Code:
macro    multiple_argument?      arg,[args]
{
  if args eq
    multiple_argument? = FALSE
  else
    multiple_argument? = TRUE
  end if
}
  
macro some_macro a1,a2,a3,a4
{
  multiple_argument? a4
  if multiple_argument?
    ...
  else
    ...
  end if
}    
Post 06 Aug 2004, 12:01
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.