In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rodneymc wrote: Thanks again Bean! Your support is [b]awesome[/b]! I need a bit more help, though... 1. Are all variables global in scope? So, even though it's poor programming practice, we really don't have to pass the variable name to the subroutine, right? For example, in your code clarification, can we just do the following? [code] Main: Subroutine END Subroutine: READ DefinedLabel, myvalue ' get data and put in myvalue ' do other stuff. Return [/code] I also forgot to declare the sub as two bytes for sending a word which was causing me some minor grief- that's how I got onto the @ bandwagon in the first place, just trying to compile - doh! 2. I'm still a little confused on this. Is the word variable you're referring to, is the address (Pntr in my case)? In the format definition for the Read function (in the SX/B help file), isn't [i][b]base[/b][/i] a word type? The code snippit from there seems to be similar to what I had: [code] READ Pattern + idx, RB ' Pattern is an Address Otherwise the Reading statement will do. I forgot about the update. 2a. Also, to sneak in another question, is there a way can mix bytes and words in the same data statement? as in: DATA: Byte, Byte, Word, Byte I guess I just would need to break it into byte sizes and convert to a word at the appropriate index, correct? 3 & 4 I guess that give us something to look forward to! Also, for some strange reason, I find compiler design fascinating. Since you're the first that I've conversed with, and are quite helpful, I was curious if you can share with us your favorite compiler design reference texts, such as Green or Red Dragon Books by Aho, or others. Again, 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#m145439 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)