Arithmetic Shifts By A Fixed Amount; Right Shifts (Asr12–Asr20) - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

Software Techniques
8.2.5

Arithmetic Shifts by a Fixed Amount

Arithmetic shifts (left or right) by a fixed amount can be emulated with the ASRxx operations.
8.2.5.1
Right Shifts (ASR12–ASR20)
For arithmetic right shifts there is a faster way to shift an accumulator for large shift counts. The following
code shows how to perform arithmetic right shifts of 12 through 20 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 20, but it is not possible to use this technique for shifts of 11 or fewer bits without losing
information.
8-10
DSP56800 Family Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents