12.07.2015 Views

MAXQ Core Assembly Guide - Maxim

MAXQ Core Assembly Guide - Maxim

MAXQ Core Assembly Guide - Maxim

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MAXQ</strong> <strong>Core</strong> <strong>Assembly</strong> <strong>Guide</strong>#ifdef DirectiveThis directive is one of the three that can be used to begin a conditional assembly block. There are two equivalentsyntaxes for this directive, either:ifdef identifieror#ifdef identifierIn either case, the behavior of this directive depends on whether or not is currently defined (has beendefined with #define and has not been undefined with #undefine), as follows.• If the identifier is currently defined:o All code following the #ifdef directive until the next #elseif, #else or #endif directive will be excluded.o If the next directive encountered is #endif, the conditional assembly block is complete.o If the next directive encountered is #elseif, that directive will be evaluated as described below.o If the next directive encountered is #else, all code following that directive will be included until the#endif directive is reached, at which point the conditional assembly block is complete.• If the identifier is currently undefined:o All code following the #ifdef directive until the next #elseif, #else of #endif directive will be included.o If the next directive encountered is #endif, the conditional assembly block is complete.o If the next directive encountered is #else or #elseif, this directive and all following code statements anddirectives will be excluded and ignored until the next #endif directive is reached, at which point theconditional assembly block is complete.#ifndef DirectiveThis directive is one of the three that can be used to begin a conditional assembly block. There are two equivalentsyntaxes for this directive, either:ifndef identifieror#ifndef identifierIn either case, the behavior of this directive depends on whether or not is currently defined (has beendefined with #define and has not been undefined with #undefine), as follows.• If the identifier is currently undefined:o All code following the #ifdef directive until the next #elseif, #else or #endif directive will be excluded.o If the next directive encountered is #endif, the conditional assembly block is complete.o If the next directive encountered is #elseif, that directive will be evaluated as described below.o If the next directive encountered is #else, all code following that directive will be included until the#endif directive is reached, at which point the conditional assembly block is complete.• If the identifier is currently defined:o All code following the #ifdef directive until the next #elseif, #else of #endif directive will be included.o If the next directive encountered is #endif, the conditional assembly block is complete.o If the next directive encountered is #else or #elseif, this directive and all following code statements anddirectives will be excluded and ignored until the next #endif directive is reached, at which point theconditional assembly block is complete.Note: Only identifiers defined with the #define directive are “defined” for the purpose of these directives. Identifiersdefined as equates, macros or labels will be treated as “undefined” when evaluated by #ifdef and #ifndef.Version 1.2 35 of 43 March 7, 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!