In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rodneymc wrote: Hi, I have a few questions on the SX/B. 1. Is this the right way to pass an address that's defined in a label? Main: Pntr = DefinedLabel Subroutine @Pntr END Subroutine: Pntr = __WParam12 READ Pntr, myvalue ' get data and put in myvalue ' do other stuff. Return 2. I'm having trouble using the index with read. For example, the following gives a syntax error on the + Main: ' main code here Pntr = DefinedLabel READ Pntr + 1, myvalue ' get number of notes END 3. Is it true that in SX/B, that we can't (yet) compound math statements? for example, the following code fails. FOR idx = 0 TO myvalue * 2 - 1 I would need to split this up into the following, using the math order of operations, correct? myvalue = myvalue * 2 myvalue = myvalue - 1 FOR idx = 0 TO myvalue 4. Finally, we can only send a single byte using serout, correct? For example, some of Jon's code from a project I'm trying to convert from BS2 to SX/B has an array called midi, and he's able to do the following: SEROUT MidiOut, MidiBaud, [cmd, STR midi\(notes * 2)] So, I would basically need to break down the above commands into bytes, and send each one individually using the SEROUT command? Thanks! Rodney ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=145365 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)