Primes by Trial Division - Spectravideo Compumate
27 November 2016
The Spectravideo Compumate adds significant capability to the Atari 2600, compared to Atari's 2600 BASIC. Even though there are FOR-NEXT loops, the ability to work with numbers up to ±999999, and a relatively huge memory... there is no array variable. So the program is still catastrophically limited.
10 LetC=3 20 LetI=2 30 IfC=IThenGoto80 40 LetP=C/I 50 IfP=Int[P]ThenGoto90 60 LetI=I+1 70 Goto30 80 PrtC 90 LetC=C+1 99 Goto20