Chapter 10 Writing Assembler Control Statements
198 Conditional Assembly
10.4.4 #iflt, #ifle
Syntax
Syntax for #iflt Syntax for #ifle
#iflt expression #ifle expression
block1 block1
[#else [#else
block2] block2]
#endif #endif
Functional description
#iflt
If the value of expression is negative, block1 will be assembled. If it is not negative and an #else
directive has been coded, block2 will be assembled.
#ifle
If the value of expression is 0 or negative, block1 will be assembled. If it is positive and an #else
directive has been coded, block2 will be assembled.
Usage example
The first example will be of #iflt. A source file is shown below. The "size-16" expression of the #iflt is
not negative, so block 2 is assembled
MNXXX equ 32
;
dsize macro size
#iflt size- 32
mov 0x01, D0
#else mov 0x02, D0
#endif endm
_TEXT section CODE, PUBLIC, 1
dsize MNXXX