Rotate Left: Rol(062) - Omron CVM1D Operation Manual

Hide thumbs Also See for CVM1D:
Table of Contents

Advertisement

Shift Instructions

5-14-13 ROTATE LEFT: ROL(062)

Ladder Symbol
Variations
j ROL(062)
Description
Precautions
Flags
Example
0000
00
(062)
ROL
Wd
When the execution condition is OFF, ROL(062) is not executed. When the ex-
ecution condition is ON, ROL(062) shifts all Wd bits one bit to the left, shifting CY
into bit 00 of Wd and shifting bit 15 of Wd into CY.
CY
0
Use STC(078) to set CY to 1 or CLC(079) to set CY to 0 if necessary before do-
ing a rotate operation to ensure that CY contains the proper status before ex-
ecuting ROL(062).
Note Refer to page 101 for general precautions on operand data areas.
Content of *DM word is not BCD when set for BCD.
ER (A50003):
CY (A50004):
Receives the status of bit 15 from Wd.
EQ (A50006):
Content of Wd is 0 after execution.
N (A50008):
Same status as bit 15 of Wd after execution.
When CIO 000000 is ON in the following example, the status of CY is shifted into
bit 00 of D00010, the status of all bits within D00010 are shifted left one position,
and the status of bit 15 is shifted to CY.
(062)
ROL D00010
CY
0
CY
1
Operand Data Area
Wd: Word
CIO, G, A, DM, DR, IR
Bit
15
1 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1
Wd: D00010
MSB
1 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1
MSB
0 1 1 0 0 1 1 1 0 0 0 1 1 0 1 0
Section 5-14
Bit
00
Address Instruction
Operands
00000
LD
000000
00001
ROL(062)
D00010
LSB
LSB
163

Advertisement

Table of Contents
loading

Table of Contents