NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: gammac on November 25, 2014, 04:43:01 PM
-
Is this behaviour a guaranteed feature?
%rep 999
%exitrep
%warning %exitrep don't exits immediately
%endrep
-
What nasm versions have you tested this against?
I know that this "feature" existed in older versions since I had to code around it.
I never re-checked to see if it was resolved in the latest release.
-
The newest version for windows.
>nasm -v
NASM version 2.11.06 compiled on Oct 20 2014
-
hmmm.. guess not.
What I had to do to work around the issue was:
%assign %%count 999
%rep %%count
%if %%count < 990
%exitrep
%else
do stuff
%endif
%assign %%count %%count - 1
%endrep
Not elegant but works. Perhaps we can get a nasm dev to comment regarding this "feature".
edit: here is another post (http://forum.nasm.us/index.php?topic=1567.0) regarding the issue.
-
Hi Rob,
thanks but I would put the increment %assign into the %else block.
That post is nearly 2 years old and the bug ist still there. It seems to be a feature. ;)