> When this routine finishes, W contains 0x00, 0x06, 0x60, or 0x66. The > upper nibble is 0 when the carry should be set. So, if you follow this > with: > > sublw 0x5F ; or any number between 0x06 and 0x5F > > The carry bit is restored and you can cascade the result: > > skpnc > incf reg2,F > > followed by the binary to bcd conversion. (or you can write skpc/return). > > Scott > -- Hi Scott Making some simulations, I got this testing the Z flag. incf TENS_ONES,F movlw 0x66 addwf TENS_ONES,F skpndc andlw 0xF0 skpnc andlw 0x0F subwf TENS_ONES,F skpnz incf HUND,1 Is there some problem to do like this. Best Regards Luis F. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist