News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to use proc vars with macro's

Started by xroot, January 30, 2009, 04:04:15 PM

Previous topic - Next topic

xroot


A_function proc var1:dword,var2:dword,var3:dword etc.......
   
some_macro var1,var2,var3, etc........

A_fucntion endp

How do you convert the var's so the macro will work?


Jimg

That not a simple question.  vars in macros are basically character strings.  You either have to know exactly what you are getting, or you have to test their opattr and type to know how to handle them.

BogdanOntanu

You do not have to do anything special.

For example the following code does work as expected:

IN_PROC  macro arg1,arg2
    mov arg1,0
    mov arg2,0
endm

my_func proc var1 :dword, var2:dword

    IN_PROC var1,var2
   
    mov ecx,1
    ret
my_func endp



Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro