📄 main.lst
字号:
ARM COMPILER V2.00f, main 20/02/05 10:05:03 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: Vectored Interrupt */
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 vectored interrupt */
17 /* */
18 /* Demonstrates serving the external interrupt as a */
19 /* vectored interrupt */
20 /* */
21 /* Oscillator frequency 12.000 Mhz */
22 /* Target board Keil MCB2100 */
23 /************************************************************/
24
25 #include <LPC21xx.H>
26 void EXTINTVectoredIRQ (void)__irq;
27
28 void main (void)
29 {
30 1
31 1 IODIR1 = 0x00FF0000; //Set the LED pins as outputs
32 1 IOCLR1 = 0x00FF0000; //Clear the LED pins
33 1
34 1 PINSEL0 = 0x20000000; //Enable the EXTINT1 interrupt
35 1
36 1 VICVectCntl0 = 0x0000002F; //select a priority slot for a given interrupt
37 1
38 1 VICVectAddr0 = (unsigned)EXTINTVectoredIRQ; //pass the address of the IRQ into the VIC slot
39 1
40 1 VICIntEnable = 0x00008000; //enable interrupt
41 1
42 1 while(1)
43 1 {
44 2 ; //Idle
45 2 }
46 1
47 1 }
48
49 void EXTINTVectoredIRQ (void) __irq
50 {
51 1
52 1 IOSET1 = 0x00FF0000; //Set the LED pins
53 1 EXTINT = 0x00000002; //Clear the peripheral interrupt flag
54 1 VICVectAddr = 0x00000000; //Dummy write to signal end of interrupt
55 1 }
ARM COMPILER V2.00f, main 20/02/05 10:05:03 PAGE 2
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC EXTINTVectoredIRQ?A
PUBLIC main
*** CODE SEGMENT '?PR?main?main':
28: void main (void)
00000000 B500 PUSH {LR}
31: IODIR1 = 0x00FF0000; //Set the LED pins as outputs
00000002 4800 LDR R1,=0xFF0000
00000004 4800 LDR R0,=0xE0028018
00000006 6001 STR R1,[R0,#0x0]
32: IOCLR1 = 0x00FF0000; //Clear the LED pins
00000008 4800 LDR R1,=0xFF0000
0000000A 4800 LDR R0,=0xE002801C
0000000C 6001 STR R1,[R0,#0x0]
34: PINSEL0 = 0x20000000; //Enable the EXTINT1 interrupt
0000000E 4800 LDR R1,=0x20000000
00000010 4800 LDR R0,=0xE002C000
00000012 6001 STR R1,[R0,#0x0]
36: VICVectCntl0 = 0x0000002F; //select a priority slot for a given interrupt
00000014 212F MOV R1,#0x2F
00000016 4800 LDR R0,=0xFFFFF200
00000018 6001 STR R1,[R0,#0x0]
38: VICVectAddr0 = (unsigned)EXTINTVectoredIRQ; //pass the address of the IRQ into the VIC slot
0000001A 4900 LDR R1,=EXTINTVectoredIRQ?A ; EXTINTVectoredIRQ?A
0000001C 4800 LDR R0,=0xFFFFF100
0000001E 6001 STR R1,[R0,#0x0]
40: VICIntEnable = 0x00008000; //enable interrupt
00000020 4800 LDR R1,=0x8000
00000022 4800 LDR R0,=0xFFFFF010
00000024 6001 STR R1,[R0,#0x0]
45: }
00000026 L_1:
00000026 E7FE B L_1 ; T=0x00000026
00000028 BC08 POP {R3}
0000002A 4718 BX R3
0000002C ENDP ; 'main'
*** CODE SEGMENT '?PR?EXTINTVectoredIRQ?A?main':
49: void EXTINTVectoredIRQ (void) __irq
00000000 E92D0003 STMDB R13!,{R0-R1}
52: IOSET1 = 0x00FF0000; //Set the LED pins
00000004 E3A018FF MOV R1,#0xFF0000
00000008 E5100000 LDR R0,=0xE0028014
0000000C E5801000 STR R1,[R0,#0x0]
53: EXTINT = 0x00000002; //Clear the peripheral interrupt flag
00000010 E3A01002 MOV R1,#0x2
00000014 E5100000 LDR R0,=0xE01FC140
00000018 E5C01000 STRB R1,[R0,#0x0]
54: VICVectAddr = 0x00000000; //Dummy write to signal end of interrupt
0000001C E3A01000 MOV R1,#0x0
00000020 E5100000 LDR R0,=0xFFFFF030
00000024 E5801000 STR R1,[R0,#0x0]
55: }
00000028 E8BD0003 LDMIA R13!,{R0-R1}
0000002C E25EF004 SUBS R15,R14,#0x0004
00000030 ENDP ; 'EXTINTVectoredIRQ?A'
Module Information Static
----------------------------------
code size = ------
ARM COMPILER V2.00f, main 20/02/05 10:05:03 PAGE 3
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 + -