> You can implement what you want as bytecode in the eeprom and > a bytecode interpreter that runs in the pic and executes it. > Eg. for the expression above it would be in byte code > something like (after correcting the & in the middle to && > which is likely what you wanted): > > !fetch var1 !fetch var2 !and !sgn !fetch var3 !literal > 0x0C !sub !sgn !and !if !literal DoSomething !acall !fi > > where each word would take one EEPROM cell or more (you can > compress some of it). Ok, It sounds cool! Instead of coding a complex parser it would be a good idea to store in eeprom some commands like you explained. To do 'If ((Var1 & Var2)&(Var3<0x0C))' I will store in eeprom something like: PUSH Var1 PUSH Var2 AND PUSH Var3 PUSHL 0x0C < AND THEN DoSomething I think an interpreter for this kind of commands could be implemented in a pic18 quite easy. Thanks!! Carlos. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body