LSR AX,#1...16
LSR AX,#1...16
SYNTAX OPTIONS
LSR AX,#1...16
Operands
AX
#1...16 Shift value
Description
Flags and
N
Modes
Z
C
Repeat
Example
; Divide index register AR0 by 2:
MOV
LSR
MOV
6-140
1111 1111 110A SHFT
Accumulator high (AH) or accumulator low (AL) register
Perform a logical right shift on the content of the specified AX register by the
amount given by the "shift value" field. During the shift, the high order bits of
the AX register are zero filled and the last bit to be shifted out is stored in the
carry flag bit:
0
After the shift, if bit 15 of AX is 1 then the negative flag bit is set; otherwise it is
cleared.
After the shift, if AX is 0, then the Z bit is set, otherwise it is cleared.
The last bit to be shifted out of AH or AL is stored in C.
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
AL,@AR0
AL,#1
@AR0,AL
OPCODE
AX
Right shift
(Immediate value)
AX
; Load AL with contents of AR0
; Scale result by 1 (/2)
; Store result back in AR0
Logical Shift Right
OBJMODE
RPT
CYC
X
−
1
Last bit out
C
Discard
other bits
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?