In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: Hi, I appended a program to perform a single context switch using the secret instructions. My goal is to have a single userdefined interrupt routine, that executes outside the isr. Several issues: 1) I save register M manually but since the context switch is done inside the isr (the real isr via rtcc) M gets restored to whatever value it had upon entering the isr. How to restore M to its value before running the misr (mainlevel interrupt) 2) Upon finishing the misr (which runs as mainlevel code outside isr) I await the next rtcc interrupt before returning to the normal mainlevel code. Is it possible to do a context switch outside isr that will never be interrupted by an rtcc interrupt. This to avoid the wait. 3) I use bank0 to save registers and skipped the first 4 bytes as these are used by SX/B. The others are not as far as I know. Please tell me if these are used and for what purpose. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=174063 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)