Left Shifts (Asl16–Asl19) - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

Software Techniques
MOVE
MOVE
8.2.5.2
Left Shifts (ASL16–ASL19)
For arithmetic left shifts there is a faster way to shift an accumulator for large shift counts. The following
code shows how to perform arithmetic left shifts of 16 through 19 bits on an accumulator. This emulation
works without destroying any registers on the chip. If desired, it is possible to use this technique for bit
shifts greater than 19, but it is not possible for shifts of 15 or fewer bits without losing information.
; ASL16 Operation
; Emulated in 4 Icyc, 4 Instruction Words
PUSH
MOVE
POP
; ASL17 Operation
; Emulated in 5 Icyc, 5 Instruction Words
ASL
PUSH
MOVE
POP
; ASL18 Operation
; Emulated in 6 Icyc, 6 Instruction Words
ASL
ASL
PUSH
MOVE
POP
; ASL19 Operation
; Emulated in 7 Icyc, 7 Instruction Words
ASL
ASL
ASL
PUSH
MOVE
POP
8-12
A1,A0
; (Assumes EXT contains sign extension)
A2,A1
A1
; (PUSH is a 2-word, 2 Icyc macro)
A0,A
A2
A
A1
; (PUSH is a 2-word, 2 Icyc macro)
A0,A
A2
A
A
A1
; (PUSH is a 2-word, 2 Icyc macro)
A0,A
A2
A
A
A
A1
; (PUSH is a 2-word, 2 Icyc macro)
A0,A
A2
DSP56800 Family Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents