Rounding to closest 1's multiple, code enclosed :)
Scott Dattalo email (remove spam text)
On Fri, 6 Apr 2001, [Iso-8859-1] Kübek Tony wrote:
> Scott Dattalo wrote:
Actually Bob. And it's a damned clever idea.
actually the 10's aren't much harder:
lo + 256*mid + 65536*hi = lo +250*mid + 65530*hi + 6*(mid + hi)
movf mid, w
movwf l2 ;mid+hi
addwf l2,f ;2*mid+2*hi
addwf l2,f ;3*mid+3*hi
clrc rlf temp,w ;6*mid+6*hi
at this point, h2:l2 is congruent to the original 24-bit number modulo 10 and is
no more than 14-bits. But this is off the top of my head and not necessarily
> Brilliant !
Yeah! Let's by Bob a beer.
http://www.piclist.com hint: To leave the PICList
In reply to: <200104061514.RAA02328@mn10.swip.net>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the