Write a MARIE assembly program that implements the below Pseudocode: z=0 Input x If x=0 X=x+3 Input y If y>0 z=x*y Print z . For example, if the entered values are 9 and 5, then the output should be...



  1. Write a MARIE assembly program that implements the below Pseudocode:

    z=0



Input x



If x=0



    X=x+3



Input y



If y>0



   z=x*y



Print z


.


 For example, if the entered values are 9 and 5, then the output should be 45.
N.B: You should include the MARIE code in your Answer (not a screenshot!), with an explanation of your code.


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 equivalent to 512
    10
    .

  • Use  x = 5 and y = 5

  • Do not forget to change the representation of the Input and Output windows in the simulator to Decimal.

  • You should include the proper labels and directives at the end of your program.


a) Write a MARIE assembly program that implements the below Pseudocode:<br>z=0<br>Input x<br>If x=0<br>X=x+3<br>Input y<br>If y>0<br>z=x*y<br>Print z<br>For example, if the entered values are 9 and 5, then the output should be 45.<br>N.B: You should include the MARIE code in your Answer (not a screenshot!), with an<br>explanation of your code.<br>Example:<br>Add One<br>/Add 1 to AC<br>b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE<br>Simulator window after running the program).<br>Instructions:<br>Use

Extracted text: a) Write a MARIE assembly program that implements the below Pseudocode: z=0 Input x If x=0 X=x+3 Input y If y>0 z=x*y Print z For example, if the entered values are 9 and 5, then the output should be 45. N.B: You should include the MARIE code in your Answer (not a screenshot!), with an explanation of your code. Example: Add One /Add 1 to AC b) 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 equivalent to 51210. Use x = 5 and y = 5| For example, if your ID is 2215161678205, then you will use the number 0 for x and 5 for y. Do not forget to change the representation of the Input and Output windows in the simulator to Decimal. You should include the proper labels and directives at the end of your program.
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here