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 */
}
Содержание MVME5100 Series
Страница 1: ...MVME5100 Single Board Computer Programmer s Reference Guide V5100A PG2 September 2001 Edition ...
Страница 16: ...xvi ...
Страница 20: ...xx ...
Страница 28: ...xxviii ...
Страница 62: ...1 34 Computer Group Literature Center Web Site Product Data and Memory Maps 1 ...
Страница 278: ...3 88 Computer Group Literature Center Web Site System Memory Controller SMC 3 ...
Страница 288: ...4 10 Computer Group Literature Center Web Site Hawk Programming Details 4 ...
Страница 320: ...Index IN 12 Computer Group Literature Center Web Site I N D E X ...