In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: To replace a SX/B command XXXX I would suggest use a macro name mXXXX. The parameters for a SX/B command would also be passed to the macro, and here is the first problem. SX/B Syntax: [b]PAUSE[/b] [i]Value1 {[, | *] Value2}[/i] A macro parameter is either a constant (used as #constant) or a name (used as ??name??) but it cannot be both. So many SX/B commands can not have a single macro equivalent. It is possible to define more macros to cover the SX/B parameter formats. A better option is to pass a constant that serves as format specifier so the macro can distinquish between parameter formats. mPAUSE macro format, value1, value2 if format=0 then use mPAUSE value1 if format=1 then use mPAUSE value1,value2 etc. for all possible SX/B parameter formats Secondly, in case of pause, one should not be required to define variables used. Instead, some temporary system variables should be used. Note that a SX/B command PAUSE 100 would need to be replaced by asm mPAUSE 0,100,0 endasm in your code, so there (always) is a change in the parameter list. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=103848#m104179 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)