;****************************************************
;* Setup IRQ handler *
;****************************************************
ldr r0,=(_IRQ_BASEADDRESS + 0x100)
ldr r2,=_IRQ_BASEADDRESS
add r3,r0, #0x100
0
CMP r0, r3 ;do what?
STRCC r2, [r0], #4;cc:Carry clear;save R2 to R0 address, R0 + 4=R0。
BCC %B0
;上面这段是什么意思??
ldr r1,=_IRQ_BASEADDRESS
ldr r0,=ExceptionHanlderBegin ;if there isn't 'subs pc,lr,#4' at 0x18, 0x1c'
ldr r3,=ExceptionHanlderEnd
0
CMP r0, r3 ;put the vector table at _IRQ_BASEADDRESS(0xc000000)
LDRCC r2, [r0], #4
STRCC r2, [r1], #4
BCC %B0
ldr r1,=DIsrIRQ ;put the IRQ judge program at _IRQ_BASEADDRESS+0x80(0xc000080)
ldr r0,=IsrIRQ ;if there isn't 'subs pc,lr,#4' at 0x18, 0x1c'
ldr r3,=IsrIRQEnd
0
CMP r0, r3
LDRCC r2, [r0], #4
STRCC r2, [r1], #4
BCC %B0
ldr r1, =MyHandleIRQ ;MyHandleIRQ point to DIsrIRQ
ldr r0, =ExceptionHanlderBegin
ldr r4, =_IRQ_BASEADDRESS;////
sub r0, r1, r0
;add r0, r0, #_IRQ_BASEADDRESS
add r0, r0,r4
ldr r1, =DIsrIRQ
str r1, [r0]