flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Recursive macro usage details. |
Author |
|
Siberian 09 Mar 2010, 11:44
Hello, everybody!
Maybe someone can clarify a couple of details concerning recursive macro usage. After searching through forum I have found an excellent explanation of recursive macro fasm architecture from vid here. So based on that example I was able to design recursive macros for my own purpose. However, there are couple of things which are still not very clear for me. First of all, have I understood correctly, that mentioned example is only declaring recursive macro, but to actually use it I need to specifically call "Parse"? Secondly, I couldn't find the way to purge this macro after I have used it. If I purge Parse - this has no effect on compilation - I'm still able to call Parse macro, but if I purge Define_Parse, then calling Parse produces an error which says, that Define_Parse is illegal instruction. While this is an expected behaviour, I need to make it work an opposite way - I need to have Define_Parse macro available while Parse is not available until I call Define_Parse (basically I need to restore the situation before first call of Define_Parse). Is there any way to do that? As I understand, this issue is caused by recursive definition of Parse macro, in order to remove this macro I need to do purge it as many times as macro called itself in recursion. I'm not 100% sure of the reason, but even if it is exactly that, I doubt that I would be able to produce the solution for this issue the same elegant way as vid did with base example. So if anyone could help me with that? |
|||
09 Mar 2010, 11:44 |
|
Siberian 10 Mar 2010, 07:52
This is even more than I asked for, so many thanks, baldr
|
|||
10 Mar 2010, 07:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.