We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I'm devlopping a application based on a 8-bit microcontroller and i'm looking for a code example in assembly in order to save/restore CPU stack (return address on 16 bits) in external RAM (xdata) in order to avoid stack overflow... I would appreciate if someone could help me or give a code example. Bye
Step into the assembly and see what it does. If you really want to code your own, you'll be using DPTR to point into xdata and a register to point into idata space, probably DJNZ to count. It's just a loop.