On Sat, 4 Jul 2009, Isaac Marino Bavaresco wrote: > Terry Harris escreveu: > > On Fri, 03 Jul 2009 20:14:13 -0300, you wrote: > > > > > >> OK, explain this under this theory: > >> > >> Look how they do 'Var = 0;' : > >> > >> bcf STATUS,C > >> *movlw* 0 > >> btfsc STATUS,C > >> *movlw* 1 > >> movwf Var > >> > > > > Evaluate the right hand expression and put the result in something just big > > enough (in this case the carry flag). Copy the result to the lvalue. > > > > Makes absolutely no sense. It is testing something itself set hard > coded. And there are two movlw, the expression doesn't have any > conditionals. I'll bet Terry is right. I'll also bet there is a ton of code being executed (inside the compiler) between the first instruction being generated and the last 4. Just because you see this 5 instruction sequence together doesn't mean it was all generated in the same place inside the compiler :-) Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist