In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: Hi pjv, I think I've got it right now. One question though, just before pushstat in saveMainLoopContext, you clear w to make reti work. In your original RTOS you have in startT1 mov w,#T1uSec10>>4&$E0 ;high 3 address bits pushstat ;prep thread address hi which preserves the high 3 bits of the T1 thread code. But these are already loaded in pc shadow. Why must these status bits be setup, and if so, shouldn't I setup status with 3 high bits of MainIsr address instead of 0? 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=108896#m109159 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)