Hi John!
John Machin escribió:
>On 22/05/2006 5:22 AM, Gonzalo Monzón wrote:
>
>
>>Thank you for all the suggestions! :-)
>>
>>The C routine is almost -changing data type long for word- a copy of the
>>function given by a hardware manufacturer, the same code used in their
>>firmware to calc t
On 22/05/2006 5:22 AM, Gonzalo Monzón wrote:
> Thank you for all the suggestions! :-)
>
> The C routine is almost -changing data type long for word- a copy of the
> function given by a hardware manufacturer, the same code used in their
> firmware to calc the checksum of every piece of data sent
Thank you for all the suggestions! :-)
The C routine is almost -changing data type long for word- a copy of the
function given by a hardware manufacturer, the same code used in their
firmware to calc the checksum of every piece of data sent or received,
and that data is somewhat special: it doe
Gonzalo wrote:
"""
I missed the point to add the *and* to workaround the long result
issue!
I think I understand it now.
I am timing the code once translated, so here are the results for the
crc calculation function.
"""
Yes, and both of us were missing the point that the "16" means 16 bits
wide!
Thank you very much John,
I missed the point to add the *and* to workaround the long result issue!
I think I understand it now.
I am timing the code once translated, so here are the results for the
crc calculation function. I did expected a big gap, as this does a lot
of lookups to the crc tab
For a start,
>>> 22002496167782427386022437441624938050682666541682 & 0xL
67560050L
>>>
so you could just do that at the end.
But you don't really want to be carrying all that rubbish around,
getting longer and longer each time around the loop. And let's further
the translation into Python
I reply again attaching a file as I see the editor wrecked the tab
indentation.
Gonzalo Monzón escribió:
Hi all!
I have been translating some Python custom C extension code into
Python, as I need these modules to be portable and run on a PocketPC
without the need of compile (for the purpose
I reply again attaching a file as I see the editor wrecked the tab
indentation.
Gonzalo Monzón escribió:
Hi all!
I have been translating some Python custom C extension code into
Python, as I need these modules to be portable and run on a PocketPC
without the need of compile (for the purpose
Hi all!
I have been translating some Python custom C extension code into Python,
as I need these modules to be portable and run on a PocketPC without the
need of compile (for the purpose its a must 2.4 as it is the last
PythonCE release with great improvements).
But I've been stuck with a scri