Question: Question 1: Working with MARIE (12 Marks) Given the below pseudocode, write the proper code that implements it using MARIE's assembly language: Input a number

Question 1: Working with MARIE (12 Marks)

  1. Given the below pseudocode, write the proper code that implements it using MARIE's assembly language:

Input a number and store it in X; Input a number and store it in Y; while X < 10 do

X = X + 1;

Output the value of X; endwhile;

Output the value of Y*2;

(Hint: Use Skipcond instruction)

N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it.

Example:

Add One /Add 1 to AC

  1. Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program).

Instructions:

  • Use ORG instruction to start your program at address 300.
  • Use your last university ID number to input the new values of X and Y.

For example, if your ID is 2015161678234, then you will use the number 3 as the value of X and 4

for Y.

  • Do not forget to change the representation of the Input and Output windows in the simulator to Decimal.
  • The following labels and directives should be included at the end of your program:

X, Dec 0

Y, Dec 0

One, DEC 1

Ten, DEC 10

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!