Texas Instruments TMS320C2XX User Manual

Page 311

Advertising
background image

SFR

Shift Accumulator Right

7-158

Syntax

SFR

Operands

None

Opcode

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

0

1

0

1

0

0

0

0

0

1

1

1

1

1

0

1

Execution

Increment PC, then ...
If SXM = 0

Then 0

ACC(31).

If SXM = 1

Then (ACC(31))

ACC(31)

(ACC(31:1))

ACC(30:0)

(ACC(0))

C

Status Bits

Affected by

Affects

SXM

C

Description

The SFR instruction shifts the accumulator right one bit.

-

If SXM = 1, the instruction produces an arithmetic right shift. The sign bit
(MSB) is unchanged and is also copied into bit 30. Bit 0 is shifted into the
carry bit (C).

-

If SXM = 0, the instruction produces a logic right shift. All of the accumula-
tor bits are shifted right by one bit. The least significant bit is shifted into
the carry bit, and the most significant bit is filled with a 0.

Words

1

Cycles for a Single SFR Instruction

ROM

DARAM

SARAM

External

1

1

1

1+p

Cycles for a Repeat (RPT) Execution of an SFR Instruction

ROM

DARAM

SARAM

External

n

n

n

n+p

Cycles

Advertising