SPRU513Y August 2001 – June 2022 SM320F28335-EP
The $defined directive returns true/1 or false/0 depending on whether the name exists in the current substitution symbol table or the standard symbol table. In essence $defined returns TRUE if the assembler has any user symbol in scope by that name. This differs from $isdefed in that $isdefed only tests for NON-substitution symbols. The syntax is:
$defined( substitution symbol name )
A statement such as ".if $defined(macroname)" is then similar to the C code "#ifdef macroname".
See Section 14.5.2 and Section 14.5.3 for the use of .define and .undef in assembly.