Philippe Paternotte wrote: > Isaac Marino Bavaresco wrote: > =20 >> Which PIC family? (12-bit, 14-bit, 14-bit enhanced, 16-bit, 16-bit >> extended, 24- or 32-bit instructions) >> >> This code should work for the 5 first families in the list: >> >> decf Var+0,f >> btfss STATUS,C >> decf Var+1,f >> btfss STATUS,C >> decf Var+2,f >> >> movf Var+0,w >> iorwf Var+1,w >> iorwf Var+2,w >> btfsc STATUS,Z >> goto IsZero >> >> Of course there are other options, some more efficient (specially for >> the 16-bit instructions family), but this code should work for most >> families. >> >> Best regards, >> >> Isaac >> >> =20 > > Isaac, DECF sets carry/borrow in PIC18 only so that code works only for > PIC18. > > > ----- > Best regards, > > Philippe. > > http://www.pmpcomp.fr Pic Micro Pascal for all!=20 > =20 Correct, DECF only affects Z, not C. David... --=20 ___________________________________________ David Duffy Audio Visual Devices P/L Unit 8, 10 Hook St, Capalaba 4157 Australia Ph: +61 7 38235717 Fax: +61 7 38234717 Our Web Site: www.audiovisualdevices.com.au ___________________________________________ --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .