在分配堆栈空间时 StackUsr DCD UsrStackSpace + (USR_STACK_LEGTH - 1)*4 StackSvc DCD SvcStackSpace + (SVC_STACK_LEGTH - 1)*4 StackIrq DCD IrqStackSpace + (IRQ_STACK_LEGTH - 1)*4 StackFiq DCD FiqStackSpace + (FIQ_STACK_LEGTH - 1)*4 StackAbt DCD AbtStackSpace + (ABT_STACK_LEGTH - 1)*4 StackUnd DCD UndtStackSpace + (UND_STACK_LEGTH - 1)*4
AREA MyStacks, DATA, NOINIT, ALIGN=2 UsrStackSpace SPACE USR_STACK_LEGTH * 4 SvcStackSpace SPACE SVC_STACK_LEGTH * 4 IrqStackSpace SPACE IRQ_STACK_LEGTH * 4 FiqStackSpace SPACE FIQ_STACK_LEGTH * 4 AbtStackSpace SPACE ABT_STACK_LEGTH * 4 UndtStackSpace SPACE UND_STACK_LEGTH * 4
上面这段代码我看不明白,而在前面设置堆栈时 执行LDR SP, StackSvc后,R13变为0x400030FC, 执行LDR SP,StackIrq后,R13变为0x400031FC, 执行LDR SP, StackFiq后,R13变为0x4000323C, ............. 请问上面R13的值是如何算出来的? |