The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Rainstorm on September 21, 2006, 02:46:37 AM

Title: Question about variables in Macro functions
Post by: Rainstorm on September 21, 2006, 02:46:37 AM
Hi.

LOCAL x$:DWORD
LOCAL y$:DWORD

in macro functions the address of variables like w$, y$  are automatically taken in the function.
does this apply to variables declared in the data section too ? like..

.data
x dd 'H'
y dd '5'

or is this not the case ? - i.e , will the address be taken there too or will the values of x & Y be taken, like is nornally done.(with respect to the macro functions)

also for the ones declared liike      LOCAL x$:DWORD
is the '$' neccessary ? for the address to be taken instead of the value ?

thanks!

Rainstorm
-

Title: Re: Question about variables in Macro functions
Post by: Rainstorm on September 21, 2006, 08:01:39 AM
nevermind,..I got that one..

it seems to take the 'address' of all variables automatically for the string functions. - whether
they have a '$' or not.
in the help files i thought the x$, & y$ etc (with the $) were referring to special
variables which did that.

-
Title: Re: Question about variables in Macro functions
Post by: PBrennick on September 21, 2006, 08:04:44 AM
Yes, you really went off on a tangent with that one.  Try to forget any habits you may have picked up by programming in BASIC.  At least that is what your post looked like.  :dazzled:

Paul
Title: Re: Question about variables in Macro functions
Post by: Rainstorm on September 21, 2006, 03:41:56 PM
QuoteYes, you really went off on a tangent with that one.
yah :)

I don't know basic though.