mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Match code in BYTE
This commit is contained in:
parent
ccdc1f3239
commit
e14757982f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user