Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#481 recursive macros

closed-fixed
Keith Kanios
5
2010-08-07
2010-02-12
Anonymous
No

After the call recursive macros don`t working assemble opcodes and preprocessor commands.
Nasm build: "NASM version 2.08rc8 compiled on Feb 11 2010".
Example:
%rmacro hanoi 4.nolist
%if %1 > 0
%assign %%x %1 - 1
hanoi %%x, %2, %4, %3
%warning move topmost disc from stick %2 to stick %3
hanoi %%x, %4, %3, %2
%endif
%endm

hanoi 3, 1, 2, 3
%fatal 5 ; not working
mov eax, 3 ; not working

Discussion

  • Thanks for report! We're working on it.

     
  • The problem happened to be a bit more harder to resolve.
    So we defer [i]rmacro,exitmacro to be implemented in later releases (perhaps 2.09-2.10).

    Though lets keep this bug opened.

     
  • Keith Kanios
    Keith Kanios
    2010-08-07

    This bug has been addressed/fixed in/by the preprocessor-rewrite branch, tentatively NASM 2.10rc1.

     
  • Keith Kanios
    Keith Kanios
    2010-08-07

    • assigned_to: nobody --> kkanios
    • status: open --> closed-fixed