Hello Ian. Why not use the same idea as for addition. At final the Cy=1 if no borrow was taken else Cy=0. movfw Word1Low subwf Word2Low,f movfw Word1High skpc ;if Cy=1 then simply subwf incfsz Word1High,w ;if Cy=0 then subwf with borrow subwf Word2High,f ;if Word1High+1 ==0 then skip SUBWF ;command to save the Cy flag You may easy to add one more byte subtraction like a second block in example above. Be luck in your research ! ;-) WBR Dmitry. Ian Parish wrote: > > I'm new to this list so this may have been answered before. > I'm looking for a neat code snippet for word subtract for the 16F84. I've foun d some info for word add (on Dejanews) but I can't seem to extend this simply to subtract. > > for word add I've got:- > > MOVF Word1Low,W > ADDWF Word2Low,F > MOVF Word1High,W > BTFSC STATUS,C > INCFSZ Word1High,W > ADDWF Word2High,F > > ... which produces Word2 += Word1, with carry correctly set! > Any ideas?