ROR

ROR Rotate One Bit Right Through the Carry Bit (DALU) ROR

Operation

Assembler Syntax

(Dn[39–1]>>>1)Dn[38–0]

ROR Dn

C → Dn[39]

 

Dn[0] → C

 

Description

 

ROR Dn

Rotates the contents of a data register (Dn) one bit to the right. The carry bit C is shifted to bit 39, bit 0 is copied to the carry bit, and bits [39:1] are copied to bits [38:0].

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

39

32 31

 

16 15

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[0]

C

The carry bit is copied into Dn[39].

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Set if bit 0 in the data register was one before rotation. Cleared if bit

 

 

0 in the data register was zero before rotation.

Ln

L

Clears the Ln bit in the destination register.

Example

ror d15

Register/Memory Address

SR

L15:D15

Before

$00E0 0000

$0:$FF A000 0005

After

$00E0 0001

$0:$7F D000 0002

A-364

SC140 DSP Core Reference Manual

Page 678
Image 678
Freescale Semiconductor SC140 Ror d15, Dn39-11 → Dn38-0, → Dn39 Dn0 → C, ROR Dn, SR0 Carry bit is copied into Dn39