The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: korte on October 11, 2007, 11:53:10 AM

Title: macro: store parameter string and value
Post by: korte on October 11, 2007, 11:53:10 AM

I want special macro.

calling:

macroname sampleparam

want output:

db "samplename" ; store parameter variable name as sting
mov eax,[sampleparam]


2. output no problem, but how to declare macro, store label as string

only 1 macro and 1 parameter good and nice.

thx

Title: Re: macro: store parameter string and value
Post by: MichaelW on October 11, 2007, 12:15:44 PM
Several such macros are included in the MASM32 macros.asm. See SADD, CTXT, CADD, and chr$.
Title: Re: macro: store parameter string and value
Post by: Vortex on October 11, 2007, 05:39:02 PM
Hi korte,

Have a look at MASM Programmer's Guide :

http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_09.htm

It provides all the technical information you need.