;; Copyright 1986 by NeXT Inc. ;; Author - John Strawn ;; ;; Modification history ;; -------------------- ;; 09/20/87/jms - initial file created from DSPAPSRC/template ;; 09/24/87/jos - changed name from vash to vasr ;; 02/23/88/jms - cosmetic changes to code and documentation ;; ;; ------------------------------ DOCUMENTATION --------------------------- ;; NAME ;; vasr (AP macro) - vector arithmetic shift right ;; - shift right (sign extended) each element of vector ;; ;; SYNOPSIS ;; include 'stdmacros' ; load standard DSP macro package ;; vasr pf,ic,sinp,ainp0,iinp0,sout,aout0,iout0,cnt0 ; invoke ap macro vasr ;; ;; MACRO ARGUMENTS ;; pf = global label prefix (any text unique to invoking macro) ;; ic = instance count (such that pf\_vasr_\ic is globally unique) ;; sinp = input vector memory space ('x' or 'y') ;; ainp0 = initial input vector memory address ;; iinp0 = initial increment for input vector address ;; sout = output vector memory space ('x' or 'y') ;; aout0 = initial output vector memory address ;; iout0 = initial increment for output vector address ;; cnt0 = initial element count ;; ;; DSP MEMORY ARGUMENTS ;; Access Description Initialization ;; ------ ----------- -------------- ;; x:(R_X)+ Source address ainp0 ;; x:(R_X)+ Source increment iinp0 ;; x:(R_X)+ Destination address aout0 ;; x:(R_X)+ Destination increment iout0 ;; x:(R_X)+ element count cnt0 ;; ;; DESCRIPTION ;; The vasr array-processor macro right-shifts every element of ;; the input array by one place (with sign extension), and copies ;; those shifted values to an output array. In pseudo-C notation: ;; ;; ainp = x:(R_X)+; ;; iinp = x:(R_X)+; ;; aout = x:(R_X)+; ;; iout = x:(R_X)+; ;; cnt = x:(R_X)+; ;; ;; for (n=0;n