In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jon Williams wrote: Gordon, Don't be disuaded by that term "non optimizing." Parallax happens to be very honest in its approach, most companies would never mention that about the same kind of compiler. But let me show you that this is NOT a problem, and gets you into the SX very quickly. And help you learn assembly as you can see the compiled output (you can even modify it to experiment). I'm part of the EFX group and we have some new serial modules coming that use the SX and are completely programmed in SX/B. Yes, we use our own tools to develop products. The devices we're creating follow the Parallax AppMod protocol, and generally want to wait on a specific header, for example, something like this: "!EFX" If we code for that header like this: Main: SERIN Sio, Baud, char IF char <> "!" THEN Main SERIN Sio, Baud, char IF char <> "E" THEN Main SERIN Sio, Baud, char IF char <> "F" THEN Main SERIN Sio, Baud, char IF char <> "X" THEN Main ... it works, but each instance of SERIN uses of a bit of code space. So we can hand-optimize (which assembly programmers do all the time) by putting SERIN into a subroutine: RXBYTE: SERIN Sio, Baud, temp1 RETURN temp1 Now the SERIN code is compiled in just one place. As of version 1.3, subroutines can behave like functions, so the header block above would be recoded as: Main: char = RXBYTE IF char <> "!" THEN Main char = RXBYTE IF char <> "E" THEN Main char = RXBYTE IF char <> "F" THEN Main char = RXBYTE IF char <> "X" THEN Main Since -- other than the PBASIC-like commands -- SX/B is a light version of BASIC, most lines of code translate 1-to-1 to assembly. SX/B is free ... so it does't hurt to give it a try and mix in assembly as you get more comfortable with it. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=79285#m79302 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)