vectors.s

来自「专业汽车级嵌入式操作系统OSEK的源代码」· S 代码 · 共 34 行

S
34
字号
@  This is the vector set up for an AT91SAM7	.text	.code 32	.align 	0	@ This is not actally executed in this code stream. Instead it is@ copied into the reloacted vector space.@ NB When executing the first instruction in an abort/interrupt, the pc is 8 (ie 2 instructions)@ ahead of the start of instruction being executed.@ Hence,  for the first 6 vectors, the ldr loads the correct address into pc by looking at pc + 0x18.@@ For the IRQ and FIQ, we subtract 0xF20 to get to the vectors held in the AIC.@@ NB We do not do branches because these would get screwed up by relocation.@	    ldr   pc,v0	 	 	@ reset vector            ldr   pc,v1	  		@ Undefined Instruction            ldr   pc,v2	 	 	@ Software Interrupt            ldr   pc,v3	  		@ Prefetch Abort            ldr   pc,v4		  	@ Data Abort            ldr   pc,v5		  	@ reserved	    ldr   pc,[pc,#-0xF20]	@ IRQ : read the AIC	    ldr   pc,[pc,#-0xF24]	@ FIQ : read the AICv0:	    .long startv1:	    .long undef_handlerv2:         .long swi_handlerv3:         .long prefetch_abort_handlerv4:	    .long data_abort_handlerv5:	    .long reserved_handler

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?