Question: 80x86 Assembly language - write a program that stores the primes in an array of doublewords primeArray -------------------- prime[1] := 2; {first prime number} prime[2]

80x86 Assembly language - write a program that stores the primes in an array of doublewords primeArray

--------------------

prime[1] := 2; {first prime number}

prime[2] := 3; {second prime number}

primeCount := 2;

candidate := 5; {first candidate for a new prime}

while primeCount < 100 loop

index := 1;

while (index <= primeCount)

and [prime[index] does not evenly divide canditate] loop

add 1 to index;

end while

if (index > primeCount)

then {no existing prime evenly divides the canditate, so its a new prime)

add 1 to primeCount;

prime(primeCount) := candidate;

end if;

add 2 to candidate;

end while;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!