XC800/XC878 8052 incompatible stack layout

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I have an issue with switch/case statements that may cause RET failure, due to unusual stack layout.

There is an exhaustive analysis by Erik Petrich (scroll down to the comment "Date: 2012-09-28 23:55:33 PDT"):
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3535290&group_id=599

I will test his workaround next week. I'm aware that this use of the RET instruction is unusual, but maybe the XC800 manuals should have a section about unusual instruction behaviour.
0 Likes
0 Replies