xxiao6130 发表于 2013-8-24 09:08
是的,你可以看看这个
我在Debug里面找到了反汇编的代码如下,是中断里面执行的指令
TIM1_UPD_OVF_TRG_COM_IRQHandler:
_interrupt_25:
008201 8A PUSH CC
008202 84 POP A
008203 A4BF AND A, #0xBF
008205 88 PUSH A
008206 86 POP CC
008207 CD8147 CALL ?push_l0
00820A CD814C CALL ?push_l1
00820D CD827A CALL TimingDelay_Decrement
008210 A601 LD A, #?b1
008212 CD834C CALL TIM1_ClearITPendingBit
008215 CD8179 CALL ?pop_l1
008218 CD816E CALL ?pop_l0
00821B 80 IRET
下面是被调用的函数
?pop_l0:
00816E 89 PUSHW X
00816F 1E05 LDW X, (?b5, SP)
008171 BF00 LDW 0x00, X
008173 1E07 LDW X, (?b7, SP)
008175 BF02 LDW ?b2, X
008177 200B JRA 0x0B
?pop_l1:
008179 89 PUSHW X
00817A 1E05 LDW X, (?b5, SP)
00817C BF04 LDW ?b4, X
00817E 1E07 LDW X, (?b7, SP)
008180 BF06 LDW ?b6, X
008182 2000 JRA 0x00
008184 1E03 LDW X, (?b3, SP)
008186 1F07 LDW (?b7, SP), X
008188 85 POPW X
008189 5B04 ADD SP, #?b4
00818B 81 RET
?push_l0:
008147 88 PUSH A
008148 A600 LD A, #0x00
00814A 2005 JRA 0x05
?push_l1:
00814C 88 PUSH A
00814D A604 LD A, #?b4
00814F 2000 JRA 0x00
008151 88 PUSH A
008152 89 PUSHW X
008153 7B04 LD A, (?b4, SP)
008155 88 PUSH A
008156 7B04 LD A, (?b4, SP)
008158 89 PUSHW X
008159 1E08 LDW X, (?b8, SP)
00815B 1F04 LDW (?b4, SP), X
00815D 5F CLRW X
00815E 97 LD XL, A
00815F 1F08 LDW (?b8, SP), X
008161 FE LDW X, (X)
008162 1F06 LDW (?b6, SP), X
008164 1E08 LDW X, (?b8, SP)
008166 5C INCW X
008167 5C INCW X
008168 FE LDW X, (X)
008169 1F08 LDW (?b8, SP), X
00816B 85 POPW X
00816C 84 POP A
00816D 81 RET
TimingDelay_Decrement:
00827A CD8335 CALL 0x8335
00827D 2602 JRNE 0x02
00827F BE02 LDW X, ?b2
008281 270F JREQ 0x0F
008283 AE000C LDW X, #TimingDelay
008286 CD8260 CALL ?load32_l0_0x
008289 CD8293 CALL ?dec32_l0_l0
00828C AE000C LDW X, #TimingDelay
00828F CD826C CALL ?load32_0x_l0
008292 81 RET
TIM1_ClearITPendingBit:
00834C 43 CPL A
00834D C752B6 LD TIM1_SR1, A
008350 81 RET
是不是就意味着执行这些指令的时间就是上面我测得的约20us?
|