High level language
152
$IF
$ENDIF
$ELSEIF
$ELSE
$GOTO
Conditional execution IF
(conditional jump).
$IF <condition>
$ENDIF
$ELSEIF
$ELSE
$GOTO
Note 1:
$IF P1==1
…
…
$ENDIF
…
If the condition is true, it executes the
blocks between $IF and $ENDIF.
If the condition is false, the execution jumps
to the block after $ENDIF.
Note 2:
$IF P1==1
…
…
$ELSE
…
$ENDIF
…
If the condition is true, it executes the blocks
between $IF and $ELSE, after the execution it
continues from the following block to $ENDIF.
If the condition is false, it executes the
blocks between $ELSE and $ENDIF, after
the execution it continues from the next
block to $ENDIF.
Note 3:
$IF P1=1 $GOTO N60
…
…
N60:
If the condition is true, it jumps to N60,
otherwise it continues from the following
block to $IF.
Instruction Meaning