Shift Operations
2-46
Table 2−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 AX, 1...16
LSL AX, 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 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.
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 AX, shift
ASR AX, 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