init_filter macro ; This macro initializes the filter for sample processing. ; for left channel ; states_1 = Location of filter states in X memory ; coef_1 = Location of filter coefficients in Y memory ; ntaps_1 = Number of Taps ; move #states_1,r1 ;point to filter states move #ntaps_1-1,m1 ;mod(taps) defines array for circular buffer move #coef_1,r4 ;point to filter coefficients move #ntaps_1-1,m4 ;mod(taps) defines array for circular buffer endm process_filter macro ;This macro performs the convolutional algorithm ;for Digital Filtering ; ;************************************************************************************ ; ; Right Channel (Right Output Signal = Input Signal) ; ;************************************************************************************ move x0,b ;************************************************************************************ ; ; Left Channel (Left Output Signal = Output of FIR Filter) ; ;************************************************************************************ clr a x0,x:(r1)+ y:(r4)+,y0 do #ntaps_1-1,_end mac x0,y0,a x:(r1)+,x0 y:(r4)+,y0 _end macr x0,y0,a (r1)- endm