In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jon Williams wrote: Any *penalties* incurred for the start-up code or for saving context before entering the interrupt (and restoring it after) are at the [u]user's discretion[/u]. SX/B allows a NOSTARTUP option for the PROGRAM directive, and INTERRUPT instruction has NOPRESERVE and NOCODE options. The point of SX/B was to make it easy for new programmers to get started with the SX, but we also wanted advanced programmers to have their way (while simplifying their life a bit with BASIC). We think we've done this, and it's probably going to remain as is for some time as we haven't had any requests for additional features (most of the updates we've made the last few months have come from our own use as a tool). On an intersting note concerning context saving for interrupts, the way SX/B has been designed makes BASIC reentrant. I think a great example of this is how Bean made a PWM module that takes serial commands. He had to do a bit of work to ensure the interrupt always ran the same number of cycles, but by doing that he was able to use the SERIN instruction (with an adjusted baud rate) and it can be interrupted to process the PWM outputs -- that saved him the trouble of adding a software UART to the already-busy interrupt routine. I think that's pretty cool, and demonstrates just how capable SX/B is. And you can't beat the price! :tongue: ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=79285#m79307 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)