32000 REM Type Your Program Once -- "TYPO" 32100 CLR :DIM Q$(20):QF=7:CLOSE #QF:? "File for output "; 32110 INPUT Q$:OPEN #QF,8,0,Q$:QREM=0 32130 QCNT=1:FOR QADDR=PEEK(130)+256*PEEK(131) TO PEEK(132)+256*PEEK(133)-1 32140 QSUM=QSUM+PEEK(QADDR)*QCNT:QCNT=QCNT+1:NEXT QADDR 32150 ? #QF;"Variable checksum = ";QSUM:? #QF 32160 QADDR=PEEK(136)+256*PEEK(137):? #QF;" Line num range Code Length" 32170 QLINE=PEEK(QADDR)+256*PEEK(QADDR+1) 32180 IF QLINE>=32000 THEN END 32190 QLEN=0:QSUM=QLEN:QCNT=QLEN:? #QF;" ";QLINE,"- "; 32200 IF NOT (QCNT<12 AND QLEN<500 AND QLINE<32000) THEN 32270 32220 QLEN=QLEN+PEEK(QADDR+2):QCNT=QCNT+1 32230 IF PEEK(QADDR+4)=0 AND QREM THEN QADDR=QADDR+PEEK(QADDR+2):GOTO 32260 32240 FOR QADDR=QADDR TO QADDR+PEEK(QADDR+2)-1 32250 QSUM=QSUM+PEEK(QADDR):NEXT QADDR 32260 Q$=STR$(QLINE):QLINE=PEEK(QADDR)+256*PEEK(QADDR+1):GOTO 32200 32270 QSUM=QSUM-676*INT(QSUM/676):QCNT=INT(QSUM/26) 32280 ? #QF;Q$,CHR$(65+QCNT);CHR$(65+QSUM-26*QCNT);" ";QLEN 32290 GOTO 32180
Back to previous page