gain_c55x.asm

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

ASM
24
字号
	.def _gain_c55x
_gain_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   *AR1<<16,AC0            ; get the sample from 'in_buffer'
    mpy   T0,AC0,AC1              ; multiply by the gain factor
    mov   rnd(hi(AC1)),*AR0       ; store it to the 'out' variable 
    
    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 + -
显示快捷键?