Warning, /frameworks/syntax-highlighting/autotests/input/highlight.asm-dsp56k is written in an unsupported language. File is not indexed.

0001 * initialization
0002 n       equ   20
0003 start   equ   $40
0004 wddr    equ   $0
0005 cddr    equ   $0
0006 input   equ   $ffe0
0007 output  equ   $ffe1
0008 ;
0009         org   p:start
0010         move  #wddr,r0  ;r0 ¬ samples
0011         move  #cddr,r4  ;r1 ¬ coefficients
0012         move  #n-1,m0   ;set modulo arithmetic
0013         move  m0,m4     ;for the 2 circular buffers
0014 ;
0015         opt   cc
0016 ;       filter loop :8+(n-1) cycles
0017 
0018         movep y:input,x: (r0)              ;input sample in memory
0019         clr   a                x:(r0)+,x0  y: (r4)+,y0
0020         rep   #n-1
0021         mac   x0,y0,a          x:(r0)+,x0  y:(r4)+,y0
0022         macr  x0,x0,a          (r0)-
0023 
0024         movep a,y:output                   ;output filtered sample
0025 
0026 fftr2a macro points,data,coef
0027 fftr2a: ident 1,1
0028 
0029         move #points/2,n0  ;initialize butterflies per group
0030         move #1,n2         ;initialize groups per pass
0031         move #points/4,n6  ;initialize C pointer offset
0032         move #-1,m0        ;initialize A and B address modifiers
0033         move m0,m1         ;for linear addressing
0034         move m0,m4
0035         move m0,m5
0036         move #0,m6         ;initialize C address modifier for
0037                            ;reverse carry (bit-reversed) addressing
0038 
0039         do   #@cvi (@log(points)/@log(2)+0.5),_end_pass
0040         move #data,r0       ;initialize A input pointer
0041         move r0,r4          ;initialize A output pointer
0042 
0043 _end_bfy
0044         move a,x:(r5)+n5 y:(r1)+n1,y1
0045 
0046 end_cell
0047         rnd a
0048         movep #0,x:$fffe
0049         dc @sin(@cvf(count)*freq)
0050         move #twiddle,r2
0051 
0052         MOVE L:<$1,A
0053         SUB X,A L:<$3,B
0054 
0055  bad_label
0056  good_label: