?? main.lst
字號:
ARM COMPILER V2.00f, main 19/02/05 09:47:21 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: Thumb */
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 2004 */
12 /* LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION */
13 /************************************************************/
14 /* Function: */
15 /* */
16 /* Example Thumb program for LPC2100 */
17 /* */
18 /* Demonstrates APCS and ARM - Thumb interworking */
19 /* */
20 /* Oscillator frequency 12.000 Mhz */
21 /* Target board Keil MCB2100 */
22 /************************************************************/
23
24 #include <LPC21xx.H>
25
26 void thumb_function(void); //External prototype for thumb function
27
28 int main(void) __arm
29 {
30 1 IODIR1 = 0x00FF0000;
31 1
32 1
33 1 while(1)
34 1 {
35 2 IOCLR1 = 0x00FF0000;
36 2 thumb_function(); //Call Thumb function
37 2 }
38 1 }
39
40
41
42 void thumb_function(void) __thumb
43 {
44 1 unsigned int i,delay;
45 1
46 1 for (i = 0x00001000;i < 0x01000000 ;i = i<<1) //LED flasher
47 1 {
48 2
49 2 for (delay = 0;delay<0x010000;delay++) //simple delay loop
50 2 {
51 3 ;
52 3 }
53 2 IOSET1 = i; //Set the next led
54 2 }
55 1 }
56
57
58
59
ARM COMPILER V2.00f, main 19/02/05 09:47:21 PAGE 2
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC thumb_function?T
PUBLIC thumb_function?A
PUBLIC main
*** CODE SEGMENT '?PR?main?main':
28: int main(void) __arm
00000000 E92D4000 STMDB R13!,{LR}
30: IODIR1 = 0x00FF0000;
00000004 E3A018FF MOV R1,#0xFF0000
00000008 E5100000 LDR R0,=0xE0028018
0000000C E5801000 STR R1,[R0,#0x0]
33: while(1)
00000010 L_3:
35: IOCLR1 = 0x00FF0000;
00000010 E3A018FF MOV R1,#0xFF0000
00000014 E5100000 LDR R0,=0xE002801C
00000018 E5801000 STR R1,[R0,#0x0]
36: thumb_function(); //Call Thumb function
0000001C EBFFFFF7 BL thumb_function?A ; Targ=0x0
37: }
00000020 EAFFFFFA B L_3 ; Targ=0x10
00000024 E8BD0008 LDMIA R13!,{R3}
00000028 E12FFF13 BX R3
0000002C ENDP ; 'main'
*** CODE SEGMENT '?PR?thumb_function?T?main':
43: {
00000000 ; SCOPE-START
46: for (i = 0x00001000;i < 0x01000000 ;i = i<<1) //LED flasher
00000000 4800 LDR R0,=0x1000
00000002 ---- Variable 'i' assigned to Register 'R0' ----
49: for (delay = 0;delay<0x010000;delay++) //simple delay loop
00000002 L_14:
00000002 2100 MOV R1,#0x0
00000004 ---- Variable 'delay' assigned to Register 'R1' ----
52: }
00000004 L_10:
00000004 3101 ADD R1,#0x1
00000006 4800 LDR R2,=0x10000
00000008 4291 CMP R1,R2 ; delay
0000000A D3FB BCC L_10 ; T=0x00000004
53: IOSET1 = i; //Set the next led
0000000C 1C02 MOV R2,R0 ; i
0000000E 4800 LDR R1,=0xE0028014
00000010 600A STR R2,[R1,#0x0]
54: }
00000012 0040 LSL R0,R0,#0x1 ; i
00000014 4800 LDR R1,=0xFF000000
00000016 42C8 CMN R0,R1 ; i
00000018 D3F3 BCC L_14 ; T=0x00000002
0000001A ; SCOPE-END
55: }
0000001A 4770 BX R14
0000001C ENDP ; 'thumb_function?T'
Module Information Static
----------------------------------
code size = ------
data size = ------
const size = ------
ARM COMPILER V2.00f, main 19/02/05 09:47:21 PAGE 3
End of Module Information.
ARM COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -