Mike Hord wrote : > Something no one has mentioned, but probably should, considering > that someone who didn't know the answer to this question may not > know the fact I'm going to bring up, is: > > You can't (can't can't can't)(mustn't) use these pseudoinstructions > as follows: > > btfss BOB, thumb > skpz RALPH > .... > > Intuitively, it looks like if BOB has 'thumb' set, we shouldn't check > to see if RALPH is zero or not. In practice, when you assemble this > code, MPASM (or whatever assembler you're using) is going to > expand that skpz macro to its constituent code, and you'll be left > skipping only the first instruction of that macro. Now, since the SKPZ (and SKPNZ b.t.w) macro only expands to *one* instruction there is no problem. Bad example. Read the manual. Some other "pseudo-intructions" does have this limitation, just as most other multiple-instruction macros (you can take care of it inside the macro). > I've heard people say that they don't use pseudoinstructions to avoid > this kind of pitfall (i.e., getting caught in the "why won't my code > work" trap, when it LOOKS fine). Good point. Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist