ARS - arithmetic right shift.

Alternate Entry Name: .ARS

Usage:

B:
   shifted = ars( word, count );
/* C users use >> operator on signed quantity */

Where:

word
is a word containing the value to be shifted.
count
is the number of positions to shift.

Description:

ARS arithmetically shifts "word" right by "count" bits and returns the result. Thus the effect is the same as

word>>count

except that the sign bit of "word" is replicated through all vacated bits.

Copyright © 1996, Thinkage Ltd.