Motorola DSP56800 Manual page 382

16-bit digital signal processor
Table of Contents

Advertisement

ROL
Operation:
(see following figure)
C
Description: Logically shift 16 bits of the destination operand (D) 1 bit to the left, and store the result in the desti-
nation. If the destination is a 36-bit accumulator, the result is stored in the MSP of the accumulator (A1
or B1), and the remaining portions of the accumulator (A2, B2, A0, and B0) are not modified. The
MSB of the destination (bit 31 if the destination is a 36-bit accumulator) prior to the execution of the
instruction is shifted into C, and the previous value of C is shifted into the LSB of the destination (bit
16 if the destination is a 36-bit accumulator).
Example:
ROL
Before Execution
F
0000
B2
B1
SR
0001
Explanation of Example:
Prior to execution, the 36-bit A accumulator contains the value $F:0001:00AA. Execution of the
ROL A instruction shifts the 16-bit value in the A1 register 1 bit to the left, shifting bit 31 into C, ro-
tating C into bit 16, and storing the result back in the A1 register.
A-152
Rotate Left
Unch.
D2
D1
A
00AA
B0
DSP56800 Family Manual
Assembler Syntax:
ROL
D
Unchanged
D0
; rotate A1 left 1 bit
After Execution
F
0001
B2
B1
SR
0000
ROL
(parallel move)
00AA
B0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents