On Thu, 9 Mar 2000, James Newton wrote: > Yes. Hmmm... this is off the cuff, looks like about 40 instructions? Not terribly esoteric I'm afraid, I'm sure there are much better ways -- Rich ; given 16 bit data in HI and LO, extract decimal digits ; requires one temp, HI and LO are destroyed. clrf temp skp sub10k incf temp,f movlw 10000 & 255 subwf LO,f movlw 10000 >> 8 skpc addlw 1 ; this sucks subwf HI,f bc sub10k output(temp); movlw 10 movwf temp add1K decf temp,f movlw 1000 & 255 addwf LO,f movlw 1000 >> 8 skpnc addlw 1 addwf HI,f bnc add1k output(temp); clrf temp skp sub100 incf temp,f movlw 100 subwf LO,f bc sub100 movlw 1 ; this REALLY sucks subwf HI,f bc sub100 output(temp); movlw 10 movwf temp add10 decf temp,f addwf LO,f bnc add10 output(temp); output(LO); return