Forced Termination Of Macro Expansion (Exitm) - Panasonic PanaXSeries MN1030 Series User Manual

Panasonic microcomputer user's manual
Table of Contents

Advertisement

11.6 Forced Termination of Macro Expansion
(exitm)
Syntax
macro_name
#ifndef
#endif
Functional description
The exitm directive forcibly terminates macro expansion at the point it appears. Used in conjunction
with an #ifndef directive, it can end macro expansion if an identifier is undefined. If the identifier has
been defined, expansion beyond #endif will be performed. (The conditions are reversed when #ifdef is
used.)
Coding rules
In addition to #ifdef–#endif, all directives listed in chapter 10 "Writing Assembler Control Statements"
section 10.5, "Conditional Assembly", can be used.
The exitm directive can be used at any location. The assembler will terminate macro expansion after it
appears.
The exitm directive can only be used within macro definitions.
Usage example
Usage example with #ifb directive
A source file is shown below. The identifier TEST is used for the condition. In main the first macro call
is made with TEST undefined. This causes exitm to be executed, so jsr debug will not be expanded.
TEST is defined before the second macro call, so here the statements after #endif will be assembled.
parameter
macro
identifier
exitm
.
.
.
endm
Chapter 11 Writing Macro Control Statements

Forced Termination of Macro Expansion (exitm) 215

Advertisement

Table of Contents
loading

Table of Contents