Category : BASIC Source Code
Archive   : LB09D.ZIP
Filename : SIEVE.BAS

 
Output of file : SIEVE.BAS contained in archive : LB09D.ZIP


'This is a Sieve benchmark translated from BYTE 1985
' May, page 286

size = 7000
dim flags(7001)
print "Start one iteration: "; time$()
count = 0
for i = 0 to size
flags(i) = 1
next i
for i = 0 to size
if flags(i) = 0 then 170
prime = i + i + 3
k = i + prime
120 if k > size then 160
flags(k) = 0
k = k + prime
goto 120
160 count = count + 1
170 next i
print time$(); " done: "; count; " primes found."


  3 Responses to “Category : BASIC Source Code
Archive   : LB09D.ZIP
Filename : SIEVE.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/