📄 intrp.lst
字号:
*** CODE SEGMENT '?PR?init_timer?T?Intrp':
42: T0MR0 = 1499; // 0.1mSec = 1.500-1 counts
00000000 4800 LDR R1,=0x5DB
00000002 4800 LDR R0,=0xE0004018
00000004 6001 STR R1,[R0,#0x0]
43: T0MCR = 3; // Interrupt and Reset on MR0
00000006 2103 MOV R1,#0x3
00000008 4800 LDR R0,=0xE0004014
0000000A 6001 STR R1,[R0,#0x0]
44: T0TCR = 1; // Timer0 Enable
0000000C 2101 MOV R1,#0x1
0000000E 4800 LDR R0,=0xE0004004
00000010 6001 STR R1,[R0,#0x0]
45: VICVectAddr0 = (unsigned long)tc0; // set interrupt vector in 0
00000012 4900 LDR R1,=tc0?A ; tc0?A
00000014 4800 LDR R0,=0xFFFFF100
00000016 6001 STR R1,[R0,#0x0]
46: VICVectCntl0 = 0x20 | 4; // use it for Timer 0 Interrupt
00000018 2124 MOV R1,#0x24
0000001A 4800 LDR R0,=0xFFFFF200
0000001C 6001 STR R1,[R0,#0x0]
47: VICIntEnable = 0x00000010; // Enable Timer0 Interrupt
0000001E 2110 MOV R1,#0x10
00000020 4800 LDR R0,=0xFFFFF010
00000022 6001 STR R1,[R0,#0x0]
48: }
00000024 4770 BX R14
00000026 ENDP ; 'init_timer?T'
*** CODE SEGMENT '?PR?delay?T?Intrp':
51: void delay (void) {
00000000 ; SCOPE-START
53: for (i = 0; i < 0x50000; i++) {
00000000 2000 MOV R0,#0x0
00000002 ---- Variable 'i' assigned to Register 'R0' ----
55: }
00000002 L_2:
00000002 3001 ADD R0,#0x1
00000004 4800 LDR R1,=0x50000
00000006 4288 CMP R0,R1 ; i
00000008 DBFB BLT L_2 ; T=0x00000002
0000000A ; SCOPE-END
56: }
0000000A 4770 BX R14
0000000C ENDP ; 'delay?T'
*** CODE SEGMENT '?PR?eint1_srv?A?Intrp':
59: void eint1_srv (void) __irq {
00000000 E92D5F0F STMDB R13!,{R0-R3,R8-R12,LR}
00000004 ; SCOPE-START
61: EXTINT = 2; // Clear EINT1 interrupt flag
00000004 E3A01002 MOV R1,#0x2
00000008 E5100000 LDR R0,=0xE01FC140
0000000C E5C01000 STRB R1,[R0,#0x0]
62: IENABLE; // allow nested interrupts
00000010 E14FE000 MRS R14,SPSR
00000014 E92D4000 STMFD R13!,{LR}
00000018 E321F01F MSR CPSR_c,#0x1F
0000001C E92D4000 STMFD R13!,{LR}
63: delay (); // wait a long time
00000020 EBFFFFF6 BL delay?A ; Targ=0x0
64: ++intrp_count; // increment interrupt count
ARM COMPILER V2.00f, Intrp 11/02/05 12:47:27 PAGE 5
00000024 E5100000 LDR R0,=intrp_count ; intrp_count
00000028 E5901000 LDR R1,[R0,#0x0] ; intrp_count
0000002C E2811001 ADD R1,R1,#0x0001
00000030 E5801000 STR R1,[R0,#0x0] ; intrp_count
65: IDISABLE; // disable interrupt nesting
00000034 E8BD4000 LDMFD R13!,{LR}
00000038 E321F092 MSR CPSR_c,#0x92
0000003C E8BD4000 LDMFD R13!,{LR}
00000040 E16FF00E MSR SPSR_cxsf,R14
66: VICVectAddr = 0; // Acknowledge Interrupt
00000044 E3A01000 MOV R1,#0x0
00000048 E5100000 LDR R0,=0xFFFFF030
0000004C E5801000 STR R1,[R0,#0x0]
00000050 ; SCOPE-END
67: }
00000050 E8BD5F0F LDMIA R13!,{R0-R3,R8-R12,LR}
00000054 E25EF004 SUBS R15,R14,#0x0004
00000058 ENDP ; 'eint1_srv?A'
*** CODE SEGMENT '?PR?init_eint1?T?Intrp':
71: EXTMODE = 2; // Edge sensitive mode on EINT1
00000000 2102 MOV R1,#0x2
00000002 4800 LDR R0,=0xE01FC148
00000004 7001 STRB R1,[R0,#0x0]
72: EXTPOLAR = 2; // raising edge sensitive
00000006 2102 MOV R1,#0x2
00000008 4800 LDR R0,=0xE01FC14C
0000000A 7001 STRB R1,[R0,#0x0]
73: PINSEL0 = 2 << 28; // Enable EINT1 on GPIO_0.14
0000000C 4800 LDR R1,=0x20000000
0000000E 4800 LDR R0,=0xE002C000
00000010 6001 STR R1,[R0,#0x0]
74: VICVectAddr1 = (unsigned long) eint1_srv; // set interrupt vector in VIC 0
00000012 4900 LDR R1,=eint1_srv?A ; eint1_srv?A
00000014 4800 LDR R0,=0xFFFFF104
00000016 6001 STR R1,[R0,#0x0]
75: VICVectCntl1 = 0x21 | 15; // use VIC 1 for EINT1 Interrupt
00000018 212F MOV R1,#0x2F
0000001A 4800 LDR R0,=0xFFFFF204
0000001C 6001 STR R1,[R0,#0x0]
76: VICIntEnable = 1 << 15; // Enable EINT1 Interrupt
0000001E 4800 LDR R1,=0x8000
00000020 4800 LDR R0,=0xFFFFF010
00000022 6001 STR R1,[R0,#0x0]
77: }
00000024 4770 BX R14
00000026 ENDP ; 'init_eint1?T'
*** CODE SEGMENT '?PR?main?Intrp':
79: int main (void) {
00000000 B500 PUSH {LR}
00000002 ; SCOPE-START
80: unsigned int LED_out = 0;
00000002 2400 MOV R4,#0x0
00000004 ---- Variable 'LED_out' assigned to Register 'R4' ----
82: IODIR1 = 0xFF0000;
00000004 4800 LDR R1,=0xFF0000
00000006 4800 LDR R0,=0xE0028018
00000008 6001 STR R1,[R0,#0x0]
84: init_eint1(); // Enable EINT1
0000000A F7FF BL init_eint1?T ; T=0x0001 (1)
0000000C FFF9 BL init_eint1?T ; T=0x0001 (2)
85: init_timer ();
00000010 F7FF BL init_timer?T ; T=0x0001 (1)
00000012 FFF6 BL init_timer?T ; T=0x0001 (2)
87: while (1) {
00000016 L_9:
88: if ((intrp_count & 0xFF) != LED_out) { // intrp_count has changed
ARM COMPILER V2.00f, Intrp 11/02/05 12:47:27 PAGE 6
00000016 4800 LDR R0,=intrp_count ; intrp_count
00000018 6800 LDR R0,[R0,#0x0] ; intrp_count
0000001A 21FF MOV R1,#0xFF
0000001C 4008 AND R0,R1
0000001E 42A0 CMP R0,R4 ; LED_out
00000020 D008 BEQ L_11 ; T=0x00000034
89: LED_out = (intrp_count & 0x7F); // set LED out
00000022 4800 LDR R0,=intrp_count ; intrp_count
00000024 6804 LDR R4,[R0,#0x0] ; intrp_count
00000026 207F MOV R0,#0x7F
00000028 4004 AND R4,R0
90: IOCLR1 = 0x7F0000; // clear LED's
0000002A 4800 LDR R1,=0x7F0000
0000002C 4800 LDR R0,=0xE002801C
0000002E 6001 STR R1,[R0,#0x0]
91: IOSET1 = (LED_out << 16); // output intrp_count on LED
00000030 1C21 MOV R1,R4 ; LED_out
00000032 0409 LSL R1,R1,#0x10 ; LED_out
00000034 4800 LDR R0,=0xE0028014
00000036 6001 STR R1,[R0,#0x0]
92: }
00000038 L_11:
93: if ((SecondCnt & 1) == 0) IOCLR1 = 0x800000;
00000038 4800 LDR R0,=SecondCnt ; SecondCnt
0000003A 6800 LDR R0,[R0,#0x0] ; SecondCnt
0000003C 2101 MOV R1,#0x1
0000003E 4208 TST R0,R1
00000040 D101 BNE L_12 ; T=0x00000046
00000042 4800 LDR R1,=0x800000
00000044 4800 LDR R0,=0xE002801C
00000046 6001 STR R1,[R0,#0x0]
00000048 E7E5 B L_9 ; T=0x00000016
0000004A L_12:
94: else IOSET1 = 0x800000;
0000004A 4800 LDR R1,=0x800000
0000004C 4800 LDR R0,=0xE0028014
0000004E 6001 STR R1,[R0,#0x0]
95: }
00000050 E7E1 B L_9 ; T=0x00000016
00000052 ; SCOPE-END
00000052 BC08 POP {R3}
00000054 4718 BX R3
00000056 ENDP ; 'main'
Module Information Static
----------------------------------
code size = ------
data size = 12
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 + -