Chapter 10 Writing Assembler Control Statements

10.4.2 #if, #ifn

Syntax

Syntax for #if

 

Syntax for #ifn

#if

expression

#ifn

expression

 

block1

 

block1

[#else

block2]

[#else

block2]

 

 

#endif

 

#endif

 

Functional description

#if

If the value of expression is not 0, block1 will be assembled. If it is 0 and an #else directive has been coded, block2 will be assembled.

#ifn

If the value of expression is 0, block1 will be assembled. If it is not 0 and an #else directive has been coded, block2 will be assembled.

Coding rules

These directives can be used within macro definitions and wherever machine language instructions can be coded.

Conditional Assembly 193

Page 205
Image 205
Panasonic MN1030 user manual 10.4.2 #if, #ifn, Syntax for #if Syntax for #ifn