以下是TRAP #VectorNumber指令的一段描述:
Part of the operation involves saving pairs of 16-bit core registers onto the stack pointed
to by the SP register. Each pair of registers is saved in a single 32-bit operation.
The register forming the low word of the pair is saved first (to an even address);
the register forming the high word of the pair is saved next (to the following odd address).
问题:1.SP若指向了一个基地址,比如 0x03,第一个32bit寄存器怎么保存?保存到0x04,还是保存到0x02?
2.TRAP #16; 即RTOSINT中断会触发保存寄存器吗?保存顺序是如下顺序吗?
Johnson Chen1:
SP首先会+1,因此变成SP变成了0X04,因此会从0x04开始存。
TRAP #0; 即RTOSINT中断也会触发保存寄存器,保存顺序和表里是一样的