iir_c55x.asm
来自「用dsp解压mp3程序的算法」· 汇编 代码 · 共 36 行
ASM
36 行
.def _iir_c55x
_iir_c55x
pshm ST1_55 ; save ST1, ST2, and ST3
pshm ST2_55
pshm ST3_55
or #0x340,mmap(ST1_55) ; set FRCT,SXMD,SATD
bset SMUL
bset SATA
mov *AR0<<16,AC0 ; get the value of 'out'
masm *AR2+,*AR3+,AC0 ; out-= DEN[j][1] * delay[1+(j*section)]
masm *AR2,*AR3-,AC0 ; out-DEN[j][2]*delay[2+(j*section)]
mov *AR3-,T0 ; save the value of delay[1+(j*section)]
mov rnd(hi(AC0)),*AR3 ; delay[j*section]=out-DEN[j][2]*delay[2+(j*section)]
mov *AR3+,T1 ; save the value of delay[(j*section)]
mov AC0,AC1
mov #0,AC0
macm *AR1+,*AR3+,AC0 ; delay[1+(j*section)]*NUM[j][1]
add AC1,AC0 ; out=delay[(j*section)] + delay[1+(j*section)]*NUM[j][1]
macm *AR1,*AR3,AC0 ; out=out+delay[2+(j*section)]*NUM[j][2]
mov T0,*AR3- ; delay[2+(j*section)]=delay[1+(j*section)]
mov T1,*AR3 ; delay[1+(j*section)]=delay[(j*section)]
mov rnd(hi(AC0)),*AR0 ; save the value of 'out'
BCLR FRCT
BCLR SATD
BCLR SXMD
BCLR SATA
BCLR SMUL
popm ST3_55 ; restore ST1, ST2, and ST3
popm ST2_55
popm ST1_55
ret
.end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?