;; Copyright 1986 by NeXT Inc. ;; Author - John Strawn ;; ;; Modification history ;; -------------------- ;; 06/15/87/jms - initial file created from DSPAPSRC/template ;; 09/20/87/jms - added test for cnt=0; double up accumulators to ;; increase execution speed; cosmetic changes to code; ;; added more rigorous tests to tvneg.asm ;; 02/23/88/jms - cosmetic changes to code and documentation ;; ;; ------------------------------ DOCUMENTATION --------------------------- ;; NAME ;; vneg (AP macro) - vector negate - fill vector with neg of vector ;; ;; SYNOPSIS ;; include 'stdmacros' ; load standard DSP macro package ;; vneg pf,ic,sinp,ainp0,iinp0,sout,aout0,iout0,cnt0 ; invoke ap macro vneg ;; ;; MACRO ARGUMENTS ;; pf = global label prefix (any text unique to invoking macro) ;; ic = instance count (such that pf\_vneg_\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 vneg array-processor macro computes the twos-complement negative ;; of every element of the input array, and copies those ;; negatives 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