Lines Matching refs:checksum
346 int i, c, reclen, checksum, length;
352 checksum = 0;
362 checksum += c; /* accumulate checksum */
373 /* address + data + checksum */
376 /* accumulate length bytes into checksum */
378 checksum += (length >> (8*i)) & 0xff;
380 /* accumulate address bytes into checksum: */
382 checksum += (address >> (8*i)) & 0xff;
384 /* make proper checksum byte: */
385 checksum = ~checksum & 0xff;
388 sprintf(record, SREC3_FORMAT, length, address, data, checksum);
393 checksum = 0;
948 /* check header checksum */
975 /* get and validate checksum character */