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

📄 main.lst

📁 Example Interrupt program for LPC2100
💻 LST
字号:
ARM COMPILER V2.00f,  main                                                                 19/02/05  10:14:27  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 INTERWORK OPTIMIZE(7,SPEED) BROWSE DEBUG CODE SYMBOLS TABS(4) 

stmt  level    source

    1          /************************************************************/
    2          /* PROJECT NAME: FIR                                        */
    3          /* Project:      LPC2100 Training course                    */
    4          /* Engineer:     T Martin                                   */
    5          /* Filename:     main.c                                     */
    6          /* Language:     C                                          */
    7          /* Compiler:     Keil ARM   V2.00b                          */
    8          /* Assembler:                                               */
    9          /*                                                          */
   10          /************************************************************/
   11          /* Modification History:                                    */
   12          /*                                                          */
   13          /************************************************************/
   14          /* Function:                                                */
   15          /*                                                          */
   16          /* Example Interrupt program for LPC2100                    */
   17          /*                                                          */
   18          /* Demonstrates configuring a function as an ISR            */
   19          /*                                                          */  
   20          /* Oscillator frequency 12.000 Mhz                          */
   21          /* Target board Keil MCB2100                                */
   22          /************************************************************/
   23          
   24          
   25          #include <LPC21xx.H>
   26          void FIQ_Handler (void) __fiq;                          //declare FIQ ISR
   27          void initFiq (void);
   28          
   29          void main (void)
   30          {
   31   1      
   32   1      initFiq();                                             //Initilise the Fast interrupt source
   33   1      IOCLR1 = 0x00FF0000;
   34   1      while(1)
   35   1      {
   36   2      ;                                 //Loop here forever
   37   2      }
   38   1      
   39   1      }
   40          
   41          void FIQ_Handler (void) __fiq
   42          {
   43   1      IOSET1  = 0x00FF0000;                               //Set the LED pins
   44   1      EXTINT  = 0x00000002;                               //Clear the peripheral interrupt flag
   45   1      
   46   1      }
   47          
   48          void initFiq(void) 
   49          {
   50   1      IODIR1          = 0x00FF0000;                           //Set the LED pins as outputs
   51   1      PINSEL0         = 0x20000000;                           //Enable the EXTINT1 interrupt
   52   1      VICIntSelect    = 0x00008000;                           //Enable a Vic Channel as FIQ
   53   1      VICIntEnable    = 0x00008000;       
   54   1      }
ARM COMPILER V2.00f,  main                                                                 19/02/05  10:14:27  PAGE 2   

ASSEMBLY LISTING OF GENERATED OBJECT CODE



*** EXTERNALS:
 EXTERN NUMBER (__startup)



*** PUBLICS:
 PUBLIC         FIQ_Handler?A
 PUBLIC         FIQ_Handler?T
 PUBLIC         initFiq?T
 PUBLIC         initFiq?A
 PUBLIC         main



*** CODE SEGMENT '?PR?main?main':
   29: void main (void)
 00000000  B500      PUSH        {LR}
   32: initFiq();                                             //Initilise the Fast interrupt source
 00000002  F7FF      BL          initFiq?T  ; T=0x0001  (1)
 00000004  FFFD      BL          initFiq?T  ; T=0x0001  (2)
   33: IOCLR1 = 0x00FF0000;
 00000008  4800      LDR         R1,=0xFF0000
 0000000A  4800      LDR         R0,=0xE002801C
 0000000C  6001      STR         R1,[R0,#0x0]
   37: }
 0000000E          L_1:
 0000000E  E7FE      B           L_1  ; T=0x0000000E
 00000010  BC08      POP         {R3}
 00000012  4718      BX          R3
 00000014          ENDP ; 'main'


*** CODE SEGMENT '?PR?FIQ_Handler?A?main':
   41: void FIQ_Handler (void) __fiq
 00000000  E92D0003  STMDB       R13!,{R0-R1}
   43: IOSET1     = 0x00FF0000;                               //Set the LED pins
 00000004  E3A018FF  MOV         R1,#0xFF0000
 00000008  E5100000  LDR         R0,=0xE0028014
 0000000C  E5801000  STR         R1,[R0,#0x0]
   44: EXTINT  = 0x00000002;                               //Clear the peripheral interrupt flag
 00000010  E3A01002  MOV         R1,#0x2
 00000014  E5100000  LDR         R0,=0xE01FC140
 00000018  E5C01000  STRB        R1,[R0,#0x0]
   46: }
 0000001C  E8BD0003  LDMIA       R13!,{R0-R1}
 00000020  E25EF004  SUBS        R15,R14,#0x0004
 00000024          ENDP ; 'FIQ_Handler?A'


*** CODE SEGMENT '?PR?initFiq?T?main':
   50: IODIR1            = 0x00FF0000;                           //Set the LED pins as outputs
 00000000  4800      LDR         R1,=0xFF0000
 00000002  4800      LDR         R0,=0xE0028018
 00000004  6001      STR         R1,[R0,#0x0]
   51: PINSEL0         = 0x20000000;                           //Enable the EXTINT1 interrupt
 00000006  4800      LDR         R1,=0x20000000
 00000008  4800      LDR         R0,=0xE002C000
 0000000A  6001      STR         R1,[R0,#0x0]
   52: VICIntSelect    = 0x00008000;                           //Enable a Vic Channel as FIQ
 0000000C  4800      LDR         R1,=0x8000
 0000000E  4800      LDR         R0,=0xFFFFF00C
 00000010  6001      STR         R1,[R0,#0x0]
   53: VICIntEnable    = 0x00008000;       
 00000012  4800      LDR         R1,=0x8000
 00000014  4800      LDR         R0,=0xFFFFF010
 00000016  6001      STR         R1,[R0,#0x0]
   54: }
 00000018  4770      BX          R14
 0000001A          ENDP ; 'initFiq?T'

ARM COMPILER V2.00f,  main                                                                 19/02/05  10:14:27  PAGE 3   

Name                                    Class    Space Type   Offset   Size
---------------------------------------------------------------------------

FIQ_Handler?A. . . . . . . . . . . . .  public   code  funct  000000H  
FIQ_Handler?T. . . . . . . . . . . . .  public   code  funct  000000H  
initFiq?T. . . . . . . . . . . . . . .  public   code  funct  000000H  
initFiq?A. . . . . . . . . . . . . . .  public   code  funct  000000H  
main . . . . . . . . . . . . . . . . .  public   code  funct  000000H  


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 + -