How to run and modify marie program

Assignment Help Computer Engineering
Reference no: EM132215

Question

(1) RUN

Attached file "add_two_numbers.mas" is a MARIE program to do plain addition of two number already stored in memories (Num1, Num2).

Answer is stored at Result and also put in Output window
(the Output Register).

RUN the program and confirm that it works in your downloaded copy of the MARIE Simulator.

(2) MODIFY (Make another program based on that one)

Copy that file and rename copy "Add_Four_if_result_positive.mas".

Change that program in two ways-

(a) Make it add four numbers (Num1, Num2, Num3, Num4) in its place of the two it originally handled.

(b) Include a decision before storing and outputing result. If value of the result is not positive (so zero or negative), set
Result value to the value ZERO (0).

So, program will implement this kind of logic-

Result = Num1 + Num2 + Num3 + Num4;
If (Result < 1) Result = 0;
Output Result;

This will require figuring out how SkipCond instruction works and whether to give it a Hex operand of 000, 400, or 800.

 

Reference no: EM132215

How to compute both the average

Write down a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the av

Create active directory policies to include features

Active Directory Design and Active Directory Implementation- This section will specify organizational Active Directory design, and develop and implement Active Directory as p

Design a flowchart of the program

The Unit 4 Topic 2 Presentation includes pseudo-code for a program which processes a client file (the master file) and a service file (the transaction file) by updating the

What do you mean by pbx

take a call between a user in the company and another user out of the company who is connected to a traditional telephone network. What sort of technology is needed at the i

Prepare a multithreaded code breaking program

Prepare a  multithreaded code breaking program. You have been provided 3 files that contain text that have been  encrypted using a Caeser cypher scheme.

What is the publisher trying to optimize

A small magazine publisher wants to determine the best combination of two possible magazines to print for the month of July. Backyard magazine, which he has published for ye

What version control software you will use

Identify the most difficult, risky, critical, core use case, and then identify 2 or 3 architecturally significant increments in system functionality required to support that

Difference between paging and swapping

a) Explain the term ‘Process swapping'. Why is process swapping necessary in a typical modern operating system? Include an explanation of the difference between paging and s

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd