dave_m
Veteran Member
To Kevin: It only takes one line of BASIC to run this sum check on a PET as Mike proved to me. You then just compare the answer with Mike's approved list of ROM sum checks.
Here is a BASIC program which will check the modulo 256 sum check of a ROM in the 9000H (UD12) socket. There are more clever ways to do this, but this one is a little more understandable:
Code:
10 address = 9*4096 rem base address of 9000H ROM slot in PET
20 for i = 0 to 4095 rem use 2047 for E000 editor ROM!
30 let dat% = peek(address + i)
40 let sc% = sc% + dat%
50 if sc% >= 256 then let sc% = sc% -256 rem modulo 256 sumcheck
60 next i
70 print "sum check = " sc%