REM > BBCheckSum

DIM B% 1024

INPUT"Boot block: "f$
OSCLI"Load "+f$+" "+STR$~B%

checksum% = 0
carry% = 0

 FOR z% = 0 TO 510
  checksum% = checksum% + B%?z% + carry%
  IF (checksum% > &FF) THEN carry% = 1 ELSE carry% = 0
  checksum% = checksum% AND &FF
 NEXT

PRINT"Checksum = &"+STR$~checksum%
