Question: a ) Write a MARIE assembly program that performs the following tasks: Input a number from the user and store it in a memory location

a) Write a MARIE assembly program that performs the following tasks:
Input a number from the user and store it in a memory location (X).
Initialize a counter to 1.
Loop as long as the value of x is less than 10 :
Display the value of x to the user.
Increment the value of x by 1.
Increment the counter by 1.
When the value of x is no longer less than 10, exit the loop.
Display the final value of the counter, which represents how many times the loop was executed.
Terminate the program.
Expected behavior:
Example: if the entered value is 5, the values 5,6,7,8,9,10(one number per line) will be displayed followed by the number of iterations. Note that the number 10 should be displayed.
a) Include a screenshot of the simulation's result (A screenshot of the MARIE Simulator window after running the program).
Instructions:
Use "ORG" instruction to start your program at an address equivalent to 20008.
Use your last university ID number to input the new value of x.
For example, if your ID is 2413161678239, then you will use the number 9 as the value of x.
Do not forget to change the Input and Output boxes to decimal!
Proper labels and directives should be included at the end of your program.
a ) Write a MARIE assembly program that performs

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 Programming Questions!