Author Topic: Delegating %undef  (Read 12839 times)

Jasper Neumann

  • Guest
Delegating %undef
« on: November 12, 2009, 01:47:03 PM »
How can I delegate %undef?

In the example below the assembler (called with "nasm.exe -t -f rdf q.asm") bemoans my code, displays

"q.asm:19: error: interminable macro recursion"

and hangs.

Code: [Select]
bits 32

%macro my_def 2
%xdefine %1 esp+%2

%macro my_undef 1
%undef %1

global check_it
my_def x,4
mov eax,[x]
my_undef x

my_def x,8
add eax,[x]
my_undef x

What is the preferred way to do this?



Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: Delegating %undef
« Reply #1 on: November 29, 2009, 10:09:57 PM »
> ...
> and hangs.
> ...

It'll not hang anymore. Fixed.
Meanwhile such a style not supported yet.

See comments on commit

Thanks for report. If you find something strange like "hang", "crash" or whatever -- do not hesitate to file a bug report on tracker :)