Bob J wrote: > SUB16 macro a,b > ; a = a - b > local hb > movf b,w > subwf a,f > bc highb > decf high a,f > hb movf high b,w > subwf a,f > endm > > If I'm understanding this thread correctly, instructions written like > decf a+1,f won't work in the 18F. Unless I took the easy way out and > wrote +2.... Ugh, where to begin? Briefly: HIGH doesn't do what you seem to think it does, see manual. The +2 versus +1 we were talking about earlier referred to program memory, not RAM. RAM is addressed as bytes on both PIC 16 and PIC 18. The last SUBWF should have been to the high byte of A. The PIC 18 has a SUBWFB instruction which makes multi-byte subtracts much easier. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist