Specifications

http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm
Syntax:
endif
Description:
Directive is written at the end of a conditional block to inform the assembly translator that it is
the end of the conditional block
Example:
If level=100
goto LOADS
else
goto UNLOADS
endif
Similar directives: ELSE, IF
4.12 WHILE Execution of program section as long as
condition is met
Syntax:
while<condition>
.
endw
Description:
Program lines between WHILE and ENDW would be executed as long as condition was met. If a
condition stopped being valid, program would continue executing instructions following ENDW line.
Number of instructions between WHILE and ENDW can be 100 at the most, and number of
executions 256.
Example:
While i<10
i=i+1
endw
4.13 ENDW End of conditional part of the program
Syntax:
endw
Description:
Instruction is written at the end of the conditional WHILE block, so that assembly translator would
know that it is the end of the conditional block
Example:
while i<10
i=i+1
endw
Similar directives: WHILE
4.14 IFDEF Execution of a part of the program if symbol
was defined
Syntax:
ifdef<designation>
Description:
If designation <designation> was previously defined (most commonly by #DEFINE instruction),
instructions which follow would be executed until ELSE or ENDIF directives are not would be
http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm (9 of 15) [4/2/2003 16:18:10]