⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 int_lpc_1to3_2.asm

📁 基于TMS320F2812的AMR+RS编解码+OFDM调制解调源程序。是stand alone运行版本
💻 ASM
字号:
*****************************************************************************
** Description:  	Int_lpc_1to3_2() in int_lpc.c                          **
**                                                                         **
** Inputs                                                                  **
**                                                                         **
**   xar2---Word16 Az[]                                                    **
**   xar4---Word16 lsp_old[]                                               **
**   xar5---Word16 lsp_new[]                                               **
**                                                                         **
** Outputs:                                                                **
**                                                                         **
**   xar2---Word16 Az[]                                                    **
**                                                                         **
** Return value :       none                                               **
**                                                                         **
** Attribute    :       Cycles:11230        Pm:65                          **
**                      Modified Registers:acc,p,t,xar0-3,xar6,xar7        **
**                                                                         **
** Programmer   :       YANG zhiwei                                        **
*****************************************************************************

      .global _Int_lpc_1to3_2
  
  	  .ref _Lsp_Az	
      .ref M
	  .ref MP1
	  .ref _buffer3	
_Int_lpc_1to3_2:  
      movl	  xar3,#_buffer3
      mov	  ar0,#0					;i = 0
      mov     ar6,#M-1					;M loops
_loop_161:     
      mov	  al,*+xar4[ar0]			;al = lsp_old[i]
      mov	  ah,al						;ah = lsp_old[i]
      asr	  al,#2						;al = shr(lsp_old[i], 2)  
      sub     ah,al						;ah = sub(lsp_old[i], shr(lsp_old[i], 2))
	  mov	  al,*+xar5[ar0]			;al = lsp_new[i]	
      asr	  al,#2						;al = shr(lsp_new[i], 2)
      add     ah,al						;ah = add(shr(lsp_new[i], 2), sub(lsp_old[i], shr(lsp_old[i], 2)))  	
      mov     *+xar3[ar0],ah			;lsp[i] = ah
      inc     ar0						;i++
      banz    _loop_161,ar6--
      
      ;push    xar2					  	;store address of Az[]
      push    xar4						;store address of lsp_old[]
      push    xar5    					;store address of lsp_new[]
      
      lcr	  _Lsp_Az					;/* Subframe 1 */
      
      pop	  xar5						;restore address of lsp_new[]	
      pop     xar4						;restore address of lsp_old[]
      ;pop     xar2						;restore address of Az[]
      
      movl	  acc,xar2					;acc = Az
      add     acc,#MP1
      movl    xar2,acc					;Az += MP1
      
      
      movl	  xar3,#_buffer3
      mov	  ar0,#0					;i = 0
      mov     ar6,#M-1					;M loops
_loop_169:
      mov	  al,*+xar4[ar0]			;al = lsp_old[i]
      asr	  al,#1						;al = shr(lsp_old[i], 1)  
 	  mov	  ah,*+xar5[ar0]			;ah = lsp_new[i]	
      asr	  ah,#1						;ah = shr(lsp_new[i], 1)
      add     ah,al						;ah = add(shr(lsp_old[i], 1), shr(lsp_new[i], 1))
      mov     *+xar3[ar0],ah			;lsp[i] = ah
      inc     ar0						;i++
      banz    _loop_169,ar6--      
       
      ;push    xar2					  	;store address of Az[]
      push    xar4						;store address of lsp_old[]
      push    xar5    					;store address of lsp_new[]
      
      lcr	  _Lsp_Az					;/* Subframe 2 */
      
      pop	  xar5						;restore address of lsp_new[]	
      pop     xar4						;restore address of lsp_old[]
      ;pop     xar2						;restore address of Az[]
      
      movl	  acc,xar2					;acc = Az
      add     acc,#MP1
      movl    xar2,acc					;Az += MP1  
      
      
      movl	  xar3,#_buffer3
      mov	  ar0,#0					;i = 0
      mov     ar6,#M-1					;M loops
_loop_177:     
      mov	  al,*+xar5[ar0]			;al = lsp_new[i]
      mov	  ah,al						;ah = lsp_new[i]
      asr	  al,#2						;al = shr(lsp_new[i], 2)  
      sub     ah,al						;ah = sub(lsp_new[i], shr(lsp_new[i], 2))
	  mov	  al,*+xar4[ar0]			;al = lsp_old[i]	
      asr	  al,#2						;al = shr(lsp_old[i], 2)
      add     ah,al						;ah = add(shr(lsp_old[i], 2), sub(lsp_new[i], shr(lsp_new[i], 2)))  	
      mov     *+xar3[ar0],ah			;lsp[i] = ah
      inc     ar0						;i++
      banz    _loop_177,ar6--
      
      ;push    xar2					  	;store address of Az[]
      push    xar4						;store address of lsp_old[]
      push    xar5    					;store address of lsp_new[]
      
      lcr	  _Lsp_Az					;/* Subframe 3 */
      
      pop	  xar5						;restore address of lsp_new[]	
      pop     xar4						;restore address of lsp_old[]
      ;pop     xar2						;restore address of Az[]

      LRETR

⌨️ 快捷键说明

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