Question: Write a MARIE assembly program that can compare two positive numbers: X and Y, and then store the bigger number of X and Y to

Write a MARIE assembly program that can compare two positive numbers: X and Y, and then store the bigger number of X and Y to Y. The pseudo code is as follows,

(note: X and Y can be initialized to any positive numbers in the assembly program)

If X > Y

Y = X;

Else Y = Y;

Please edit the source code, then assemble it using MARIE simulator and finally execute it by loading it into MARIE simulator. include your source code (.mas) file, and make sure you comment each line of your code, and the screenshot of the MARIE simulator after executing the assembly program.

Hint: the following code can be used to initialize the variables x and y in which x is initialized to 40 and y is initialized to 20.

x, Dec 40 //Initialize constant x to decimal 40

y, Dec 20 //Initialize constant y to decimal 20

Comment each instruction in your program to explain its contents and functionality.

Use correctly ORG to start your program and halt to terminate your program.

Use SKIPCOND and JUMP correctly to implement a if-else.

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!