📄 tmrtest.lst
字号:
ARM COMPILER V2.53, tmrtest 27/07/06 14:32:47 PAGE 1
ARM COMPILER V2.53, COMPILATION OF MODULE tmrtest
OBJECT MODULE PLACED IN .\Obj\tmrtest.obj
COMPILER INVOKED BY: g:\Keil\ARM\BIN\CA.exe tmrtest.c THUMB INCDIR(..\Common\inc) DEBUG PRINT(.\LST\TMRTEST.LST) TABS(4)
- OBJECT(.\Obj\tmrtest.obj)
stmt level source
1 /*****************************************************************************
2 * tmrtest.c: main C entry file for Philips LPC214x Family Microprocessors
3 *
4 * Copyright(C) 2006, Philips Semiconductor
5 * All rights reserved.
6 *
7 * History
8 * 2005.10.01 ver 1.00 Prelimnary version, first Release
9 *
10 ******************************************************************************/
11 #include "LPC214x.H" /* LPC21xx definitions */
12 #include "type.h"
13 #include "irq.h"
14 #include "timer.h"
15
16 extern DWORD timer_counter;
17
18 /*****************************************************************************
19 ** Main Function main()
20 *****************************************************************************/
21 int main (void)
22 {
23 1 /************ The main Function is an endless loop ************/
24 1 /* The timer routine is tested on the Keil MCB214x board */
25 1 IODIR1 = 0x00FF0000; /* P1.16..23 defined as Outputs */
26 1 IOCLR1 = 0x00FF0000; /* turn off all the LEDs */
27 1 init_VIC();
28 1 init_timer();
29 1
30 1 enable_timer( 0 );
31 1
32 1 while (1)
33 1 { /* Loop forever */
34 2 if ( timer_counter > 0x100 )
35 2 {
36 3 IOSET1 = 0x000F0000; /* turn off P1.20~23 */
37 3 IOCLR1 = 0x00F00000; /* turn on P1.16~19 */
38 3 if ( timer_counter > 0x200 )
39 3 {
40 4 timer_counter = 0;
41 4 }
42 3 }
43 2 else
44 2 {
45 3 IOSET1 = 0x00F00000; /* turn on P1.20~23 */
46 3 IOCLR1 = 0x000F0000; /* turn off P1.16~19 */
47 3 }
48 2 }
49 1 return 0;
50 1 }
51
52 /*****************************************************************************
53 ** End Of File
54 ******************************************************************************/
ARM COMPILER V2.53, tmrtest 27/07/06 14:32:47 PAGE 2
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN CODE16 (init_VIC?T)
EXTERN CODE16 (init_timer?T)
EXTERN CODE16 (enable_timer?T)
EXTERN DATA (timer_counter)
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC main
*** CODE SEGMENT '?PR?main?tmrtest':
21: int main (void)
00000000 B500 PUSH {LR}
25: IODIR1 = 0x00FF0000; /* P1.16..23 defined as Outputs */
00000002 4800 LDR R1,=0xFF0000
00000004 4800 LDR R0,=0xE0028018
00000006 6001 STR R1,[R0,#0x0]
26: IOCLR1 = 0x00FF0000; /* turn off all the LEDs */
00000008 4800 LDR R0,=0xE002801C
0000000A 6001 STR R1,[R0,#0x0]
27: init_VIC();
0000000C F7FF BL init_VIC?T ; T=0x0001 (1)
0000000E FFF8 BL init_VIC?T ; T=0x0001 (2)
28: init_timer();
00000010 F7FF BL init_timer?T ; T=0x0001 (1)
00000012 FFF6 BL init_timer?T ; T=0x0001 (2)
30: enable_timer( 0 );
00000014 2000 MOV R0,#0x0
00000016 F7FF BL enable_timer?T ; T=0x0001 (1)
00000018 FFF3 BL enable_timer?T ; T=0x0001 (2)
32: while (1)
0000001A L_3:
34: if ( timer_counter > 0x100 )
0000001A 4800 LDR R0,=timer_counter ; timer_counter
0000001C 6800 LDR R0,[R0,#0x0] ; timer_counter
0000001E 4940 LDR R1,=0x100
00000020 4288 CMP R0,R1
00000022 D90C BLS L_5 ; T=0x0000003E
36: IOSET1 = 0x000F0000; /* turn off P1.20~23 */
00000024 4800 LDR R2,=0xF0000
00000026 4800 LDR R1,=0xE0028014
00000028 600A STR R2,[R1,#0x0]
37: IOCLR1 = 0x00F00000; /* turn on P1.16~19 */
0000002A 4800 LDR R2,=0xF00000
0000002C 4800 LDR R1,=0xE002801C
0000002E 600A STR R2,[R1,#0x0]
38: if ( timer_counter > 0x200 )
00000030 4980 LDR R1,=0x200
00000032 4288 CMP R0,R1
00000034 D9F1 BLS L_3 ; T=0x0000001A
40: timer_counter = 0;
00000036 2100 MOV R1,#0x0
00000038 4800 LDR R0,=timer_counter ; timer_counter
0000003A 6001 STR R1,[R0,#0x0] ; timer_counter
42: }
0000003C E7ED B L_3 ; T=0x0000001A
0000003E L_5:
45: IOSET1 = 0x00F00000; /* turn on P1.20~23 */
0000003E 4800 LDR R1,=0xF00000
00000040 4800 LDR R0,=0xE0028014
00000042 6001 STR R1,[R0,#0x0]
46: IOCLR1 = 0x000F0000; /* turn off P1.16~19 */
00000044 4800 LDR R1,=0xF0000
ARM COMPILER V2.53, tmrtest 27/07/06 14:32:47 PAGE 3
00000046 4800 LDR R0,=0xE002801C
00000048 6001 STR R1,[R0,#0x0]
48: }
0000004A E7E6 B L_3 ; T=0x0000001A
50: }
0000004C BC08 POP {R3}
0000004E 4718 BX R3
00000050 ENDP ; 'main'
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 + -