Chapter 17 Appendix

17.4 List of Assembler Control Statements

This section provides a list of assembler control statements.

 

Syntax

Function & Notes

 

 

 

#include

“file_name

Reads in the source file specified by file_name.

 

 

 

#define

identifier[replacement_string]

Replaces the identifier with the replacement_string.

 

 

 

#undef

identifier

Purges the identifier previously defined by #define.

 

 

 

#ifdef

identifier

Assembles block1 if the identifier was defined before

 

block1

the #ifdef statement.

[#else

 

Assembles block2 if it was not defined (nothing will be

#endif

block2]

assembled if there is no #else).

 

 

 

 

 

#ifndef

identifier

Assembles block1 if the identifier was defined before

 

block1

the #ifdef statement.

[#else

 

Assembles block2 if it was not defined (nothing will be

#endif

block2]

assembled if there is no #else.

 

 

 

 

 

#if

expression

Assembles block1 if the expression is not 0.

 

block1

 

[#else

 

Assembles block2 if it is 0 (nothing will be assembled

#endif

block2]

if there is no #else).

 

 

 

 

 

#ifn

expression

Assembles block1 if the expression is 0.

 

block1

 

[#else

 

Assembles block2 if it is not 0 (nothing will be

 

block2]

assembled if there is no #else).

 

#endif

 

 

 

 

#ifeq

parameter1, parameter2

Assembles block1 if parameter1 and parameter2 are

 

block1

equal. Assembles block2 if they are not equal (nothing

[#else

 

will be assembled if there is no #else). At least one or

block2]

the other of parameter1 and parameter2 must be a

 

#endif

dummy parameter within a macro definition. #ifeq can

 

 

only be used within macro definitions.

 

 

 

 

 

#ifneq

parameter1, parameter2

Assembles block1 if parameter1 and parameter2 are

 

block1

equal. Assembles block2 if they are not equal (nothing

[#else

 

will be assembled if there is no #else). At least one or

block2]

the other of parameter1 and parameter2 must be a

 

#endif

dummy parameter within a macro definition. #ifneq

 

 

can only be used within macro definitions.

 

 

 

 

 

List of Assembler Control Statements 321

Page 333
Image 333
Panasonic MN1030 List of Assembler Control Statements, This section provides a list of assembler control statements