📄 uart3.lst
字号:
ARM COMPILER V2.32c, UART3 14/09/05 13:26:19 PAGE 1
ARM COMPILER V2.32c, COMPILATION OF MODULE UART3
OBJECT MODULE PLACED IN UART3.OBJ
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe UART3.c THUMB DEBUG TABS(4)
stmt level source
1 /*********************************************************************
2
3 Author : ADI - Apps www.analog.com/MicroConverter
4
5 Date : Sept. 2005
6
7 File : UART2.c
8
9 Hardware : Applicable to ADuC702x rev H or I silicon
10 Currently targetting ADuC7026.
11
12 Description : This code demonstrates basic UART functionality.
13 The baudrate is calculated with the following formula:
14
15 DL = HCLK
16 _______
17 Baudrate * 2 *16
18
19 ***********************************************************************/
20
21 #include <ADuC7026.h>
22 #include"stdio.h"
23
24 void delay(int);
25
26 int main (void) {
27 1
28 1 // Setup tx & rx pins on P1.0 and P1.1
29 1 GP1CON = 0x011;
30 1 // Start setting up UART at 9600bps
31 1 COMCON0 = 0x080; // Setting DLAB
32 1 COMDIV0 = 0x088; // Setting DIV0 and DIV1 to DL calculated
33 1 COMDIV1 = 0x000;
34 1 COMCON0 = 0x007; // Clearing DLAB
35 1
36 1 GP4DAT = 0x04000000; // P4.2 configured as an output. LED is turned on
37 1 printf ("Hello World\n"); // printf function call
38 1
39 1 while (1)
40 1 {
41 2 GP4DAT ^= 0x00040000; // Complement P4.2
42 2 delay(200000);
43 2 }
44 1 }
45
46 void delay (int length)
47 {
48 1 while (length >=0)
49 1 length--;
50 1 }
ARM COMPILER V2.32c, UART3 14/09/05 13:26:19 PAGE 2
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN CODE16 (printf?T)
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC delay?T
PUBLIC main
*** DATA SEGMENT '?CON?UART3':
00000000 ??S_1:
00000000 DB 'Hello World',0x0A,0x00
*** CODE SEGMENT '?PR?main?UART3':
26: int main (void) {
00000000 B500 PUSH {LR}
29: GP1CON = 0x011;
00000002 2111 MOV R1,#0x11
00000004 4800 LDR R0,=0xFFFFF404
00000006 6001 STR R1,[R0,#0x0]
31: COMCON0 = 0x080; // Setting DLAB
00000008 2180 MOV R1,#0x80
0000000A 4800 LDR R0,=0xFFFF070C
0000000C 6001 STR R1,[R0,#0x0]
32: COMDIV0 = 0x088; // Setting DIV0 and DIV1 to DL calculated
0000000E 2188 MOV R1,#0x88
00000010 4800 LDR R0,=0xFFFF0700
00000012 6001 STR R1,[R0,#0x0]
33: COMDIV1 = 0x000;
00000014 2100 MOV R1,#0x0
00000016 4800 LDR R0,=0xFFFF0704
00000018 6001 STR R1,[R0,#0x0]
34: COMCON0 = 0x007; // Clearing DLAB
0000001A 2107 MOV R1,#0x7
0000001C 4800 LDR R0,=0xFFFF070C
0000001E 6001 STR R1,[R0,#0x0]
36: GP4DAT = 0x04000000; // P4.2 configured as an output. LED is turned on
00000020 4800 LDR R1,=0x4000000
00000022 4800 LDR R0,=0xFFFFF460
00000024 6001 STR R1,[R0,#0x0]
37: printf ("Hello World\n"); // printf function call
00000026 4800 LDR R0,=??S_1 ; ??S_1
00000028 F7FF BL printf?T ; T=0x0001 (1)
0000002A FFEA BL printf?T ; T=0x0001 (2)
39: while (1)
0000002C L_3:
41: GP4DAT ^= 0x00040000; // Complement P4.2
0000002C 4800 LDR R2,=0x40000
0000002E 4800 LDR R0,=0xFFFFF460
00000030 6801 LDR R1,[R0,#0x0]
00000032 4051 EOR R1,R2
00000034 6001 STR R1,[R0,#0x0]
42: delay(200000);
00000036 4800 LDR R0,=0x30D40
00000038 F7FF BL delay?T ; T=0x0001 (1)
0000003A FFE2 BL delay?T ; T=0x0001 (2)
43: }
0000003C E7F6 B L_3 ; T=0x0000002C
44: }
0000003E BC08 POP {R3}
00000040 4718 BX R3
00000042 ENDP ; 'main'
*** CODE SEGMENT '?PR?delay?T?UART3':
46: void delay (int length)
00000000 ---- Variable 'length' assigned to Register 'R0' ----
ARM COMPILER V2.32c, UART3 14/09/05 13:26:19 PAGE 3
48: while (length >=0)
00000000 E000 B L_5 ; T=0x00000004
00000002 L_7:
00000002 3801 SUB R0,#0x1
00000004 L_5:
00000004 1C01 MOV R1,R0 ; length
00000006 2900 CMP R1,#0x0 ; length
00000008 DAFB BGE L_7 ; T=0x00000002
50: }
0000000A 4770 BX R14
0000000C ENDP ; 'delay?T'
Module Information Static
----------------------------------
code size = ------
data size = ------
const size = 13
End of Module Information.
ARM COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -