Ifgt, #Ifge - Panasonic PanaXSeries MN1030 Series User Manual

Panasonic microcomputer user's manual
Table of Contents

Advertisement

Chapter 10 Writing Assembler Control Statements

10.4.5 #ifgt, #ifge

Syntax
Syntax for #ifgt
#ifgt
[#else
#endif
Coding rules
#ifgt
If the value of expression is positive, block1 will be assembled. If it is not positive and an #else
directive has been coded, block2 will be assembled.
#ifge
If the value of expression is 0 or positive, block1 will be assembled. If it is negative and an #else
directive has been coded, block2 will be assembled.
Note that 0 is not included in positive numbers.
Usage example
A source file that uses #ifgt is shown below.
DEVICE
_TEXT
#ifgt
#else
#endif
#ifge
#else
#endif
200 Conditional Assembly
expression
block1
block2]
equ
1
section
CODE, PUBLIC, 1
DEVICE-1
mov
0x01, D0
mov
0x02, D0
DEVICE-1
mov
0x03, D1
mov
0x04, D1
Syntax for #ifge
expression
#ifge
block1
[#else
block2]
#endif

Advertisement

Table of Contents
loading

Table of Contents