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

📄 data_log2.lst

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

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

       1            ;=====================================================================================
       2            ; File name:        DATA_LOG2.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:                                 
       8            ; Data logging for two graph displays in code composer
       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: data_log_update                                                     Type: C Callable
      17            ;  
      18            ;  C prototype : void data_log_update(struct DATALOG *p);
      19            ;
      20            ;        The struct object is defined in the header file "data_log.h" as follows:
      21            ;
      22            ;  typedef struct { int  *dlog_iptr1;   /* Input: First input pointer (Q15) */  
      23            ;                                  int  *dlog_iptr2;    /* Input: Second input pointer (Q15) */         
      24            ;                                  int  trig_value;             /* Input: Trigger point (Q15) */                
      25            ;                                  int  graph_ptr1;             /* Variable: First graph address pointer */
      26            ;                                  int  graph_ptr2;     /* Variable: Second graph address pointer */    
      27            ;                                  int  dlog_skip_cntr; /* Variable: Data log skip counter */                   
      28            ;                                  int  dlog_cntr;              /* Variable: Data log counter */
      29            ;                                  int  task_ptr;               /* Variable: Task address pointer */
      30            ;                                  int  dlog_prescale;  /* Parameter: Data log prescale */
      31            ;                                  int  dlog_cntr_max;  /* Parameter: Maximum data buffer */
      32            ;                                  int  dl_buffer1_adr; /* Parameter: Buffer starting address 1 */
      33            ;                                  int  dl_buffer2_adr; /* Parameter: Buffer starting address 2 */              
      34            ;                                  int  (*init)();      /* Pointer to init function */
      35            ;                                  int  (*update)();    /* Pointer to update function */ 
      36            ;                                } DATALOG;                                 
      37            ;        
      38            ;                        
      39            ;        Frame Usage Details:
      40            ;     step   |     a     |     b     |    c    |    d    |
      41            ;____________|___________|___________|_________|_________|
      42            ;     AR0        |dlog_iptr1 |           |         |         |     
      43            ;
      44            ; NOTE: The AR0 here is keeping the pointer dlog_iptr1 rather than the 
      45            ; frame pointer address, FR0, as usual.  
      46            ;================================================================================
      47                            .def        _data_log_update            
      48            ;================================================================================
      49      0000  __data_log_update_framesize     .set    0000h
      50            ;================================================================================
      51 0000       _data_log_update:
      52                                                                                                                    ; Assume
      53 0000 8aa0          POPD    *+                                                                      ; Keep return address
      54 0001 80a0          SAR     AR0,*+                                                          ; Keep old frame pointer (FP)
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:17 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
data_log2.asm                                                        PAGE    2

      55 0002 8180          SAR     AR1,*                                                           ; Keep old stack pointer (SP)
      56 0003 b000          LARK    AR0,__data_log_update_framesize         ; Load AR0 with frame size      
      57 0004 00e8          LAR     AR0,*0+,AR0                                                     ; AR0->FP0 (new FP), ARP=AR0
      58            
      59            ;================================================================================
      60 0005 7c03                  SBRK    #3              ; ARP=AR0, AR0->FR0-3 (1st argument)            
      61            ;----------------------------------------------------------------------------------
      62 0006 0280                  LAR             AR2,*   ; ARP=AR0, AR0->dlog_iptr1, AR2->dlog_iptr1                     
      63            ;----------------------------------------------------------------------------------
      64 0007 7803                  ADRK    #3              ; ARP=AR0, AR0->FR0, AR2->dlog_iptr1 
      65            ;----------------------------------------------------------------------------------
      66 0008 be47                  SETC    SXM             ; Turn sign extension mode on
      67                                                            ; ARP=AR0, AR0->FR0, AR2->dlog_iptr1
      68            ;----------------------------------------------------------------------------------
      69 0009 be43                  SETC    OVM             ; Set overflow mode
      70                                                            ; ARP=AR0, AR0->FR0, AR2->dlog_iptr1
      71            ;----------------------------------------------------------------------------------
      72 000a bf00                  SPM     0       ; Reset product mode
      73                                                    ; ARP=AR0, AR0->FR0, AR2->dlog_iptr1
      74            ;----------------------------------------------------------------------------------
      75 000b 8b8a          MAR             *,AR2   ; ARP=AR2, AR0->FR0, AR2->dlog_iptr1
      76            ;----------------------------------------------------------------------------------
      77 000c 0080                  LAR             AR0,*   ; ARP=AR2, AR0=dlog_iptr1, AR2->dlog_iptr1
      78            ;----------------------------------------------------------------------------------
      79 000d 7807          ADRK    #7              ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr 
      80            ;----------------------------------------------------------------------------------
      81 000e 1080          LACC    *       ; ACC = task_ptr
      82                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
      83            ;----------------------------------------------------------------------------------
      84 000f be20                  BACC                    ; PC = ACC
      85                                                            ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr        
      86            ;----------------------------------------------------------------------------------
      87 0010       POS_TRIG_S1:                    ; Positive trigger, detect Negative signal
      88                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
      89            ;----------------------------------------------------------------------------------
      90 0010 7c07                  SBRK    #7              ; ARP=AR2, AR0=dlog_iptr1, AR2->dlog_iptr1              
      91            ;----------------------------------------------------------------------------------
      92 0011 8b88                  MAR             *,AR0   ; ARP=AR0, AR0=dlog_iptr1, AR2->dlog_iptr1
      93            ;----------------------------------------------------------------------------------
      94 0012 118a                  LACC    *,1,AR2 ; ACC = *dlog_iptr1
      95                                                            ; ARP=AR0, AR0=dlog_iptr1, AR2->dlog_iptr1, ARP=AR2
      96            ;----------------------------------------------------------------------------------
      97 0013 7802                  ADRK    #2              ; ARP=AR2, AR0=dlog_iptr1, AR2->trig_value 
      98            ;----------------------------------------------------------------------------------
      99 0014 3180                  SUB             *,1             ; ACC = *dlog_iptr1 - trig_value
     100                                                            ; ARP=AR2, AR0=dlog_iptr1, AR2->trig_value   
     101            ;----------------------------------------------------------------------------------
     102 0015 7805                  ADRK    #5              ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     103            ;----------------------------------------------------------------------------------
     104 0016 e38c          BCND    DL_EXIT, GEQ ; Branch to DL_EXIT if ACC >= 0
         0017 0058' 
     105                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     106            ;----------------------------------------------------------------------------------
     107 0018 ae80          SPLK    #POS_TRIG_S2,* ; task_ptr = #POS_TRIG_S2
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:17 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
data_log2.asm                                                        PAGE    3

         0019 001c' 
     108                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     109            ;----------------------------------------------------------------------------------
     110 001a 7980          B               DL_EXIT ; Branch to DL_EXIT
         001b 0058' 
     111                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     112            ;----------------------------------------------------------------------------------
     113 001c       POS_TRIG_S2:                    ; Positive trigger, detect Positive signal
     114                                                            ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     115            ;----------------------------------------------------------------------------------
     116 001c 7c07          SBRK    #7              ; ARP=AR2, AR0=dlog_iptr1, AR2->dlog_iptr1
     117            ;----------------------------------------------------------------------------------
     118 001d 8b88                  MAR             *,AR0   ; ARP=AR0, AR0=dlog_iptr1, AR2->dlog_iptr1
     119            ;----------------------------------------------------------------------------------
     120 001e 118a          LACC    *,1,AR2 ; ACC = *dlog_iptr1
     121                                                            ; ARP=AR0, AR0=dlog_iptr1, AR2->dlog_iptr1, ARP=AR2 
     122            ;----------------------------------------------------------------------------------
     123 001f 7802          ADRK    #2              ; ARP=AR2, AR0=dlog_iptr1, AR2->trig_value                                      
     124            ;----------------------------------------------------------------------------------
     125 0020 3180          SUB             *,1             ; ACC = *dlog_iptr1 - trig_value
     126                                                            ; ARP=AR2, AR0=dlog_iptr1, AR2->trig_value   
     127            ;----------------------------------------------------------------------------------
     128 0021 7805          ADRK    #5              ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     129            ;----------------------------------------------------------------------------------
     130 0022 e344          BCND    PTS2_1,LT ; Branch to PTS2_1 if ACC < 0
         0023 0028' 
     131                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     132            ;----------------------------------------------------------------------------------
     133 0024 ae80          SPLK    #DL_TRIGGERED,* ; task_ptr = #DL_TRIGGERED
         0025 002c' 
     134                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr
     135            ;----------------------------------------------------------------------------------
     136 0026 7980          B       DL_EXIT ; Branch to DL_EXIT
         0027 0058' 
     137                                                    ; ARP=AR2, AR0=dlog_iptr1, AR2->task_ptr

⌨️ 快捷键说明

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