mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2024-06-03 12:29:30 +00:00
9 lines
205 B
JavaScript
9 lines
205 B
JavaScript
|
function checksum_byte(bytes) {
|
||
|
let checksum = 0xFF;
|
||
|
for(let t=0; t<bytes.length; t++) {
|
||
|
checksum = (checksum ^ bytes[t]) & 0xFF;
|
||
|
}
|
||
|
return checksum;
|
||
|
}
|
||
|
|
||
|
module.exports = { checksum_byte };
|