Download 78K0 Coding - Renesas Electronics

Transcript
CubeSuite+ V1.01.00
CHAPTER 4 ASSEMBLY LANGUAGE SPECIFICATIONS
[Application example]
- Example 1
text0
$
IF ( SW1 )
; (1)
text1
$
ELSE
; (2)
text2
$
ENDIF
; (3)
:
END
(1) The value of switch name "SW1" has been set to true or false with the SET or RESET control instruction
described in "text0".
If the value of switch name "SW1" is true, statements in "text1" will be assembled and statements in
"text2" will not be assembled.
(2) If the value of switch name "SW1" in (1) is false, statements in "text1" will not be assembled and statements in "text2" will be assembled.
(3) This instruction indicates the end of the source statement range for conditional assembly.
- Example 2
text0
$
IF ( SW1 : SW2 )
; (1)
text1
$
ELSEIF ( SW3 )
$
ELSEIF ( SW4 )
; (2)
text2
; (3)
text3
$
ELSE
$
ENDIF
; (4)
text4
; (5)
:
END
(1) The values of switch names "SW1", "SW2", and "SW3" have been set to true or false with the SET or
RESET control instruction described in "text0".
If the value of switch name "SW1" or "SW2" is true, statements in "text1" will be assembled and statements in "text2", "text3", and "text4" will not be assembled.
If the values of switch names "SW1" and "SW2" are false, statements in "text1" will not be assembled and
statements after (2) will be conditionally assembled.
(2) If the values of switch names "SW1" and "SW2" in (1) are false and the value of switch name "SW3" is true,
statements in "text2" will be assembled and statements in "text1", "text3", and "text4" will not be assembled.
R20UT0782EJ0100 Rev.1.00
Oct 01, 2011
Page 428 of 836