The .ERRDEF and .ERRNDEF directives test whether a symbol has been defined.
Syntax
.ERRDEF Identifier or .ERRNDEF IdentifierRemarks
If Identifier is defined as a label, a variable, or a symbol, the .ERRDEF directive produces an error. If you have not defined Identifier, .ERRNDEF produces an error. When Identifier is a forward reference, the assembler considers it undefined on the first pass and defined on the second pass.
In this example, .ERRDEF ensures that SYMBOL is not defined before entering the blocks, and .ERRNDEF ensures that you defined SYMBOL somewhere within the blocks.
.ERRDEF    SYMBOL
IFDEF      CONFIG1
           .
           .   SYMBOL EQU 0
           .
ENDIF
IFDEF      CONFIG2
           .
           .  SYMBOL  EQU 1
           .
ENDIF
.ERRNDEF    SYMBOL