Hi everybody!
I need to translate a CRC-16 implementation in C into VB, and I'm having some trouble, mainly because my C isn't so hot.
First question:
Does this line mean what I think it does?
Here's what I'm guessing it's equivalent to (in pseudo-code):
Is that about right?
Second question:
What does the "register" keyword mean? The code I'm working with has a parameter and several varisables that are declared like this:
I tried removing the "register" from the declarations, just to see what it would do, and the calculation still worked. So what does the "register" mean?
Thanks in advance!
I need to translate a CRC-16 implementation in C into VB, and I'm having some trouble, mainly because my C isn't so hot.
First question:
Does this line mean what I think it does?
Code:
crc = ((crc ^ 0x4002) << 1) + 1;
Code:
temp = crc XOR 0x4002;
temp = temp SHIFTLEFT 1;
crc = temp + 1;
Second question:
What does the "register" keyword mean? The code I'm working with has a parameter and several varisables that are declared like this:
Code:
register unsigned crc;
register char c;
Thanks in advance!