📄 main.lst
字号:
ARM COMPILER V2.00f, main 19/02/05 10:02:20 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: Standard IO */
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 Standard I/O program for LPC2100 */
17 /* */
18 /* Demonstrates interfacing STDIO library function */
19 /* to low level drivers */
20 /* */
21 /* Oscillator frequency 12.000 Mhz */
22 /* Target board Keil MCB2100 */
23 /************************************************************/
24
25 #include <LPC21xx.H>
26 #include <stdio.h>
27
28 void UART0 (void);
29
30
31 int main(void)
32 {
33 1 UART0 (); //Initilise the UART
34 1
35 1 while(1)
36 1 {
37 2 printf("\n\n\nHello World, well its traditional \n"); //Call the prinff function
38 2
39 2 }
40 1
41 1 }
42
43
44
45 void UART0 (void)
46 {
47 1 PINSEL0 = 0x05; // Select TxD and RxD on pin connect block
48 1 U0LCR = 0x80; //Enable programming of divisor latches
49 1
50 1 U0DLL = 0xC2; //Program the divisor latch for 19200 baud
51 1 U0DLM = 0x00;
52 1
53 1 U0LCR = 0x33; //Program the line control 8\N\1
54 1 U0FCR = 0x4F; //enable the FIFO's
55 1
56 1 }
57
58
59
ARM COMPILER V2.00f, main 19/02/05 10:02:20 PAGE 2
60
61
62
ARM COMPILER V2.00f, main 19/02/05 10:02:20 PAGE 3
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN CODE16 (printf?T)
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC UART0?T
PUBLIC main
*** DATA SEGMENT '?CON?main':
00000000 ??S_1:
00000000 DB 0x0A,0x0A,0x0A,'Hello World, well its t'
0000001A DB 'raditional ',0x0A,0x00
*** CODE SEGMENT '?PR?main?main':
31: int main(void)
00000000 B500 PUSH {LR}
33: UART0 (); //Initilise the UART
00000002 F7FF BL UART0?T ; T=0x0001 (1)
00000004 FFFD BL UART0?T ; T=0x0001 (2)
35: while(1)
00000008 L_3:
37: printf("\n\n\nHello World, well its traditional \n"); //Call the prinff function
00000008 4800 LDR R0,=??S_1 ; ??S_1
0000000A F7FF BL printf?T ; T=0x0001 (1)
0000000C FFF9 BL printf?T ; T=0x0001 (2)
39: }
00000010 E7FA B L_3 ; T=0x00000008
00000012 BC08 POP {R3}
00000014 4718 BX R3
00000016 ENDP ; 'main'
*** CODE SEGMENT '?PR?UART0?T?main':
47: PINSEL0 = 0x05; // Select TxD and RxD on pin connect block
00000000 2105 MOV R1,#0x5
00000002 4800 LDR R0,=0xE002C000
00000004 6001 STR R1,[R0,#0x0]
48: U0LCR = 0x80; //Enable programming of divisor latches
00000006 2180 MOV R1,#0x80
00000008 4800 LDR R0,=0xE000C00C
0000000A 7001 STRB R1,[R0,#0x0]
50: U0DLL = 0xC2; //Program the divisor latch for 19200 baud
0000000C 21C2 MOV R1,#0xC2
0000000E 4800 LDR R0,=0xE000C000
00000010 7001 STRB R1,[R0,#0x0]
51: U0DLM = 0x00;
00000012 2100 MOV R1,#0x0
00000014 4800 LDR R0,=0xE000C004
00000016 7001 STRB R1,[R0,#0x0]
53: U0LCR = 0x33; //Program the line control 8\N\1
00000018 2133 MOV R1,#0x33
0000001A 4800 LDR R0,=0xE000C00C
0000001C 7001 STRB R1,[R0,#0x0]
54: U0FCR = 0x4F; //enable the FIFO's
0000001E 214F MOV R1,#0x4F
00000020 4800 LDR R0,=0xE000C008
00000022 7001 STRB R1,[R0,#0x0]
56: }
00000024 4770 BX R14
00000026 ENDP ; 'UART0?T'
Module Information Static
----------------------------------
code size = ------
data size = ------
const size = 39
ARM COMPILER V2.00f, main 19/02/05 10:02:20 PAGE 4
End of Module Information.
ARM COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -