Shift Operations
2-46
11. Shift Operations (Continued)
Operation Type
Illustration
Logical left shift of AH or AL.
The last
bit to be shifted out fills the carry bit (C).
Syntaxes:
LSL A
X
,
1...16
LSL A
X
, T (shift = T(3:0))
Note: If T(3:0) = 0, indicating a shift of 0,
C is cleared.
Shift left
0
AH/AL to 16 LSBs
16 LSBs to AH/AL
C
Last
bit out
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.
Shift right
ACC
32 bits to ACC
0/Sign
SXM
C Last
bit out
Discard
other bits
Logical right shift of AH or AL.
The last
bit to be shifted out fills the carry bit (C).
Syntaxes:
LSR A
X
,
shift
LSR A
X
, 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.
Shift right
AH/AL to 16 LSBs
16 LSBs to AH/AL
0
C Last
bit out
Discard
other bits
Arithmetic right shift of AH or AL.
The
last bit to be shifted out fills the carry bit
(C). Syntaxes:
ASR A
X
,
shift
ASR A
X
, T
Note: If T(4:0) = 0, indicating a shift of 0,
C is cleared.
Shift right
C
AH/AL to 16 LSBs
Sign
16 LSBs to AH/AL
Last
bit out
Discard
other bits
Rotate ACC left by 1 bit.
Bit 31 of ACC
fills the carry bit (C). C fills bit 0 of ACC.
Syntax:
ROL
ACC
Rotate left
ACC
32 bits to ACC
C
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...