flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Output "local" string from macro

Author
Thread Post new topic Reply to topic
alorent



Joined: 05 Dec 2005
Posts: 201
alorent
Hi all,

I want to create a macro that creates a "standard" function for some routines that I use. Example:

Code:
macro CREATE_STANDARD_FUNCTION FunctionName, Param1
{
  FunctionName proc Param1
  
     local my_var:DWORD, output:DWORD

     pushad 

     ; some code

     popad
   
  FunctionName endp
}
    


The problem is that I cannot generate the string "local" as it's a keyword used inside macros. How can I output also the "local" string?

Thanks!
Post 04 Jun 2014, 09:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17717
Location: In your JS exploiting you and your system
revolution
Use the escape backslash:
Code:
;...
 \local my_var:DWORD, output:DWORD
;...    
Post 04 Jun 2014, 11:02
View user's profile Send private message Visit poster's website Reply with quote
alorent



Joined: 05 Dec 2005
Posts: 201
alorent
Thanks a lot revolution! It works as expected! Smile
Post 04 Jun 2014, 11:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17717
Location: In your JS exploiting you and your system
revolution
The same rule also applies to the other macro directives: reverse, forward and common.
Post 04 Jun 2014, 11:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.