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

📄 firi.asm

📁 DSP的实验测试程序
💻 ASM
字号:
;
;File name:        FIRIA.ASM                  
;                    
;Originator:    Digital Control Systems Group
;               Texas Instruments
;
;Description:  
;===========
; Header file containing the initialization routine for Linear buffer FIR filter
; modules viz., FIRFILT_GEN, FIRFILT_ORD10 & FIRFILT_ORD20
;===================================================================
; History:
;-------------------------------------------------------------------
;25-1-2000  Release Rev 1.0                                                  
;-------------------------------------------------------------------

; Function external reference declaration
            .def    _FIRFILT_LIN_init       ; Init Routine for linear buffer
                        
            
_FIRFILT_LIN_init:
            POPD    *+                      ; Store the Return Address in stack        
            SAR     AR1,* 
            LAR     AR2,*+,AR2              ; ARP=AR2
            
            SBRK    #2                      ; ARP=AR2, AR2->FIR_MODULE_ptr 
            LAR     AR2,*                   ; ARP=AR2, AR2->coeff_ptr 
            LACL    *                       ; ARP=AR2, AR2->coeff_ptr, ACC=coeff_ptr
            ADRK    #2                      ; ARP=AR2, AR2->order
            ADDS    *                       ; ARP=AR2, AR2->order, ACC=coeff_ptr+order
            SBRK    #2                      ; ARP=AR2, AR2->coeff_ptr   
            SACL    *+,0                    ; ARP=AR2, AR2->dbuffer_ptr, coeff_ptr=coeff_ptr+order
            LAR     AR3,*                   ; ARP=AR2, AR2->dbuffer_ptr, AR3=dbuffer_ptr
            LACL    *+                      ; ARP=AR2, AR2->order, ACC=dbuffer_ptr
            ADDS    *-                      ; ARP=AR2, AR2->dbuffer_ptr, ACC=dbuffer_ptr+order
            SUB     #1                      ; ARP=AR2, AR2->dbuffer_ptr, ACC=dbuffer_ptr+order-1
            SACL    *+                      ; ARP=AR2, AR2->order, dbuffer_ptr=dbuffer_ptr+order-1          
            LACL    #0                      ; ACC=0
            LAR     AR4,*+,AR4              ; ARP=AR4, AR4=order, AR2->input
            MAR     *-,AR3                  ; ARP=AR3, AR3=dbuffer_ptr, AR4=order-1
          
lbloop:     SACL    *+,0,AR4                ; Clear the delay buffer
            BANZ    lbloop,*-,AR3
             
            MAR     *,AR2                   ; ARP=AR2, AR2->intput,
            SACL    *+                      ; ARP=AR2, AR2->output,input=0
            SACL    *,0,AR1                 ; ARP=AR1, AR2->stact,output=0
            SBRK    #2
            PSHD    *                       ; Push the return address to TOS
            RET                             ; Return to the caller

  

⌨️ 快捷键说明

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