The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: RedXVII on March 20, 2006, 10:29:37 PM

Title: Simple macro
Post by: RedXVII on March 20, 2006, 10:29:37 PM
Im trying to tidy up my code. I thaught i mastered macros but...

I ant a macro that goes along the lines of

mycall(A_CONSTANT_FROM_INC_FILE, variablename, string)

mycall MACRO constant, variablename, string

push constant
push variablename
call string

ENDM


Obviousley, not exactly, but i also need a variable number of arguements (ie. depending on the string i call).

My poor attempts at trying this have failed miserably, can someone give me some hints
Title: Re: Simple macro
Post by: Ratch on March 21, 2006, 01:05:10 AM
RedXVII,

     If want to see an example of a MACRO that not only takes in a variable number of arguments, but also in reverse order, using a call to a MACRO function, and other helper MACROs to assist, then you need to point your browser to this link. I don't think you will see a more concise implementation elsewhere.  Ratch


http://www.masmforum.com/simple/index.php?topic=3962.0
Title: Re: Simple macro
Post by: RedXVII on March 21, 2006, 09:13:25 PM
Thanks ratch  :U