176
5-14-14ROTATE RIGHT: ROR(063)
(063)
ROR Wd
Wd: Word CIO, G, A, DM, DR, IR
Operand Data AreaLadder Symbol
Variations
j ROR(063)
When the execution condition is OFF, ROR(063) is not executed. When the ex-
ecution condition is ON, ROR(063) shifts all Wd bits one bit to the right, shifting
CY into bit 15 of Wd and shifting bit 00 of Wd into CY.
0 1 0 1 0100011100010
Bit
15
CY
Bit
00
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 ROR(063).
Note Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of *DM word is not BCD when set for BCD.
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.
Example When CIO 000000 is ON in the following example, the status of CY is shifted into
bit 15 of D00010, the status of all bits within D00010 are shifted right one posi-
tion, and the status of bit 00 is shifted to CY.
Address Instruction Operands
00000 LD 000000
00001 ROR(063)
D00010
0
CY LSBMSB
1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1
0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1
1
CY LSBMSB
Wd: D00010
Description
Precautions
Shift Instructions Section 5-14
0000
00
(063)
ROR D00010