Texas Instruments TMS320C28x Reference Manual page 76

Dsp cpu and instruction set
Table of Contents

Advertisement

Shift Operations
Table 2−11. Shift Operations (Continued)
Operation Type
Logical left shift of AH or AL. The last
bit to be shifted out fills the carry bit (C).
Syntaxes:
LSL AX, 1...16
LSL AX, T (shift = T(3:0))
Note: If T(3:0) = 0, indicating a shift of 0,
C is cleared.
Right shift of ACC. If SXM = 0, a logical
shift is performed. If SXM = 1, an
arithmetic shift is performed. The last bit
to be shifted out fills the carry bit (C).
Syntaxes:
SFR ACC, 1...16
SFR ACC, T
Note: If T(3:0) = 0, indicating a shift of 0,
C is cleared.
Logical right shift of AH or AL. The last
bit to be shifted out fills the carry bit (C).
Syntaxes:
LSR AX, shift
LSR AX, T (shift = T(3:0))
ARLACC, T (shift = T(4:0)
Note: If T(4:0) = 0, indicating a shift of 0,
C is cleared.
Arithmetic right shift of AH or AL. The
last bit to be shifted out fills the carry bit
(C). Syntaxes:
ASR AX, shift
ASR AX, T
Note: If T(4:0) = 0, indicating a shift of 0,
C is cleared.
Rotate ACC left by 1 bit. Bit 31 of ACC
fills the carry bit (C). C fills bit 0 of ACC.
Syntax:
ROL
ACC
2-46
Illustration
Last
C
bit out
SXM
0/Sign
0
Sign
C
AH/AL to 16 LSBs
Shift left
16 LSBs to AH/AL
ACC
Shift right
32 bits to ACC
AH/AL to 16 LSBs
Shift right
16 LSBs to AH/AL
AH/AL to 16 LSBs
Shift right
16 LSBs to AH/AL
ACC
Rotate left
32 bits to ACC
0
Last
C
bit out
Discard
other bits
Last
C
bit out
Discard
other bits
Last
C
bit out
Discard
other bits

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF