; IIR7 Filter Test Program ; include 'iir7' nsec equ 2 ;number of biquad sections org x:$100 states ds 2*nsec ;filter states org y:0 coef dc .7114114/2.0,-1.286688/2.0 ;a12,a11 dc -1.0/2.0,0.0/2.0 ;b12,b11 dc .8069339/2.0,-1.641678/2.0 ;a22,a21 dc -1.0/2.0,0.0/2.0 ;b22,b21 gain dc .0299546 ;G org p:$100 start ; FILTER LOOP move a,y0 ;get input into y0 move y:gain,x0 ;get gain into x0 mpy x0,y0,a ;multiply input by gain move #states,r0 ;r0 points to filter states move #coef,r4 ;r4 points to filter coefficients iir7 nsec ;do cascaded biquads nop ;let mode change back nop