On Thu, 19 Oct 2000, [Iso-8859-1] K=FCbek Tony wrote: > Hi, > I while ago I posted an request for 24x24 =3D 48 and > 48/24 =3D 24. Lacking replies ( apart from Nikolai's > pseudo code ) I had to 'make' them myself. Not particulary > hard, just tedious :). > Anyway had some time during the latest days to start hammer on it > and here you have the 24x24 =3D 48 bit routine. I *think* it works > ( atleast on the values tested so-far ) but dont take my word on it: I just so happen to know that Nikolai is away from his computer at the mome= nt... The following section may be shortened slightly in one of two ways: >=20 > ; carry propagation, if set then make sure if 'follows' through > =20 > MOVLW 0x01 ; preload with 1 > BTFSC STATUS,C ; check carry for overflow > ADDWF Product+2,F ; add one to next byte >=20 > BTFSC STATUS,C ; check carry for overflow > ADDWF Product+1,F ; add one to next byte >=20 > BTFSC STATUS,C ; check carry for overflow > ADDWF Product,F ; add one to next byte rlf known_zero,w ;a trick learned from payson addwf Product+2,f rlf known_zero,w addwf Product+1,f rlf known_zero,w addwf Product+0,f OR: skpnc incf Product+2,f skpnc incf Product+1,f skpnc incf Product+0,f =20 > Use at will/risk/leisure/etc. > Oh..pic-code on the pic-list what will come next ;) Don't get me started.... Thanks for posting this , Tony Scott -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads