In SX Microcontrollers, SX/B Compiler and SX-Key Tool, veecee42 wrote: Funny, I studied on exact the same bug quite a while this morning. I had the following case: definition: SUBROUTINE SUB 0 and the call was in an if IF x THEN SUBROUTINE I discover this compiled to a conditional jmp instruction, resulting in a runtime error - retp without call or something like that (because the stack was empty). I also found that changing this in IF X THEN SUBROUTINE ENDIF compiled ok (resulting in a call instead of a jump) Maybe this helps a bit.. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=137020#m137221 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)