Question: LC3 Finish the skeleton given below so that it is a complete program. The completed program must sum the odd numbers in the array and

LC3

Finish the skeleton given below so that it is a complete program. The completed program must sum the odd numbers in the array and store the result in the memory location labeled sumOdd and sum the even elements in the array and store the result in the memory location labeled sumEven. The number of elements in the array is given in the memory location labeled length.

.orig x3000

;INSERT CODE

lea r0, msg puts halt msg .stringz "End of processing" sumOdd .blkw #1 sumEven .blkw #1 length .fill #5 array .fill #11 .fill #-17 .fill #23 .fill #2 .fill #19

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!