In SX Microcontrollers, SX/B Compiler and SX-Key Tool, toru173 wrote: I'm looking at the SX28 as the basis of an interpreter, and I have read a few of the posts on these forums relating to this particular usage. I noted, however, that all suggestions result in fairly small instruction sets so that the "jump table" method can be used to interpret them without crossing page boundries. I am wondering if there is a quick and easy way to get around this problem? My goal is to interpret a fairly high-level language, with instructions such as "write character to screen"or something. Please take into account that I've never touched an SX in my life, but I have read a little about them ^_^ My thinking brought me to this; (I refer to the 'secret' opcodes - specifically "pushPC" listed here: http://sxlist.com/techref/ubicom/secrets.htm) The 12bit offset to the start of the code corrosponding to the "opcode" to be interpreted is stored in a list. You would then execute an IREAD relative to the opcode (0-255) and the page at which your list starts, a pushPC then a RETP (in that order) My understanding is that the IREAD will store the destination address in the M and W registers, the pushPC will then put these registers on the stack, and then the RETP will pop them from the stack into the PC. Is this correct? Is there an easier way of doing this? Thankyou in advance ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=125768 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)