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

📄 rmp3cntl.lst

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

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

       1            ;=====================================================================================
       2            ; File name:        RMP3CNTL.asm                      
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:                                 
       8            ; This file contains source for the Ramp3 control module
       9            ;=====================================================================================
      10            ; History:
      11            ;-------------------------------------------------------------------------------------
      12            ; 9-15-2000     Release Rev 1.0
      13            ;================================================================================
      14            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independant).
      15            ;
      16            ;
      17            ;================================================================================
      18            ; Routine Name: RMP3CNTL                        Routine Type: C Callable
      19            ;
      20            ; Description:
      21            ;  
      22            ;  C prototype : void rmp3_calc(RMP3 *p);
      23            ;================================================================================
      24            ; History   Created August 3 ,2000
      25            ;
      26            ; Definition of RMP3:
      27            ;
      28            ; typedef struct RMP3   {   
      29            ;                           int desired;
      30            ;                           int dly;
      31            ;                           int dly_cntr;  
      32            ;                           int min;                     
      33            ;                           int out;
      34            ;                           int done_flg;           
      35            ;                           (int (*) (int))rmp3_calc
      36            ;                          };
      37            
      38            ;================================================================================                       
      39            
      40      0001  ON         .set 1
      41      0000  OFF        .set 0
      42            ;--------------------------------------------------------------------------
      43      0001  RETURN_ADDRESS_SAVE .set ON     ; If this function calls no other functions 
      44                                            ; set RETURN_ADDRESS_SAVE to OFF for
      45                                            ; optimization                              
      46            
      47            ;--------------------------------------------------------------------------
      48      7fff  RMP3_DONE_FLAG  .set 07FFFh
      49      0000  CLEAR           .set 0
      50            ;-------------------------------------------------------------------------- 
      51                            .def  _rmp3_calc   
      52            ;================================================================================                       
      53 0000       _rmp3_calc:
      54            
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:20 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
rmp3cntl.asm                                                         PAGE    2

      55      0001  __RMP3_framesize .set 0001h
      56            ;--------------------------------------------------------------------------
      57                
      58                .if ( RETURN_ADDRESS_SAVE = ON)
      59                                            ; AR1  is  stack pointer (SP)
      60                                            ; AR0  is  frame pointer (FP)
      61                                            ; ARP = AR1
      62                  
      63 0000 8aa0        POPD *+                   ; Save the return address from hardware
      64                                            ; stack into the software stack
      65                 .endif
      66                
      67 0001 80a0      SAR  AR0, *+                ; push AR0 (FP). ARP = AR1
      68 0002 8180      SAR  AR1, *                 ; *SP = SP. ARP = AR1
      69 0003 b001      LAR  AR0, #__RMP3_framesize ; FP = size of frame. ARP = AR1
      70                
      71 0004 00ea      LAR  AR0, *0+, AR2          ; Allocate frame. AR0 = *AR1
      72                                            ; AR1 = AR1 + AR0. ARP = AR2   
      73            ;--------------------------------------------------------------------------
      74                            .if (RETURN_ADDRESS_SAVE = ON) 
      75 0005 bf0a                  LAR AR2,   #-3 
         0006 fffd  
      76                            .endif                     
      77                            
      78                            .if (RETURN_ADDRESS_SAVE = OFF) 
      79                            LAR AR2,   #-2 
      80                            .endif          
      81            ;--------------------------------------------------------------------------                                
      82 0007 8be0                  MAR *0+         ; AR2 -> passed parameter
      83                                            ; (i.e. pointer to the structure).
      84                                            ; ARP = AR2.  AR2= AR2 + AR0      
      85            ;--------------------------------------------------------------------------
      86 0008 0380                  LAR     AR3,*   ; AR3 points to the first structure member 
      87                                            ; (i.e. AR3 -> desired).
      88                                            ; ARP = AR2.  AR2 -> passed parameter.
      89            ;--------------------------------------------------------------------------
      90 0009 0280                  LAR     AR2,*   ; AR2 points to the first structure member 
      91                                            ; (i.e. AR2 -> desired). 
      92                                            ; ARP = AR2 .AR3-> desired
      93            ;--------------------------------------------------------------------------
      94 000a 1080                  LACC    *       ; Load accumulator with desired
      95                                            ; ARP = AR2. AR2 -> desired. 
      96                                            ; AR3 -> desired
      97            ;--------------------------------------------------------------------------
      98 000b 7804                  ADRK    #4      ; ARP = AR2. AR2 -> out. AR3 -> desired
      99            ;--------------------------------------------------------------------------
     100 000c 308b                  SUB     *,AR3   ; Accumulator = desired - out
     101                                            ; ARP = AR3. AR2 -> out . AR3 -> desired
     102            ;--------------------------------------------------------------------------
     103 000d e388                  BCND   __RMP3_Set_Flag , EQ 
         000e 0025' 

⌨️ 快捷键说明

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