flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > extending same name macro - only "fix"?

Author
Thread Post new topic Reply to topic
IronFelix



Joined: 09 Dec 2004
Posts: 141
Location: Russia, Murmansk region
IronFelix
Hi all!
Is it possible to extend some macro with additional code, and use previous version of macro with same name using preprocessor directives (define or equ, maybe purge) ? I know how to do it with "fix" only, but maybe another way is possible?

Code:
displayed_proc fix proc
displayed_endp fix endp

macro displayed_proc [def]
{
 common
  display "proc started",13,10
  proc def
}

macro displayed_endp
{
 endp
 display "proc ended",13,10
}
    


Thanks.

_________________
Flat Assembler is the best!
Post 19 Feb 2009, 14:50
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17248
Location: In your JS exploiting you and your system
revolution
The macros can be nested, so just override the old macro with your new macro.
Code:
macro endp
{
 endp ;use the previous nest level for this macro
 display "proc ended",13,10
}    
Post 19 Feb 2009, 14:53
View user's profile Send private message Visit poster's website Reply with quote
IronFelix



Joined: 09 Dec 2004
Posts: 141
Location: Russia, Murmansk region
IronFelix
Thank for so quick reply, revolution, works fine!
Post 19 Feb 2009, 15:09
View user's profile Send private message 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.

Powered by rwasa.