Catch-It wrote: > If I have got this wrong could somebody correct me please? Gladly. > 1> MOVF AL,W ;low byte > 2> ADDWF BL,F > 3> MOVF AML,W ;Middle low byte > 4> SKPNC > 5> INCFSZ AML,W > 6> ADDWF BML,F > 7> MOVF AMH,W ;Middle high byte > 8> SKPNC > 9> INCFSZ AMH,W > > 1 Status affected: None > 2 (OK, say we add to numbers and generate a carry ) Status > affected: C,DC,Z >Carry bit set > 3 Status affected: None >Carry bit set< > 4 Status affected: None >Carry bit set< > 5 OK, we add the carry to the higher byte and skip stuff at line 6 > (0 in the next byte). Status affected: None >Carry bit set< > 6 THIS WOULD SET THE CARRY FLAG CORRECTLY > 7 Status affected: None >Carry bit set< > 8 OH DEAR! Carry bit still set from the original add!!! BUG BUG! Sigh.... It's NOT a bug; it's SUPPOSED to work that way. Go through your example again, more carefully: 1 & 2: AL is added to BL and a carry is generated. 3, 4, & 5: The carry is propagated to AML. The result happens to be 0, so we skip step 6. The carry remains set. This is correct, since the result of step 5 could ONLY have been 0 if AML were incremented from FF to 0. 6: Skipped. 7 & 8: Increment AMH, since there's a carry from step 5 (when we incremented AML from FF to 0). No bug. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499