NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: fullofbugs on February 10, 2021, 02:49:33 PM

Title: Changed behavior of %exitrep
Post by: fullofbugs on February 10, 2021, 02:49:33 PM
Code: [Select]
%macro GetNumber   0.nolist   
  %assign %%f 0
  %rep 99
    %if %%f = 9
      %exitrep
    %endif
  %assign %%f %%f + 1
  %endrep
  DB %%f
%endmacro

In NASM 2.14, this macro generates DB 10.
In NASM 2.15, this macro generates DB 9.

To me, the new behavior makes more sense, but I am surprised to see that this change was not documented. I also hesitate to update my code, as I am not sure if this is considered a bug and will be changed back.
Does anyone know if the change is intentional?
Title: Re: Changed behavior of %exitrep
Post by: debs3759 on February 10, 2021, 11:30:20 PM
The new behaviour is how I would expect it to behave. It looks like it was wrongly coded in older versions.