This assignment is based on assembly language programming and the use of the RARS program. For a set of integers stored in an array, calculate the sum of the positive numbers and the sum of the...

This assignment is based on assembly language programming and the use of the RARS program.
For a set of integers stored in an array, calculate the sum of the positive numbers and the sum of the negative numbers, storing the results into memory.

In the data segment of the program, define an array consisting of 25 integers (words) that are a mix of positive and negative values. You can select any values you wish but try to create a balance of positive and negative numbers. Also create data definitions for the two sums that you will calculate in your program. These values should also be defined as words and initialized to zero.


In the text segment, read the numbers from the array one at a time. Include in your program the necessary logic to correctly add the values to the appropriate sum. After all the values have been read and the sums calculated, store the sums to memory in the locations you allocated in the data segment.


Reading the array and calculating the sums should be done within a single loop. Storing the values to memory should be done after the loop.


Document your program with the required header comments, register usage, and other comments in your program as necessary, especially related to implementing conditional and unconditional branch logic.


What to submit on Blackboard:


1. A copy of your program as an assembly language program file (.asm).


2. A labeled memory dump indicating all memory values (pdf or other appropriate file).

Oct 05, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here