Other instructions, Stc/clc, Applicable program areas flags function – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 434: Hint, 2 instructions
2 Instructions
2-398
CP1E CPU Unit Instructions Reference Manual(W483)
Other Instructions
STC/CLC
Applicable Program Areas
Flags
Function
STC
When the execution condition is ON, STC(040) turns ON the Carry Flag (CY). Although STC(040) turns
the Carry Flag ON, the flag will be turned ON/OFF by the execution of subsequent instructions which
affect the Carry Flag.
ROL(027) and ROR(028) make use of the Carry Flag in their rotation shift operations.
CLC
When the execution condition is ON, CLC(040) turns OFF the Carry Flag (CY). Although CLC(040)
turns the Carry Flag OFF, the flag will be turned ON/OFF by the execution of subsequent instructions
which affect the Carry Flag.
+C(402), +CL(403), +BC(406), +BCL(407), -C(412), -CL(413), -BC(416), and -BCL(417) make use of
the Carry Flag in their addition operations. Use CLC(041) just before any of these instructions to pre-
vent any influence from other preceding instructions.
ROL(027) and ROR(028) make use of the Carry Flag in their rotation shift operations.
Hint
The +(400), +L(401), +B(404), +BL(405), -(410), -L(411), -B(414), and -BL(415) instructions do no
include the Carry Flag in their addition and subtraction operations. In general, use these instructions
when performing addition or subtraction.
Instruction
Mnemonic
Variations
Function
code
Function
SET CARRY
STC
@STC
040
Sets the Carry Flag (CY).
CLEAR CARRY
CLC
@CLC
041
Turns OFF the Carry Flag (CY).
Symbol
STC
CLC
Area
Step program areas
Subroutines
Interrupt tasks
Usage
OK
OK
OK
Operand
Description
Data type
STC
CLC
Carry Flag
P_CY
ON
OFF
STC(040)
CLC(041)