The condition for loop termination should be count to zero (count dawn to zero), rather than count to a specific limit value. Since the result of counting Subtraction is stored in the condition flag, the commands compared with zero can be omitted. Because 'is no longer used as the subscript index of the array, there is no problem in using the reduce count.
 
Int checksum (int * Data)
{
Unsigned int I;
Int sum = 0;
For (I = 64; I! = 0; I --)
{
Sum + = * (Data ++ );
}
Return sum;
}
 
For the unsigned cyclic Count value I, the condition for loop continuation can be either I! = 0 can also be I> 0. Because I cannot be a negative number, the two conditions are equivalent. For a signed cyclic Count value, using the condition I> 0 as the condition for continuing the loop is an adventure. The compiler does not need to allocate a register to save the cyclic termination value. commands compared with 0 can also be omitted.
 
All in all, I should be used for both signed and unsigned cyclic count values! = 0 is the end condition of the loop. For the signed number I, this is one less command than the condition I> 0.