Question: Given a list of 2's complement numbers starting at location x4002, write an LC-3 assembly language program (starting at x3000) to find the sum

Given a list of 2's complement numbers starting at location x4002, write an LC-3 assembly language program

Given a list of 2's complement numbers starting at location x4002, write an LC-3 assembly language program (starting at x3000) to find the sum of the positive numbers and store the result in x4000 and the sum of the negative numbers and store the result in x4001. The length of the list of numbers is not known: it is indicated by the number zero. Test your program using multiple sets of input values. Make sure your program works for different lengths of the list and different combinations of positive and negative numbers. Submit the assembly code and screen shots of your runs. Given an array of ten 2's complement numbers starting a location x4001, write a program (starting at x3000) that will check if the numbers are sorted in ascending order. If they are sorted, then store a 1 at location x4000 otherwise store 0 at the same location. You may assume that there are no duplicate numbers in the array. Test your program using 2 sets of input values. Submit the assembly code and screen shots of your runs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure I can help you with both tasks Below is the LC3 assembly language program for each of them Program to Find the Sum of Positive and Negative Numbe... View full answer

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