News:

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

Quick question about return values.

Started by ctt, November 23, 2005, 09:43:22 AM

Previous topic - Next topic

ctt

I have codesnippets with "return Var" in them... my question, how do i use it? return aint something that masm32 knows by default as far as I know, or is the snippets for some other assembler?  ::)

Exampel

...
ADDR lpData,ADDR dwSize
invoke RegCloseKey,phkResult
return lpData
...


Thanks!

Tedd

Most likely it's a macro which does this:

mov eax,lpData
ret


(eax is conventionally used for returning values)
No snowflake in an avalanche feels responsible.

ctt

Sweet, i was fishing for something like that but i wasn't sure.
Thanks  :U

raymond

It is one of the many macros listed in the MACROS.ASM file provided with the MASM32 package.

      return MACRO arg
        mov eax, arg
        ret
      ENDM


Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com