A 35-byte machine-code routine that adds up the bytes of the BASIC program in memory and returns the total, the Syntactic Sum that Syntax printed under its listings to help readers find typing mistakes. The BASIC lowers RAMTOP, POKEs the bytes from a DATA line to 65500, and tells you to use PRINT USR 65500. The routine runs anywhere in RAM.
Syntax granted everyone the right to use the program and publish the sums it produces, but prohibited copying it without written consent, so no download is offered here.
Published in Syntax February 1984 (Syntactic SUM – TS2068).
Source Code
5 REM 2068 Syntactic Sum
10 CLEAR 65499
20 FOR a=65500 TO 65534
30 READ d
40 POKE a,d
50 NEXT a
60 PRINT "TS2068 Syntactic Sum Loaded"
70 PRINT "Use PRINT USR 65500 to execute."
80 DATA 167,042,075,092,237,075,083,092,080,089,237,066,035,229,033,000,000,193,011,120,177,040,009,197,026,019,006,000,079,009,024,241,068,077,201Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
