Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TMS320C2x DSP - syntax [<label>] sfr http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX      [<LABEL>] SFR

OPERANDS    None

EXECUTION   TMS32020
                  (PC) + 1 . PC
                  If SXM = 0, then (ACC(31-1)) . ACC(30-0)
                        and 0 . ACC(31).
                  If SXM = 1, then (ACC(31-1)) . ACC(30-0)
                        and (ACC(31)) . ACC(31).
                  Affected by SXM bit.

            TMS320C25
                  (PC) + 1 . PC
                  If SXM = 0, then (ACC(0)) . C,
                        (ACC(31-1)) . ACC(30-0) and 0 . ACC(31).
                  If SXM = 1, then (ACC(0)) . C,
                        (ACC(31-1)) . ACC(30-0),
                        and (ACC(31)) . ACC(31).
                  Affects C; affected by SXM bit.

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 logical right shift.
            All of the accumulator bits are shifted by one bit to the
            right. The least-significant is shifted into the carry bit,
            and the most significant bit is filled with a zero.

            On the TMS32020, note that bit 0 is lost.

WORDS       1

ENCODING    15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
            +-----------------------------------------------+
            |1  1  0  0  1  1  1  0  0  0  0  1  1  0  0  1 |
            +-----------------------------------------------+

CYCLES

            +------------------------------------------------+
            |    Cycle Timings for a Single Instruction      |
            |------------------------------------------------|
            | PI/DI | PI/DE | PE/DI | PE/DE  | PR/DI | PR/DE |
            |-------+-------+-------+--------+-------+-------|
      '20   |   1   |   1   |  1+p  |  1+p   |   -   |   -   |
            |-------+-------+-------+--------+-------+-------|
     'C25   |   1   |   1   |  1+p  |  1+p   |   1   |   1   |
            |------------------------------------------------|
            |    Cycle Timings for a Repeat Instruction      |
            |------------------------------------------------|
      '20   |   n   |   n   |  n+p  |  n+p   |   -   |   -   |
            |-------+-------+-------+--------+-------+-------|
     'C25   |   n   |   n   |  n+p  |  n+p   |   n   |   n   |
            +------------------------------------------------+



EXAMPLE     SFR               (SXM = 0)

                     BEFORE             AFTER

            ACC X >B0001234   ACC 0 >5800091A
                C                 C

EXAMPLE     SFR               (SXM = 1)

                     BEFORE             AFTER

            ACC X >B0001234   ACC 0 >D800091A
                C                 C

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson