Check the preprocessor output on file, shown in Listing
defining_in_cla.asm
:
%ifdef flag
hellostring: db "Hello",0
%endif
By launching nasm -E defining_in_cla.asm
we get the following output:
%line 1+1 test.asm
As we see, the file became empty because hellostring
is not created. The
lines between %ifdef
and %endif
will only be included if flag
is defined
using %define flag
directive or -Dflag
compiler option