Example 1
Here is an example of a conditional assembly directive:
.IF EQUAL ALPHA+1 ; Assemble block if ALPHA+1=0. Do
. ; not assemble if ALPHA+1 not=0
.
.
.ENDC
Example 2
Nested conditional directives take the following form:
.IF condition argument(s)
.IF condition argument(s)
.
.
.
.ENDC
.ENDC
Example 3
The following conditional directives can govern whether
assembly of the specified range is to occur:
.IF DEFINED SYM1
.IF DEFINED SYM2
.
.
.
.ENDC
.ENDC
In this example, if the outermost condition is not satisfied,
no deeper level of evaluation of nested conditional statements
within the program occurs. Therefore, both SYM1 and SYM2 must
be defined for the specified range to be assembled.
Example 4
An alternate series of statements can be specified using .ELSE.
.IF EQUAL A,B ; Assemble if A is equal to B
.ELSE ; Assemble if A is not equal to B
.ENDC
Example 5
The following example demonstrates the use of .ELSE and
nesting:
.IF LESS_THAN X,Y ; Assemble if X is less than Y
.IF DEFINED Z ; Assemble if Z is defined and
; X is less than Y
.ELSE ; Assemble if Z is not defined and
; X is less than Y
.ENDC
.ELSE ; Assemble if X is greater than or equal to Y
.IF DEFINED Z ; Assemble if Z is defined and X is
; greater than or equal to Y
.ENDC
.ENDC