In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: It matters because SX/B uses your definitions to create a jump table and due to the SX architecture the jump table needs to be located in the upper half of a code page. If you'll simply use the template that is in the help file you will rarely have a problem (I've attached my present version; download and install it in your SX Templates folder). The SX and SX/B have rules, follow them and your SX/B life will be easy. In case you're not sure where the Templates folder is, the location on my system is as follows (yours should be similar): C:\Program Files\Parallax Inc\SX-Key v3.2.3\Templates Now, if you have a very large interrupt -- which must come ahead of the of the subroutine and function declarations -- you may end up having the interrupt jump to another section of of the listing so that the jump table is properly located. In my experience (and I write a LOT of SX/B programs) this doesn't happen very often so don't be concerned about it now. You seem frustrated with SX/B and that there's not as much information for it as there is for the BS2. To be candid, SX/B is not as easy as PBASIC and never will be, and the SX is not as big of seller as the BS2 so Parallax can only devote so many resources to it. The benefit to sticking it out, though, is that you will gain tremendous horsepower using the SX and will be able to do things that you never could with a BS2 module. Stick with it, it's worth the effort. Just Friday I got a call form a big amusement park in my area (the one run by a rodent) that loves the SX and they asked me to write them another SX/B program for a show. In addition to using the EFX-TEK Prop-SX in several areas of the park I have designed custom devices for them; all are SX-based and programmed in SX/B (with a bit of Assembly mixed in, but this is one of the strengths of SX/B). A note about my template: I prefer to declare IO pins before constants; some programmers go the other way so that they can use constants in their IO pin definitions. If you prefer the latter, simply move the section headers. I created this template to keep my thoughts organized so that I always put the right code in the right place -- this lets me focus on the solution to the problem. I think it will help you, too. Good luck and have fun with your SX/B projects. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=289997#m290114 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)