piclist 2001\01\10\180339a >
Thread: yet another algorithm challange
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Dave Bell email (remove spam text)



Andrew Vassallo wrote:

>Hmm, I'm assuming that your "Out1" is the MSByte.  If not, you've got
>things reversed.  I just never saw the convention "OUT+5" to indicate the
>LSByte in a hex long word.  Forgive me if you've got it right, but it
>just looks odd.

 Actually, I agree; I posted the code as I expanded it from Bob
Ammerman's suggestion. I guess it's a big- vs. little-endian thing.
I may end up reversing it, but it works. I used the same structure to
create a bit doubler, by the way. Not much longer than the lookup table
method, and there's some advantage in readability, to using the same
algorithm for both! I might make a tripler, and compare size/time between
the 6X code and (2X * 3X)... Gut feeling is that 6X is shorter, faster.

Dave Bell

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservRemoveMEspammitvma.mit.edu with SET PICList DIGEST in the body


<Pine.NEB.4.21.0101101457360.29475-100000@shell2.bayarea.net>

In reply to: <200101090510.VAA88796@postman.bayarea.net>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) yet another algorithm challange

month overview.

new search...