In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: Workaround: interchange dec kCount ;decrements kCount from 1 to 0, so Z set mov w,kTimer ;in sxsim Z gets cleared after executing this instruction so main becomes main ;other tasks here bank kernel ;at this point Z=1 mov w,kTimer ;in sxsim Z gets cleared after executing this instruction dec kCount ;decrements kCount from 1 to 0, so Z set snz ; now kCount gets reloaded mov kCount,w jmp main 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=174199#m174207 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)