File: highlight.asm-dsp56k.fold

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (56 lines) | stat: -rw-r--r-- 1,595 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
* initialization
n       equ   20
start   equ   $40
wddr    equ   $0
cddr    equ   $0
input   equ   $ffe0
output  equ   $ffe1
;
        org   p:start
        move  #wddr,r0  ;r0 ¬ samples
        move  #cddr,r4  ;r1 ¬ coefficients
        move  #n-1,m0   ;set modulo arithmetic
        move  m0,m4     ;for the 2 circular buffers
;
        opt   cc
;       filter loop :8+(n-1) cycles

        movep y:input,x: (r0)              ;input sample in memory
        clr   a                x:(r0)+,x0  y: (r4)+,y0
        rep   #n-1
        mac   x0,y0,a          x:(r0)+,x0  y:(r4)+,y0
        macr  x0,x0,a          (r0)-

        movep a,y:output                   ;output filtered sample

fftr2a macro points,data,coef
fftr2a: ident 1,1

        move #points/2,n0  ;initialize butterflies per group
        move #1,n2         ;initialize groups per pass
        move #points/4,n6  ;initialize C pointer offset
        move #-1,m0        ;initialize A and B address modifiers
        move m0,m1         ;for linear addressing
        move m0,m4
        move m0,m5
        move #0,m6         ;initialize C address modifier for
                           ;reverse carry (bit-reversed) addressing

        do   #@cvi (@log(points)/@log(2)+0.5),_end_pass
        move #data,r0       ;initialize A input pointer
        move r0,r4          ;initialize A output pointer

_end_bfy
        move a,x:(r5)+n5 y:(r1)+n1,y1

end_cell
        rnd a
        movep #0,x:$fffe
        dc @sin(@cvf(count)*freq)
        move #twiddle,r2

        MOVE L:<$1,A
        SUB X,A L:<$3,B

 bad_label
 good_label: