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

📄 box_car.lst

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 LST
📖 第 1 页 / 共 2 页
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs box_car.asm -o ..\obj\box_car.obj -l ..\temp\box_car.lst 

TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:15 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
box_car.asm                                                          PAGE    1

       1            ;=====================================================================================
       2            ; File name:        BOX_CAR.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:   Averaging box car                                
       8            ; 
       9            ;=====================================================================================
      10            ; History:
      11            ;-------------------------------------------------------------------------------------
      12            ; 9-15-2000     Release Rev 1.0
      13            ;================================================================================
      14            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independent).
      15            ;================================================================================
      16            ; Routine Name: bc_calc                                                                             Type: C Call
      17            ;  
      18            ;  C prototype : void bc_calc(struct BOXCAR *p);
      19            ;
      20            ;        The struct object is defined in the header file "box_car.h" as follows:
      21            ;
      22            ; typedef struct { int  BC_IN;                  /* Input: Box-Car input (Q15) */
      23            ;                                  int  BC_PTR;                 /* Variable: Box-car buffer pointer */          
      24            ;                                  int  BC_BUFFER[64];  /* Variable: Box-car buffer (Q15) */
      25            ;                                  int  BC_OUT;                 /* Output: Box-car output (Q15) */
      26            ;                                  int  bc_scaler;              /* Parameter: Box-car scaler (Q15) */
      27            ;                                  int  (*calc)();              /* Pointer to calculation function */ 
      28            ;                                } BOXCAR;            
      29            ;                        
      30            ;        Frame Usage Details:
      31            ;     step   |      a      |      b       |      c       |     d     
      32            ;____________|_____________|______________|______________|_____________
      33            ;     AR0        |   BC_PTR    |              |                          |     
      34            ;
      35            ; NOTE: The AR0 here is keeping the buffer pointer value, BC_PTR, rather than the 
      36            ; frame pointer address, FR0, as usual.  
      37            ;
      38            ;================================================================================
      39                            .def        _bc_calc
      40            ;================================================================================
      41      0040  BC_SIZE_                        .set 64
      42            ; This BC_SIZE_ here is changed corresponding to the BC_SIZE in the header file 
      43            ; of BOX_CAR.H. Then, the module library (e.g., clib_010.lib) must be rebuilt to take
      44            ; the effect.
      45            
      46            ;================================================================================
      47      0000  __bc_calc_framesize .set 0000h
      48            ;================================================================================
      49 0000       _bc_calc:
      50                                                                                                                    ; Assume
      51 0000 8aa0          POPD    *+                                                                      ; Keep return address
      52 0001 80a0          SAR     AR0,*+                                                          ; Keep old frame pointer (FP)
      53 0002 8180          SAR     AR1,*                                                           ; Keep old stack pointer (SP)
      54 0003 b000          LARK    AR0,__bc_calc_framesize                         ; Load AR0 with frame size      
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:15 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
box_car.asm                                                          PAGE    2

      55 0004 00e8          LAR     AR0,*0+,AR0                                                     ; AR0->FP0 (new FP), ARP=AR0
      56            
      57            ;================================================================================
      58 0005 7c03                  SBRK    #3              ; ARP=AR0, AR0->FR0-3 (1st argument)            
      59            ;----------------------------------------------------------------------------------
      60 0006 0280                  LAR             AR2,*   ; ARP=AR0, AR0->BC_IN, AR2->BC_IN
      61            ;----------------------------------------------------------------------------------
      62 0007 0380                  LAR             AR3,*   ; ARP=AR0, AR0->BC_IN, AR2->BC_IN, AR3->BC_IN                           
      63            ;----------------------------------------------------------------------------------
      64 0008 7803                  ADRK    #3              ; ARP=AR0, AR0->FR0, AR2->BC_IN, AR3->BC_IN 
      65            ;----------------------------------------------------------------------------------
      66 0009 8b8a                  MAR             *,AR2   ; ARP=AR2, AR0->FR0, AR2->BC_IN, AR3->BC_IN
      67            ;----------------------------------------------------------------------------------
      68 000a be47                  SETC    SXM             ; Turn sign extension mode on
      69                                                            ; ARP=AR2, AR0->FR0, AR2->BC_IN, AR3->BC_IN
      70            ;----------------------------------------------------------------------------------
      71 000b be43                  SETC    OVM             ; Set overflow mode
      72                                                            ; ARP=AR2, AR0->FR0, AR2->BC_IN, AR3->BC_IN
      73            ;----------------------------------------------------------------------------------
      74 000c bf00                  SPM     0       ; Reset product mode
      75                                                    ; ARP=AR2, AR0->FR0, AR2->BC_IN, AR3->BC_IN 
      76            ;----------------------------------------------------------------------------------
      77 000d 7801                  ADRK    #1              ; ARP=AR2, AR0->FR0, AR2->BC_PTR, AR3->BC_IN 
      78            ;----------------------------------------------------------------------------------
      79 000e 00a0                  LAR             AR0,*+  ; ARP=AR2, AR0=BC_PTR, AR2->BC_BUFFER[0], AR3->BC_IN                    
      80            ;----------------------------------------------------------------------------------
      81 000f 8bea                  MAR             *0+,AR2 ; ARP=AR2, AR0=BC_PTR, AR2->BC_BUFFER[BC_PTR], AR3->BC_IN
      82            ;----------------------------------------------------------------------------------
      83 0010 8b8b                  MAR             *,AR3   ; ARP=AR3, AR0=BC_PTR, AR2->BC_BUFFER[BC_PTR], AR3->BC_IN

⌨️ 快捷键说明

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