Hi All
When writing IST for TMS3206701 in ccs3.3.38.2 , I find there are two main ways .
The first is
stw b0,*--b15
mvkl _xint0_isr,b0
mvkh _xint0_isr,b0
b b0
ldw *b15++,b0
nop 3
nop
nop
The second is (My way)
......
SP .set B15
....
STW B7, *SP--[2]
|| MVKL My_interrupt_fun, B7
MVKH My_interrupt_fun, B7
B B7
LDW *++SP[2], B0
It is clear the main difference is the first way using *--b15 push b0 and the second way using *SP--[2]
push b7.I think the second way (My way)maybe destroys last pushed variable or register's value because it will push
firstly SP-- secondly. But My program work well.Could it be said that both ways are right?
Thanks for any help.
Regards,
liu George