Hi All,
Noted one thing.
%exitrep doesn't exit the %rep block immediately. It completes the iteration before exiting.
This issue is there in,
NASM version 2.10.07 compiled on Jan 2 2013
I searched bugzilla and found
Bug 3088881 - %exitrep does not immediately terminate %rep
Probably this bug is persisting due to the revert of preproc rewrite.
Workaround is easy. Still wanted to post this.
Sample code.
%assign counter 0
%rep 5
%assign counter counter+1
%if counter > 0
%exitrep ; should have jumped out in the first iteration.
%endif
%rep 2
%warning shouldn't have printed this line.
%endrep
%endrep
when assembling with
nasm -E test.asm
Control flows through ... %warning shouldn't have printed this line.
Regards,
Mathi.