cancel
Showing results for 
Search instead for 
Did you mean: 

About PUSH POP instructions。

jduo.1
Associate II

I test push and pop instruction,some issue confuse me. ​

push cc  #cc = 0

​when cc=0,and cc is push to stack,the value in stack is 0x28,this mean I1 I0 is set,why?

pop cc​   #cc=0

when​ cc in stack is 0x2b,after pop,cc change to be 0x3 ,this mean I1 I0 is cleared auto,why?

the behave is correct?Please help me.

thanks.​

3 REPLIES 3
SBEN .2
Senior II

Hello @jduo.1​ ,

0693W00000D0JDGQA3.pngAre you sur that no interrupt happened while you're stepping?

Could you disable the interrupts using SIM and retest your code?

0693W00000D0JETQA3.png 

Disclaimer: I've never used STM8, I've just skimmed through PM0044.

Best regards,

@SBEN .2​ 

jduo.1
Associate II

I use STVD to debug, the program is not exsit ....

maybe this is caused by stm8-gdb.

jduo.1
Associate II

thank you very much