flat assembler
Message board for the users of flat assembler.

 Index > Macroinstructions > <> embracing in macroses
Author
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
}    ```
05 Aug 2004, 00:11
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 <> .
05 Aug 2004, 03:15
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
}    ```
06 Aug 2004, 12:01
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum