title: How to save and restore stack
body: <p>In an analog-digital mixed circuit simulator the simulator saves its state in certain moments and sometimes want to restore it. The digital device model is in C++ (using fibers). When the analog simulator request a rollback the digital device model should go to a previous state, including setting back the all local variables and EIP. Could you give me some guidelines? The digital device model is in Visual C++. I handle this situation successfully when the digital model is in VHDL. In such case the VHDL model is compiled to x86 assembly.</p>