adapt_c55x.asm

来自「用dsp解压mp3程序的算法」· 汇编 代码 · 共 27 行

ASM
27
字号
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; adapt_c55x.asm - C55x assembly routine for FIR filtering
;                  using the LMS algorithm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

	.def _adapt_c55x
	.text
	
_adapt_c55x
    sub		#2,T0 
    mov		T0,BRC0               ; repeat loop
    mov 	T1,hi(AC1)
    mpym 	*AR0,AC1,AC2          ; mu_err = mu * err
    mpym        *AR1,AC2,AC0          ; mu_err*xnbuf[i]
    mov         #0,AC1
    LMS         *AR2,*AR1,AC0,AC1     ; FIR filtering and addition for
                                      ; updation of coefficients   
    rptblocal loop_end-1  
    mov         hi(AC0),*AR2+ 
||  mpym	*AR1+,AC2,AC0
    LMS         *AR2,*AR1,AC0,AC1
loop_end     
         
     mov 	hi(AC0),*AR2          ; store the last updated coeff
     mov        rnd(hi(AC1)),*AR3     ; store the output of FIR filtering   
     ret
    .end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?