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

📄 main.lst

📁 LPC2000系列培训课程给的实验代码。 此项目文件演示的是非向量中断。 KEIL CARM 编译。 内含启动配置代码。
💻 LST
字号:
ARM COMPILER V2.00f,  main                                                                 20/02/05  10:09:51  PAGE 1   


ARM COMPILER V2.00f, COMPILATION OF MODULE main
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe main.c THUMB OPTIMIZE(7,SPEED) BROWSE DEBUG TABS(4) 

stmt  level    source

    1          /************************************************************/
    2          /* PROJECT NAME: VICnonvector                               */
    3          /* Project:      LPC2100 Training course                    */
    4          /* Engineer:     T Martin       tmartin@hitex.co.uk         */
    5          /* Filename:     main.c                                     */
    6          /* Language:     C                                          */
    7          /* Compiler:     Keil ARM   V2.00b                          */
    8          /* Assembler:                                               */
    9          /*                                                          */
   10          /************************************************************/
   11          /* COPYRIGHT: Hitex UK Ltd      2005                        */
   12          /* LICENSE:   THIS VERSION CREATED FOR FREE DISTRIBUTION    */
   13          /************************************************************/
   14          /* Function:                                                */
   15          /*                                                          */
   16          /* Example configuration of VIC for nonvectored interrupt   */
   17          /*                                                          */
   18          /* Demonstrates serving the external interrupt as a non     */ 
   19          /* vectored interrupt                                       */
   20          /*                                                          */  
   21          /* Oscillator frequency 12.000 Mhz                          */
   22          /* Target board Keil MCB2100                                */
   23          /************************************************************/
   24          
   25          #include <LPC21xx.H>
   26          void NonVectoredIRQ (void)__irq;
   27          unsigned update = 0;
   28          
   29          int main (void)
   30          {
   31   1      
   32   1      IODIR1          = 0x00FF0000;                       //Set the LED pins as outputs
   33   1      IOCLR1          = 0x00FF0000;                       //Clear the LED pins
   34   1      
   35   1      PINSEL0         = 0x20000000;                       //Enable the EXTINT0 interrupt
   36   1      
   37   1      VICDefVectAddr  = (unsigned)NonVectoredIRQ;         //pass the address of the IRQ into the VIC slot
   38   1      
   39   1      VICIntEnable    = 0x8000;                           //Enable EXTINT0 in the VIC
   40   1      
   41   1      while(1)
   42   1      {
   43   2      ;                                                   //Idle loop
   44   2      }
   45   1      
   46   1      }
   47          
   48          void NonVectoredIRQ (void)   __irq
   49          {
   50   1      if(VICIRQStatus&0x00008000)                         //Test for the interrupt source
   51   1      {
   52   2          IOSET1      = 0x00FF0000;                       //Set the LED pins
   53   2          EXTINT      = 0x00000002;                       //Clear the peripheral interrupt flag
   54   2      }
   55   1      VICVectAddr     = 0x00000000;                       //Dummy write to signal end of interrupt
   56   1      }
ARM COMPILER V2.00f,  main                                                                 20/02/05  10:09:51  PAGE 2   

ASSEMBLY LISTING OF GENERATED OBJECT CODE



*** EXTERNALS:
 EXTERN NUMBER (__startup)



*** PUBLICS:
 PUBLIC         NonVectoredIRQ?A
 PUBLIC         main
 PUBLIC         update



*** DATA SEGMENT '?DT0?main':
 00000000          update:
 00000000           BEGIN_INIT
 00000000  00000000  DD          0x0
 00000004           END_INIT



*** CODE SEGMENT '?PR?main?main':
   29: int main (void)
 00000000  B500      PUSH        {LR}
   32: IODIR1            = 0x00FF0000;                       //Set the LED pins as outputs
 00000002  4800      LDR         R1,=0xFF0000
 00000004  4800      LDR         R0,=0xE0028018
 00000006  6001      STR         R1,[R0,#0x0]
   33: IOCLR1            = 0x00FF0000;                       //Clear the LED pins
 00000008  4800      LDR         R1,=0xFF0000
 0000000A  4800      LDR         R0,=0xE002801C
 0000000C  6001      STR         R1,[R0,#0x0]
   35: PINSEL0         = 0x20000000;                       //Enable the EXTINT0 interrupt
 0000000E  4800      LDR         R1,=0x20000000
 00000010  4800      LDR         R0,=0xE002C000
 00000012  6001      STR         R1,[R0,#0x0]
   37: VICDefVectAddr  = (unsigned)NonVectoredIRQ;         //pass the address of the IRQ into the VIC slot
 00000014  4900      LDR         R1,=NonVectoredIRQ?A ; NonVectoredIRQ?A
 00000016  4800      LDR         R0,=0xFFFFF034
 00000018  6001      STR         R1,[R0,#0x0]
   39: VICIntEnable    = 0x8000;                           //Enable EXTINT0 in the VIC
 0000001A  4800      LDR         R1,=0x8000
 0000001C  4800      LDR         R0,=0xFFFFF010
 0000001E  6001      STR         R1,[R0,#0x0]
   44: }
 00000020          L_1:
 00000020  E7FE      B           L_1  ; T=0x00000020
 00000022  BC08      POP         {R3}
 00000024  4718      BX          R3
 00000026          ENDP ; 'main'


*** CODE SEGMENT '?PR?NonVectoredIRQ?A?main':
   48: void NonVectoredIRQ (void)   __irq
 00000000  E92D0003  STMDB       R13!,{R0-R1}
   50: if(VICIRQStatus&0x00008000)                         //Test for the interrupt source
 00000004  E5100000  LDR         R0,=0xFFFFF000
 00000008  E5900000  LDR         R0,[R0,#0x0]
 0000000C  E3100902  TST         R0,#0x8000
 00000010  0A000005  BEQ         L_5  ; Targ=0x2C
   52:     IOSET1      = 0x00FF0000;                       //Set the LED pins
 00000014  E3A018FF  MOV         R1,#0xFF0000
 00000018  E5100000  LDR         R0,=0xE0028014
 0000001C  E5801000  STR         R1,[R0,#0x0]
   53:     EXTINT      = 0x00000002;                       //Clear the peripheral interrupt flag
 00000020  E3A01002  MOV         R1,#0x2
 00000024  E5100000  LDR         R0,=0xE01FC140
 00000028  E5C01000  STRB        R1,[R0,#0x0]
   54: }
 0000002C          L_5:
   55: VICVectAddr     = 0x00000000;                       //Dummy write to signal end of interrupt
 0000002C  E3A01000  MOV         R1,#0x0
ARM COMPILER V2.00f,  main                                                                 20/02/05  10:09:51  PAGE 3   

 00000030  E5100000  LDR         R0,=0xFFFFF030
 00000034  E5801000  STR         R1,[R0,#0x0]
   56: }
 00000038  E8BD0003  LDMIA       R13!,{R0-R1}
 0000003C  E25EF004  SUBS        R15,R14,#0x0004
 00000040          ENDP ; 'NonVectoredIRQ?A'



Module Information          Static
----------------------------------
  code size            =    ------
  data size            =         4
  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 + -