I remember borrowing a book from the library, which had a type-in checksum program of this sort. It was done like was common for C=64 things of this kind - there's a BASIC FOR-loop iterating through a memory area, reading in bytes from DATA statements you've typed in and POKEing those bytes into memory, not completely unlike entering a program manually from the front-panel switches of an older computer.
So, after typing that in and probably SYSing (C=64 BASIC command for executing machine code from arbitrary memory location) to some address, it did print out a two-digit (eight-bit) hex checksum after every BASIC line I entered on the C=64 and the program listing in the book had the correct checksums for every line, so spotting errors was more or less instantaneous.
This stuff brings memories.
FOR I=40960 TO 49152:POKE I,PEEK(I):NEXT I
POKE 1,54
From top of my head; loop through the BASIC interpreter area, reading byte by byte with PEEK and POKEing those bytes back to the same addresses. Sounds nonsensical? Not so, because the C=64 does have full 64 kB of RAM, but some of it is overlapped by ROMs. What happens here is that you're reading from ROM but writes always go to RAM, so you're copying the BASIC interpreter from ROM to RAM. After that, the POKE statement turns off the ROM overlap and the interpreter is now run from RAM, so you can edit it live - and obviously cause all sorts of interesting crash situations.
It sure did help later with career in IT to have understood this kind of stuff at age of around ten.