1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-01 14:57:08 +00:00

Match code in BYTE

This commit is contained in:
David Schmenk 2014-07-07 20:59:22 -07:00
parent ccdc1f3239
commit e14757982f

View File

@ -3,12 +3,12 @@ import STDLIB
byte MACHID
end
const FALSE = 0
const TRUE = !FALSE
const maxPrime = 8190
const nums = maxPrime+1
const FALSE = 0
const TRUE = !FALSE
const size = 8190
const sizepl = size+1
byte flag[nums]
byte flag[sizepl]
byte iter
word prime, i, k, count
byte strPrimes[] = " primes.\n"
@ -32,13 +32,13 @@ end
beep
for iter = 1 to 10
memset(@flag, nums, TRUE)
memset(@flag, sizepl, TRUE)
count = 0
for i = 0 to maxPrime
for i = 0 to size
if flag[i]
prime = i + i + 3
k = i + prime
while k <= maxPrime
while k <= size
flag[k] = FALSE
k = k + prime
loop