Question: codewarrior hcs12 The array sample contains 7 8-bit signed numbers as shown below. Write a program which computes the sum of negative numbers, the sum

codewarrior hcs12
The array sample contains 7 8-bit signed numbers as shown below. Write a program which computes the sum of negative numbers, the sum of positive numbers, and the sum of the absolute values of all the numbers, and stores them in psum, nsum, and tsum, respectively. Note that each sum is represented in a word (16 bits). You must use a loop which is iterated 7 times. Outside the loop, there should be only the initialization. Your program should work for any 7 numbers stored in samples. RAMStart-$0800 and ROMStart-$4000. Add a comment on cach instruction samples DC.B $27,$95,$75,SE2,SCB,$41,$44 nsum DC.W 0 psum tsumDC. 0 DC.W 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
