📄 uart0.lst
字号:
ARM COMPILER V2.42, Uart0 06/01/06 13:37:33 PAGE 1
ARM COMPILER V2.42, COMPILATION OF MODULE Uart0
OBJECT MODULE PLACED IN .\Obj\Uart0.obj
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe Uart0.c THUMB BROWSE DEBUG PRINT(.\LST\UART0.LST) TABS(4) OBJECT(.\Obj\Uart0
-.obj)
stmt level source
1
2 #include <LPC214X.H>
3
4
5 /****************************************************************************
6 发送一个字节
7 ****************************************************************************/
8 void Sent_Byte(unsigned char data)
9 {
10 1 U0THR = data; // 发送数据
11 1
12 1 while( (U0LSR&0x40)==0 ); // 等待数据发送完毕
13 1 }
14
15
16 /****************************************************************************
17 发送一串字符
18 ****************************************************************************/
19 void Sent_Str(unsigned char const *str)
20 { while(1)
21 1 { if( *str == '\0' ) break;
22 2 Sent_Byte(*str++); // 发送数据
23 2 }
24 1 }
25
26 /****************************************************************************
27 接收一个字节
28 ****************************************************************************/
29
30 int Get_Byte (void) { /* Read character from Serial Port */
31 1
32 1 while (!(U0LSR & 0x01));
33 1
34 1 return (U0RBR);
35 1 }
ARM COMPILER V2.42, Uart0 06/01/06 13:37:33 PAGE 2
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** PUBLICS:
PUBLIC Sent_Byte?T
PUBLIC Sent_Str?T
PUBLIC Get_Byte?T
*** CODE SEGMENT '?PR?Sent_Byte?T?Uart0':
8: void Sent_Byte(unsigned char data)
00000000 1C02 MOV R2,R0 ; data
00000002 ---- Variable 'data' assigned to Register 'R2' ----
10: U0THR = data; // 发送数据
00000002 1C11 MOV R1,R2 ; data
00000004 4800 LDR R0,=0xE000C000
00000006 7001 STRB R1,[R0,#0x0]
12: while( (U0LSR&0x40)==0 ); // 等待数据发送完毕
00000008 L_1:
00000008 4800 LDR R0,=0xE000C014
0000000A 7800 LDRB R0,[R0,#0x0]
0000000C 2140 MOV R1,#0x40
0000000E 4208 TST R0,R1
00000010 D0FA BEQ L_1 ; T=0x00000008
13: }
00000012 4770 BX R14
00000014 ENDP ; 'Sent_Byte?T'
*** CODE SEGMENT '?PR?Sent_Str?T?Uart0':
19: void Sent_Str(unsigned char const *str)
00000000 B500 PUSH {LR}
00000002 1C03 MOV R3,R0 ; str
00000004 ---- Variable 'str' assigned to Register 'R3' ----
20: { while(1)
00000004 L_7:
21: { if( *str == '\0' ) break;
00000004 1C18 MOV R0,R3 ; str
00000006 7800 LDRB R0,[R0,#0x0] ; str
00000008 2800 CMP R0,#0x0
0000000A D005 BEQ L_6 ; T=0x00000018
22: Sent_Byte(*str++); // 发送数据
0000000C 1C18 MOV R0,R3 ; str
0000000E 3301 ADD R3,#0x1
00000010 7800 LDRB R0,[R0,#0x0] ; str
00000012 F7FF BL Sent_Byte?T ; T=0x0001 (1)
00000014 FFF5 BL Sent_Byte?T ; T=0x0001 (2)
23: }
00000016 E7F5 B L_7 ; T=0x00000004
00000018 L_6:
24: }
00000018 BC08 POP {R3}
0000001A 4718 BX R3
0000001C ENDP ; 'Sent_Str?T'
*** CODE SEGMENT '?PR?Get_Byte?T?Uart0':
32: while (!(U0LSR & 0x01));
00000000 L_10:
00000000 4800 LDR R0,=0xE000C014
00000002 7800 LDRB R0,[R0,#0x0]
00000004 2101 MOV R1,#0x1
00000006 4208 TST R0,R1
00000008 D0FA BEQ L_10 ; T=0x00000000
34: return (U0RBR);
0000000A 4800 LDR R0,=0xE000C000
0000000C 7800 LDRB R0,[R0,#0x0]
0000000E 4770 BX R14
00000010 ENDP ; 'Get_Byte?T'
ARM COMPILER V2.42, Uart0 06/01/06 13:37:33 PAGE 3
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 + -