STM8-Emulator icon indicating copy to clipboard operation
STM8-Emulator copied to clipboard

about push pop instruction

Open JiaDuo opened this issue 3 years ago • 1 comments

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.​

JiaDuo avatar Jul 22 '21 06:07 JiaDuo

This is very likely incorrect behavior. I was just learning STM8 as I was writing this. Let me look at the datasheets and the code again, I probably made a mistake.

mikechambers84 avatar Aug 03 '21 02:08 mikechambers84