最近学ARM,有如下的一段中断向量汇编指令,到最后,像
SWI_Handler
B SWI_Handler
这种最后不都是死循环了么?怎么执行中断服务程序?
ENTRY
LDR PC, Reset_Addr
LDR PC, Undefined_Addr
LDR PC, SWI_Addr
LDR PC, Prefetch_Addr
LDR PC, Abort_Addr
NOP ; Reserved vector
LDR PC, IRQ_Addr
LDR PC, FIQ_Addr
IMPORT Reset_Handler ; In init.s
IMPORT IRQ_IntHandler
Reset_Addr DCD Reset_Handler
Undefined_Addr DCD Undefined_Handler
SWI_Addr DCD SWI_Handler
Prefetch_Addr DCD Prefetch_Handler
Abort_Addr DCD Abort_Handler
IRQ_Addr DCD IRQ_IntHandler
FIQ_Addr DCD FIQ_Handler
; ************************
; Exception Handlers
; ************************
; The following dummy handlers do not do anything useful in this example.
; They are set up here for completeness.
Undefined_Handler
B Undefined_Handler
SWI_Handler
B SWI_Handler
Prefetch_Handler
B Prefetch_Handler
Abort_Handler
B Abort_Handler
IRQ_Handler
B IRQ_Handler
FIQ_Handler
B FIQ_Handler
END |