Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the pseudo-code (C language based) for this assembly language program. Please read the instruction carefully. Design, write, assemble, and simulate an assembly language

I need the pseudo-code (C language based) for this assembly language program.

Please read the instruction carefully.

Design, write, assemble, and simulate an assembly language program that will test if a number 0 < N <= 255 is a prime number or not (the number 1 is NOT a prime number).

If N is a prime number, the variable PRIME has to be set to 1, otherwise to 0. N and PRIME are 1 byte unsigned numbers.

To determine if a number is a prime number or not, please remember: A number N is NOT a prime if it can be divided evenly by a number X with 1< X < N (i.e., N mod X = 0). Thus, your program should cycle through all X numbers (1< X < N) and determine whether N mod X = 0 for any X.

- In your pseudo code, do NOT use a for loop, but either a while or a do-until structure to implement a loop.

- You are NOT allowed to use the Divide or Multiply instructions anywhere in this program.

- Program is NOT allowed to change the number stored in N. (You are allowed to change the value assigned to N to simulate different numbers.)

- The program should work for any N > 0 value, not just for the one given.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

Find the derivative. f(x) 8 3 4 mix X O 4 x32 4 x32 3 -4x - x2

Answered: 1 week ago

Question

13-6 How will MIS help my career?

Answered: 1 week ago