4.36 Ifndef Directive
The MPASM IFNDEF
directive begins a conditional block of
assembly code.
Suggested Replacement
As assembly source files can be preprocessed, the PIC Assembler
#ifndef
preprocessor directive can be used as a replacement for
this directive, as shown in the example below. Ensure the assembly source file uses
a .S
extension so that it will be preprocessed by the assembler.
For
example:#ifndef RUNMODE
movf state,w
call diag
#endif
Although the MPASM assembler allows you to use a
#IFNDEF
form of this directive, note that it is still an
assembler directive. The PIC Assembler's #ifndef
directive is a
preprocessor directive, hence will be looking for the definition of a
preprocessor symbol, not an assembler symbol. If you migrate your
code to use the preprocessor directive, ensure that you also define as required the
equivalent preprocessor macros using either the#define
directive or
-D
option.