Re: CRC_CCITT 16-bit assembly language code

On Fri, 26 Oct 2007 02:27:06 -0500, "Vy" <vywack@xxxxxxxxx> wrote:

On Wed, 24 Oct 2007 15:37:26 -0500, "Vy" <vywack@xxxxxxxxx> wrote:

Is there someone who has access to the CRC_CCITT 16-bit code written
ARM7 assembly language?

I'm well aware that there's a ton of code in C for the same.

What's funny is i can do the CRC calculation by hand and have also
developed the algorithm but i'm unable to get the code up and

I'd be happy to share the code that i wrote. If you can help me
send me an e-mail at vywack@xxxxxxxxx or we can settle it on this

Here is some ARM assembly code for implimenting CRC-CCITT.

Anton Erasmus

Hi Anton,

I already went through that code. It's not right. I'm using ARM7 and
does not have instructions like ASL. It only has LSL.
Also the person uses $ signs in front of hex numbers which i can't
out why.

Maybe an older version of ARM supported all that but with ARM7 none of
that exists.

LSL and ASL are the same thing. The assembler used, probably has a few
pseudo instructions to help with readability.

Anton Erasmus

No, LSL and ASL are not the same thing. They have nothing to with the
assembler and is defined by ARM in the ARM Architecture Reference manual.

There is only LSL. ASL in not defined by ARM in the ARM Architecture
Reference manual for ARM7 v4.4 and above.

There is however both ASR and LSR. The difference between them being that
when you use LSR the bits on the left are padded with zeroes whereas with
ASR the bits on the left are padded with the bit that was present in
If carry was 1, all bits to the left will be 1 and if 0 all bits to the
left shall be zero.