B-14
Computer Group Literature Center Web Site
MVME5100 VPD Reference Information
B
Configuration Checksum Calculation Code
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* cssect - checksum section
* description:
* This component’s purpose is to checksum the buffer pointed to
* by the buffer pointer.
* notes:
* call:
* argument #1 = buffer (section) to checksum
* argument #2 = number of bytes in buffer
* return:
*
0xXX = checksum
*/
UCHAR
cssect(nvram_ptr, count)
register UCHAR *nvram_ptr; /* NVRAM buffer pointer */
register UINT count; /* count, number of bytes */
{
register UCHAR y, isum, sum;
for (sum = 0; count; count--) {
y = *nv+;
isum = sum + y;
if ((isum < y) || (isum < sum)) isum += 1;
sum = isum;
}
return (sum); /* return calculated checksum */
}
Summary of Contents for MVME5100 Series
Page 1: ...MVME5100 Single Board Computer Programmer s Reference Guide V5100A PG2 September 2001 Edition ...
Page 16: ...xvi ...
Page 20: ...xx ...
Page 28: ...xxviii ...
Page 62: ...1 34 Computer Group Literature Center Web Site Product Data and Memory Maps 1 ...
Page 278: ...3 88 Computer Group Literature Center Web Site System Memory Controller SMC 3 ...
Page 288: ...4 10 Computer Group Literature Center Web Site Hawk Programming Details 4 ...
Page 320: ...Index IN 12 Computer Group Literature Center Web Site I N D E X ...