Including or discarding parts of the a source file is done by using #if directives, just like in the script language.
// Simple if block
#if TEST
inc $d020
#endif // <- Use an endif to close this if block
// You can also use else
#if A
.print "A is defined"
#else
.print "A is not defined"
#endif
Since the source isn't passed on to the main parser, you can write anything inside an untaken if, and it will still compile.
#undef UNDEFINED_SYMBOL
#if UNDEFINED_SYMBOL
Here we can write anything since it will never be seen by the main parser...
#endif #elif is the combination of an #else and an #if. It can be used like this:
#if X
.print "X"
#elif Y
.print "Y"
#elif Z
.print "Z"
#else
.print "Not X, Y and Z"
#endif
The #if blocks can be nested:
#if A
#if B
.print "A and B"
#endif
#else
#if X
.print "not A and X"
#elif Y
.print "not A and Y"
#endif
#endif
The indentations doesn't change anything, its just to make the code easier to read.





