You Can think of *p++ as func(p) where func is defined as: int func(p) { int temp; // assuming p is a pointer to int temp = *p; // save the value pointed by pointer p p++; // add to p the size in bytes of the items it points to return temp } In C, p++ takes the value and then increment, ++p increments and then take the value. Tal > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Pang > Sent: Sunday, May 05, 2002 7:40 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [OT]:Question on CRC ( based on notes by Ross Williams ) > > > Hi all, > > I am currently reading some notes with the title 'CRC primer by Ross > Williams'. I am stuck at section 9-A table driven implementation. > Wondering > if anyone has gone through the same notes and hopefully provide me some > guidance. > The link for the notes are as below - www.riccibitti.com/crcguide.htm > > I do not understand what the C codes trying to do - > > r = 0; > while ( len-- ) > { > byte t = ( r >> 24 ) & 0xFF; > r = ( r << 8 ) | *p++; // why OR with the contents of the > address pointer? > r^ =table[t]; > } > > where r = register, len = length of the message, t = temporary?, > p = points > to the augmented message > > I understand roughly the table way of implementation, but in the > code above, > r was not loaded with a new value, so how does the bytes move on? > > I will be gratefull for any guidance given. > > Rgds, > > Pang > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu