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

📄 xirq0.lst

📁 ADuC7020/26是ADI模拟公司开发的ARM7TDMI内核
💻 LST
字号:
ARM COMPILER V2.42,  XIRQ0                                                                 10/12/07  17:42:25  PAGE 1   


ARM COMPILER V2.42, COMPILATION OF MODULE XIRQ0
OBJECT MODULE PLACED IN XIRQ0.OBJ
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe XIRQ0.c THUMB DEBUG TABS(4) 

stmt  level    source

    1          /*********************************************************************
    2          
    3           Author        : ADI - Apps            www.analog.com/MicroConverter
    4          
    5           Date          : Sept. 2005
    6          
    7           File          : XIRQ0.c
    8          
    9           Hardware      : Applicable to ADuC702x rev H or I silicon
   10                           Currently targetting ADuC7026.
   11          
   12           Description   : Complement port 3 in a loop.
   13                           When XIRQ0 is pressed, complement P4.2 
   14                  
   15          *********************************************************************/
   16          
   17          #include <ADuC7026.h>                   //  Include ADuC7026 Header File
   18          
   19          void IRQ_Handler(void) __irq;           //  IRQ Funtion Prototype 
   20          void delay(int);
   21                                                  //  Memory function macro 
   22          int main (void)  {
   23   1      
   24   1          IRQEN = XIRQ0_BIT;                  //  Enable XIRQ0 in IRQEnable 
   25   1      
   26   1      
   27   1          GP4DAT = 0x04000000;                //  Configure P4.2 as output
   28   1          GP3DAT = 0xff000000;                //  Configure port 3 as output
   29   1      
   30   1          while(1)
   31   1          {
   32   2              GP3DAT ^= 0x00ff0000;           //  Complement Port 3
   33   2              delay(10000);                   //  Delay to make blink visible
   34   2          }
   35   1                         
   36   1          return 0 ;
   37   1      }
   38          
   39          /********************************************************************/
   40          /*                                                                  */
   41          /*      Interrupt Service Rountine                                  */
   42          /*                                                                  */
   43          /********************************************************************/
   44          
   45          void IRQ_Handler() __irq
   46          {
   47   1          GP4DAT ^= 0x00040000;               // Complement P4.2
   48   1          while(GP0DAT & 0x00010){}           // wait for XIRQ to be low again
   49   1          return ;
   50   1      }
   51          
   52          void delay (int length)
   53          {
   54   1          while (length >=0)
   55   1              length--;
   56   1      }
   57          
ARM COMPILER V2.42,  XIRQ0                                                                 10/12/07  17:42:25  PAGE 2   

ASSEMBLY LISTING OF GENERATED OBJECT CODE



*** EXTERNALS:
 EXTERN NUMBER (__startup)



*** PUBLICS:
 PUBLIC         IRQ_Handler?A
 PUBLIC         delay?T
 PUBLIC         main



*** CODE SEGMENT '?PR?main?XIRQ0':
   22: int main (void)  {
 00000000  B500      PUSH        {LR}
   24:     IRQEN = XIRQ0_BIT;                  //  Enable XIRQ0 in IRQEnable 
 00000002  4800      LDR         R1,=0x8000
 00000004  4800      LDR         R0,=0xFFFF0008
 00000006  6001      STR         R1,[R0,#0x0]
   27:     GP4DAT = 0x04000000;                //  Configure P4.2 as output
 00000008  4800      LDR         R1,=0x4000000
 0000000A  4800      LDR         R0,=0xFFFFF460
 0000000C  6001      STR         R1,[R0,#0x0]
   28:     GP3DAT = 0xff000000;                //  Configure port 3 as output
 0000000E  4800      LDR         R1,=0xFF000000
 00000010  4800      LDR         R0,=0xFFFFF450
 00000012  6001      STR         R1,[R0,#0x0]
   30:     while(1)
 00000014          L_3:
   32:         GP3DAT ^= 0x00ff0000;           //  Complement Port 3
 00000014  4800      LDR         R2,=0xFF0000
 00000016  4800      LDR         R0,=0xFFFFF450
 00000018  6801      LDR         R1,[R0,#0x0]
 0000001A  4051      EOR         R1,R2
 0000001C  6001      STR         R1,[R0,#0x0]
   33:         delay(10000);                   //  Delay to make blink visible
 0000001E  4800      LDR         R0,=0x2710
 00000020  F7FF      BL          delay?T  ; T=0x0001  (1)
 00000022  FFEE      BL          delay?T  ; T=0x0001  (2)
   34:     }
 00000024  E7F6      B           L_3  ; T=0x00000014
   37: }
 00000026  BC08      POP         {R3}
 00000028  4718      BX          R3
 0000002A          ENDP ; 'main'


*** CODE SEGMENT '?PR?IRQ_Handler?A?XIRQ0':
   45: void IRQ_Handler() __irq
 00000000  E92D0003  STMDB       R13!,{R0-R1}
   47:     GP4DAT ^= 0x00040000;               // Complement P4.2
 00000004  E5100000  LDR         R0,=0xFFFFF460
 00000008  E5901000  LDR         R1,[R0,#0x0]
 0000000C  E2211701  EOR         R1,R1,#0x40000
 00000010  E5801000  STR         R1,[R0,#0x0]
   48:     while(GP0DAT & 0x00010){}           // wait for XIRQ to be low again
 00000014          L_6:
 00000014  E5100000  LDR         R0,=0xFFFFF420
 00000018  E5900000  LDR         R0,[R0,#0x0]
 0000001C  E3100010  TST         R0,#0x0010
 00000020  1AFFFFFB  BNE         L_6  ; Targ=0x14
   50: }
 00000024  E8BD0003  LDMIA       R13!,{R0-R1}
 00000028  E25EF004  SUBS        R15,R14,#0x0004
 0000002C          ENDP ; 'IRQ_Handler?A'


*** CODE SEGMENT '?PR?delay?T?XIRQ0':
   52: void delay (int length)
 00000000  ---- Variable 'length' assigned to Register 'R0' ----
   54:     while (length >=0)
ARM COMPILER V2.42,  XIRQ0                                                                 10/12/07  17:42:25  PAGE 3   

 00000000  E000      B           L_11  ; T=0x00000004
 00000002          L_13:
 00000002  3801      SUB         R0,#0x1
 00000004          L_11:
 00000004  1C01      MOV         R1,R0 ; length
 00000006  2900      CMP         R1,#0x0 ; length
 00000008  DAFB      BGE         L_13  ; T=0x00000002
   56: }
 0000000A  4770      BX          R14
 0000000C          ENDP ; 'delay?T'



Module Information          Static
----------------------------------
  code size            =    ------
  data size            =    ------
  const size           =    ------
End of Module Information.


ARM COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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