flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Use an argument passed to a macro to name another macro? |
Author |
|
revolution 24 Dec 2009, 05:11
Code: macro foobar instruction,args{ macro instruction [args] \{ \common instruction args ;if defined arg1 ; display arg1 ;end if \} } foobar mov,<arg1,arg2> mov eax,1 ret |
|||
24 Dec 2009, 05:11 |
|
Azu 24 Dec 2009, 05:56
Thank you
|
|||
24 Dec 2009, 05:56 |
|
Azu 25 Dec 2009, 05:31
What is the correct way to use forward when constructing a macro?
Code: macro foobar instruction,args,[forwardMe]{ macro instruction [args] \{ \common instruction args forward instruction forwardme common ;if defined arg1 ; display arg1 ;end if \} } foobar mov,<arg1,arg2>,ret,int3 mov eax,1 ret Doesn't compile |
|||
25 Dec 2009, 05:31 |
|
revolution 25 Dec 2009, 05:35
Did you mean:
Code: macro foobar instruction,args,[forwardMe]{ common macro instruction [args] \{ \common instruction args forward forwardMe common ;if defined arg1 ; display arg1 ;end if \} } foobar mov,<arg1,arg2>,ret,int3 mov eax,1 ret |
|||
25 Dec 2009, 05:35 |
|
Azu 25 Dec 2009, 05:47
Oops
That was stupid of me too lol. But the problem I was having in my code was I used forward somewhere else and forgot to put a common after it. So it was trying to make the whole macro for each extra thing on the end. x_x |
|||
25 Dec 2009, 05:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.