Hi,
It is pretty easy to write a macro processor that supports nested macros , the algorithm is given in Leland L Beck , System Programming . You just need to modify the alogrithm and use recursion insted following the iterative algorithm present in the book .
.
Designing a macro processors based on indentation is a poor design , so %endmacro should and must ideally close the inner macro in this case .Avoid the use of macros as much as possible as they lead to hard to read code .
However you can implement the macroprocessor in such a way that endmacro also takes the macroname as a parameter . I however know not how that can be done in nasm , you may have to rolll your own macroprocessor
Regards
Shrek