flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 21 Dec 2010, 15:58
No, it is not possible for a macro to purge itself. Inside macro only the previous definitions of it are seen, so "purge" removes the last from the stack of previous definition of that macro:
Code: macro db [args] { ; level 1 macro common db args,0 purge db } macro db [args] { ; level 2 macro common db args ; now it calls level 1 macro purge db ; now it removes level 1 macro, so next time the 0 level - original DB directive will be used } db "hello" db "hello" |
|||
![]() |
|
wht36 22 Dec 2010, 06:19
Ah I see. So removing the level 1 macro removes both the level 1 and level 2 macros.
|
|||
![]() |
|
Tomasz Grysztar 22 Dec 2010, 10:32
No, level 2 stays there. Try adding some DISPLAY into the level 2 macro and see what happens.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.