📄 int_lsf.asm
字号:
*****************************************************************************
** Description: Int_lsf() in Int_lsf.c **
** **
** Inputs **
** **
** xar2---Word16 lsf_old[] **
** xar3---Word16 lsf_new[] **
** ar5---Word16 i_subfr **
** **
** Outputs: **
** **
** xar4---Word16 lsf_out[] **
** **
** Return value : **
** **
** Attribute : Cycles: 40 Pm: 388 **
** Modified Registers: acc,p,t,ar0,xar2-4 **
** **
** Programmer : YANG zhiwei **
*****************************************************************************
.global _Int_lsf
.ref M
_Int_lsf:
mov ar0,#M-1 ;M loops
cmp ar5,#0 ;index = 0 ?
bf _line_86,neq ;index <> 0 ,jump to _line_86
_loop_81:
mov al,*xar2++ ;al = lsf_old[i]
mov ah,al
asr al,#2 ;al = shr(lsf_old[i], 2)
sub ah,al ;ah = sub(lsf_old[i], shr(lsf_old[i], 2))
mov al,*xar3++ ;al = lsf_new[i]
asr al,#2 ;al = shr(lsf_new[i], 2)
add ah,al ;ah = add(sub(lsf_old[i], shr(lsf_old[i], 2)), shr(lsf_new[i], 2))
mov *xar4++,ah ;lsf_out[i] = ah
banz _loop_81,ar0--
lretr
_line_86:
cmp ar5,#40 ;index = 40 ?
bf _line_94,neq ;if ( index <> 40 ) jump to _line_94
_loop_89:
mov al,*xar2++ ;al = lsf_old[i]
asr al,#1 ;al = shr(lsf_old[i],1)
mov ah,*xar3++ ;ah = lsf_new[i]
asr ah,#1 ;ah = shr(lsf_new[i], 1)
add ah,al ;ah = add(shr(lsf_old[i],1), shr(lsf_new[i], 1) )
mov *xar4++,ah ;lsf_out[i] = ah
banz _loop_89,ar0--
lretr
_line_94:
cmp ar5,#80 ;index = 80 ?
bf _line_102,neq ;if ( index <> 80 ) jump to _line_102
_loop_97:
mov al,*xar3++ ;al = lsp_new[i]
mov ah,al
asr al,#2 ;al = shr(lsf_new[i], 2)
sub ah,al ;ah = sub(lsf_new[i], shr(lsf_new[i], 2))
mov al,*xar2++ ;al = lsp_old[i]
asr al,#2 ;al = shr(lsf_old[i], 2)
add ah,al ;ah = add(shr(lsf_old[i], 2), sub(lsf_new[i], shr(lsf_new[i], 2)))
mov *xar4++,ah ;lsf_out[i] = ah
banz _loop_97,ar0--
lretr
_line_102:
cmp ar5,#120 ;index = 120 ?
bf _line_110,neq ;if ( index <> 120 ) jump to _line_110
_loop_105:
mov al,*xar3++ ;al = lsf_new[i]
mov *xar4++,al ;lsp_out[i] = al
banz _loop_105,ar0--
_line_110:
lretr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -