Em 30/9/2010 05:08, David Duffy (AVD) escreveu: > 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... Sorry, too much time using only PIC18... __________________________________________________ Fale com seus amigos de gra=E7a com o novo Yahoo! Messenger=20 http://br.messenger.yahoo.com/=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .