我在ADS中ro=0x0,rw=0x0c08000
AREA Init,CODE,READONLY ENTRY ;Asm Entry b Reset
Reset
然后
1。硬件初始化 2。复制二级中断异常矢量表 3。初始化各种处理器模式 接着:
;Copy and paste RW data/zero initialized data
LDR r0, =|Image$$RO$$Limit| ; Get pointer to ROM data LDR r1, =|Image$$RW$$Base| ; and RAM copy LDR r3, =|Image$$ZI$$Base| ;Zero init base => top of initialised data CMP r0, r1 ; Check that they are different BEQ %F1 0 CMP r1, r3 ; Copy init data LDRCC r2, [r0], #4 ;--> LDRCC r2, [r0] + ADD r0, r0, #4 STRCC r2, [r1], #4 ;--> STRCC r2, [r1] + ADD r1, r1, #4 BCC %B0 1 LDR r1, =|Image$$ZI$$Limit| ; Top of zero init segment MOV r2, #0 2 CMP r3, r1 ; Zero init STRCC r2, [r3], #4 BCC %B2 ldr pc, GotoMain
GotoMain DCD $MainEntry
有点搞不明白
CMP r1, r3 ; Copy init data LDRCC r2, [r0], #4 ;--> LDRCC r2, [r0] + ADD r0, r0, #4 STRCC r2, [r1], #4 ;--> STRCC r2, [r1] + ADD r1, r1, #4 BCC %B0 上面只是把bios复制到sdrom里,那bois又是什么时候,怎样会跳到sdrom里去运行了呢?44b0又没有remap机制啊
不解???