Chapter 10 Writing Assembler Control Statements

The table below lists the conditional assembly directives.

Directive

Condition for selecting block1

Condition for selecting block2

 

 

 

 

 

#ifdef

Identifier has been defined by #define.

Identifier has not been defined.

 

 

 

 

 

#ifndef

Identifier has not been defined by #define.

Identifier has been defined.

 

 

 

 

 

#if

Expression value is not 0.

Expression value is 0.

 

 

 

 

 

#ifn

Expression value is 0.

Expression value is not 0.

 

 

 

 

 

#ifeq

Parameters 1 and 2 are the same string.

Parameters 1 and 2 are not the same string.

 

(see note)

 

 

 

 

 

 

 

#ifneq

Parameters 1 and 2 are not the same string.

Parameters 1 and 2 are the same string.

 

(see note)

 

 

 

 

 

 

 

#iflt

Expression value is negative.

Expression value is not negative.

 

 

 

 

 

#ifle

Expression value is 0 or negative.

Expression value is not 0 and not negative.

 

 

 

 

 

#ifgt

Expression value is positive.

Expression value is not positive.

 

 

 

 

 

#ifge

Expression value is 0 or positive.

Expression value is not 0 and not positive.

 

 

 

 

 

#ifb

Parameter is the null character.

Parameter is not the null character.

 

(see note)

 

 

 

 

 

 

 

#ifnb

Parameter is not the null character.

Parameter is the null character.

 

(see note)

 

 

 

 

 

 

 

 

 

 

 

 

NOTE:

These directives can be used only within macro definitions

 

 

 

 

 

190 Conditional Assembly

Page 202
Image 202
Panasonic MN1030 user manual Table below lists the conditional assembly directives